diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c33c80..f4d8d4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,7 @@ jobs: gemfile: - rack_2 - rack_1 + - rails_7_0 - rails_6_1 - rails_6_0 - rails_5_2 @@ -50,6 +51,10 @@ jobs: ruby: 2.7.4 - gemfile: rails_4_2 ruby: 2.7.4 + - gemfile: rails_7_0 + ruby: 2.6.8 + - gemfile: rails_7_0 + ruby: 2.5.8 env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile steps: diff --git a/Appraisals b/Appraisals index 3b546fb..60a9d17 100644 --- a/Appraisals +++ b/Appraisals @@ -17,6 +17,11 @@ appraise "rack_1" do gem "rack-test", ">= 0.6" end +appraise 'rails_7-0' do + gem 'railties', '~> 7.0.0.a' + gem 'dalli', '~> 3.0' +end + appraise 'rails_6-1' do gem 'railties', '~> 6.1.0' end diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_7_0.gemfile new file mode 100644 index 0000000..dafcdac --- /dev/null +++ b/gemfiles/rails_7_0.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "railties", "~> 7.0.0.a" +gem "dalli", "~> 3.0" + +gemspec path: "../" diff --git a/lib/rack/attack/store_proxy/mem_cache_store_proxy.rb b/lib/rack/attack/store_proxy/mem_cache_store_proxy.rb index 122037f..f7b66c9 100644 --- a/lib/rack/attack/store_proxy/mem_cache_store_proxy.rb +++ b/lib/rack/attack/store_proxy/mem_cache_store_proxy.rb @@ -12,6 +12,10 @@ module Rack store.is_a?(::ActiveSupport::Cache::MemCacheStore) end + def read(name, options = {}) + super(name, options.merge!(raw: true)) + end + def write(name, value, options = {}) super(name, value, options.merge!(raw: true)) end diff --git a/rack-attack.gemspec b/rack-attack.gemspec index 75ca531..11e72f9 100644 --- a/rack-attack.gemspec +++ b/rack-attack.gemspec @@ -46,5 +46,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'byebug', '~> 11.0' end - s.add_development_dependency 'railties', '>= 4.2', '< 6.2' + s.add_development_dependency 'railties', '>= 4.2', '< 7.1' end