mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
Merge remote-tracking branch 'rfwatson/master'
This commit is contained in:
commit
d1682b19b4
1 changed files with 7 additions and 0 deletions
|
|
@ -6,6 +6,13 @@ module Rack
|
|||
class Attack
|
||||
module StoreProxy
|
||||
class RedisStoreProxy < SimpleDelegator
|
||||
def initialize(*args)
|
||||
major_version = Redis::VERSION.split('.').first.to_i
|
||||
warn 'RackAttack requires Redis gem >= 3.0.0.' if major_version < 3
|
||||
|
||||
super(*args)
|
||||
end
|
||||
|
||||
def self.handle?(store)
|
||||
defined?(::Redis::Store) && store.is_a?(::Redis::Store)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue