diff --git a/Rakefile b/Rakefile index 5f7e9e0..300ec21 100644 --- a/Rakefile +++ b/Rakefile @@ -10,7 +10,6 @@ namespace :test do Rake::TestTask.new(:integration) do |t| t.pattern = "spec/integration/*_spec.rb" - t.warning = false end end diff --git a/lib/rack/attack/store_proxy.rb b/lib/rack/attack/store_proxy.rb index 4d69853..de0bc0c 100644 --- a/lib/rack/attack/store_proxy.rb +++ b/lib/rack/attack/store_proxy.rb @@ -20,7 +20,10 @@ module Rack # We also want to use the underlying Dalli client instead of ::ActiveSupport::Cache::MemCacheStore, # and the MemCache client if using Rails 3.x - client = store.instance_variable_get(:@data) + if store.instance_variable_defined?(:@data) + client = store.instance_variable_get(:@data) + end + if ACTIVE_SUPPORT_WRAPPER_CLASSES.include?(store.class.to_s) && ACTIVE_SUPPORT_CLIENTS.include?(client.class.to_s) client else