rack-attack/lib/rack/attack
Aaron Suggs 9d90610bbe Refactor StoreProxy to avoid autoloading MemCacheStore
In v4.4.0, checking `defined?(ActiveSupport::Cache::MemCacheStore)`
could trigger an error loading dalli, which isn’t needed.

This fixes that bug, and prevents similar bugs by checking
`store.class.to_s` rather than `defined?(klass) && store.is_a?(klass)`.

Writing an automated test to ensure that dalli is truly optional is
difficult, but I was able to recreate the dalli load error in v4.4.0 by
running:

    gem uninstall dalli
    ruby -Ilib -ractive_support/all -ractive_support/cache/redis_store
-rrack/attack -e 'p Rack::Attack::StoreProxy.build(Redis::Store.new)'

Fixes #163
2016-02-16 16:59:24 -05:00
..
store_proxy fix: workaround MemCacheClient + MemCache backend by using a dedicated proxy 2015-12-16 16:57:54 +01:00
allow2ban.rb Make Rack::Attack a class and Rack::Attack.new return an instance of that class, rather than Rack::Attack. 2014-03-28 14:53:51 +11:00
blacklist.rb Make Rack::Attack a class and Rack::Attack.new return an instance of that class, rather than Rack::Attack. 2014-03-28 14:53:51 +11:00
cache.rb Support the ability to reset Fail2Ban count and ban flag 2015-05-22 09:47:32 -04:00
check.rb Added limit and period options to track. Delegates [] to Throttle if they are present otherwise Check. 2014-05-19 11:11:01 -07:00
fail2ban.rb Support the ability to reset Fail2Ban count and ban flag 2015-05-22 09:47:32 -04:00
path_normalizer.rb Normalize request paths when using Rails' ActionDispatch 2015-12-18 11:12:11 -05:00
request.rb Improve documentation of Rack::Attack::Request 2014-06-17 11:37:25 -07:00
store_proxy.rb Refactor StoreProxy to avoid autoloading MemCacheStore 2016-02-16 16:59:24 -05:00
throttle.rb Allow throttle period option to be a proc 2014-09-19 19:32:39 +02:00
track.rb Changed track checker to track filter. Made track filter tests more clear. 2014-05-22 10:11:23 -07:00
version.rb v4.4.0 2016-02-10 15:05:43 -05:00
whitelist.rb Make Rack::Attack a class and Rack::Attack.new return an instance of that class, rather than Rack::Attack. 2014-03-28 14:53:51 +11:00