From 55d5e370fd048a558c554dbaa521de99daa730ed Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Fri, 25 Dec 2020 23:55:58 -0300 Subject: [PATCH] test: update ruby and rails versions --- .travis.yml | 26 ++++++++++++------- Appraisals | 12 ++++----- .../active_support_redis_cache_store.gemfile | 2 +- ...e_support_redis_cache_store_pooled.gemfile | 2 +- .../{rails_5_1.gemfile => rails_6_1.gemfile} | 2 +- rack-attack.gemspec | 2 +- ...e_support_redis_cache_store_pooled_spec.rb | 2 +- .../active_support_redis_cache_store_spec.rb | 2 +- 8 files changed, 28 insertions(+), 22 deletions(-) rename gemfiles/{rails_5_1.gemfile => rails_6_1.gemfile} (77%) diff --git a/.travis.yml b/.travis.yml index 1b87613..03ee277 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,11 +3,11 @@ language: ruby cache: bundler rvm: - - ruby-head - - 2.7.1 + - 3.0.0 + - 2.7.2 - 2.6.6 - 2.5.8 - - 2.4.10 + before_install: - yes | gem update --system @@ -16,9 +16,9 @@ before_install: gemfile: - gemfiles/rack_2.gemfile - gemfiles/rack_1.gemfile + - gemfiles/rails_6_1.gemfile - gemfiles/rails_6_0.gemfile - gemfiles/rails_5_2.gemfile - - gemfiles/rails_5_1.gemfile - gemfiles/rails_4_2.gemfile - gemfiles/dalli2.gemfile - gemfiles/redis_4.gemfile @@ -30,15 +30,21 @@ gemfile: - gemfiles/active_support_redis_store.gemfile matrix: - allow_failures: - - rvm: ruby-head exclude: - gemfile: gemfiles/rack_1.gemfile - rvm: 2.7.1 + rvm: 3.0.0 + - gemfile: gemfiles/rails_5_2.gemfile + rvm: 3.0.0 - gemfile: gemfiles/rails_4_2.gemfile - rvm: 2.7.1 - - gemfile: gemfiles/rails_6_0.gemfile - rvm: 2.4.10 + rvm: 3.0.0 + - gemfile: gemfiles/dalli2.gemfile + rvm: 3.0.0 + - gemfile: gemfiles/connection_pool_dalli.gemfile + rvm: 3.0.0 + - gemfile: gemfiles/rack_1.gemfile + rvm: 2.7.2 + - gemfile: gemfiles/rails_4_2.gemfile + rvm: 2.7.2 fast_finish: true services: diff --git a/Appraisals b/Appraisals index ef44d14..03c6a70 100644 --- a/Appraisals +++ b/Appraisals @@ -17,6 +17,10 @@ appraise "rack_1" do gem "rack-test", ">= 0.6" end +appraise 'rails_6-1' do + gem 'railties', '~> 6.1.0' +end + appraise 'rails_6-0' do gem 'railties', '~> 6.0.0' end @@ -25,10 +29,6 @@ appraise 'rails_5-2' do gem 'railties', '~> 5.2.0' end -appraise 'rails_5-1' do - gem 'railties', '~> 5.1.0' -end - appraise 'rails_4-2' do gem 'railties', '~> 4.2.0' @@ -55,12 +55,12 @@ appraise "connection_pool_dalli" do end appraise "active_support_redis_cache_store" do - gem "activesupport", "~> 5.2.0" + gem "activesupport", "~> 6.1.0" gem "redis", "~> 4.0" end appraise "active_support_redis_cache_store_pooled" do - gem "activesupport", "~> 5.2.0" + gem "activesupport", "~> 6.1.0" gem "connection_pool", "~> 2.2" gem "redis", "~> 4.0" end diff --git a/gemfiles/active_support_redis_cache_store.gemfile b/gemfiles/active_support_redis_cache_store.gemfile index 30e1e38..8acbbe1 100644 --- a/gemfiles/active_support_redis_cache_store.gemfile +++ b/gemfiles/active_support_redis_cache_store.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "activesupport", "~> 5.2.0" +gem "activesupport", "~> 6.1.0" gem "redis", "~> 4.0" gemspec path: "../" diff --git a/gemfiles/active_support_redis_cache_store_pooled.gemfile b/gemfiles/active_support_redis_cache_store_pooled.gemfile index 9232a9b..cf1e92e 100644 --- a/gemfiles/active_support_redis_cache_store_pooled.gemfile +++ b/gemfiles/active_support_redis_cache_store_pooled.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "activesupport", "~> 5.2.0" +gem "activesupport", "~> 6.1.0" gem "connection_pool", "~> 2.2" gem "redis", "~> 4.0" diff --git a/gemfiles/rails_5_1.gemfile b/gemfiles/rails_6_1.gemfile similarity index 77% rename from gemfiles/rails_5_1.gemfile rename to gemfiles/rails_6_1.gemfile index 66a5a0b..4c467fe 100644 --- a/gemfiles/rails_5_1.gemfile +++ b/gemfiles/rails_6_1.gemfile @@ -2,6 +2,6 @@ source "https://rubygems.org" -gem "railties", "~> 5.1.0" +gem "railties", "~> 6.1.0" gemspec path: "../" diff --git a/rack-attack.gemspec b/rack-attack.gemspec index 34689a3..75ca531 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.1' + s.add_development_dependency 'railties', '>= 4.2', '< 6.2' end diff --git a/spec/acceptance/stores/active_support_redis_cache_store_pooled_spec.rb b/spec/acceptance/stores/active_support_redis_cache_store_pooled_spec.rb index 9c26e8d..fe95107 100644 --- a/spec/acceptance/stores/active_support_redis_cache_store_pooled_spec.rb +++ b/spec/acceptance/stores/active_support_redis_cache_store_pooled_spec.rb @@ -21,6 +21,6 @@ if should_run Rack::Attack.cache.store.clear end - it_works_for_cache_backed_features(fetch_from_store: ->(key) { Rack::Attack.cache.store.fetch(key) }) + it_works_for_cache_backed_features(fetch_from_store: ->(key) { Rack::Attack.cache.store.read(key) }) end end diff --git a/spec/acceptance/stores/active_support_redis_cache_store_spec.rb b/spec/acceptance/stores/active_support_redis_cache_store_spec.rb index f595ec2..a824ede 100644 --- a/spec/acceptance/stores/active_support_redis_cache_store_spec.rb +++ b/spec/acceptance/stores/active_support_redis_cache_store_spec.rb @@ -20,6 +20,6 @@ if should_run Rack::Attack.cache.store.clear end - it_works_for_cache_backed_features(fetch_from_store: ->(key) { Rack::Attack.cache.store.fetch(key) }) + it_works_for_cache_backed_features(fetch_from_store: ->(key) { Rack::Attack.cache.store.read(key) }) end end