mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-04-27 15:07:41 +00:00
test: update ruby and rails versions
This commit is contained in:
parent
e40c3dda44
commit
55d5e370fd
8 changed files with 28 additions and 22 deletions
26
.travis.yml
26
.travis.yml
|
|
@ -3,11 +3,11 @@ language: ruby
|
||||||
cache: bundler
|
cache: bundler
|
||||||
|
|
||||||
rvm:
|
rvm:
|
||||||
- ruby-head
|
- 3.0.0
|
||||||
- 2.7.1
|
- 2.7.2
|
||||||
- 2.6.6
|
- 2.6.6
|
||||||
- 2.5.8
|
- 2.5.8
|
||||||
- 2.4.10
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- yes | gem update --system
|
- yes | gem update --system
|
||||||
|
|
@ -16,9 +16,9 @@ before_install:
|
||||||
gemfile:
|
gemfile:
|
||||||
- gemfiles/rack_2.gemfile
|
- gemfiles/rack_2.gemfile
|
||||||
- gemfiles/rack_1.gemfile
|
- gemfiles/rack_1.gemfile
|
||||||
|
- gemfiles/rails_6_1.gemfile
|
||||||
- gemfiles/rails_6_0.gemfile
|
- gemfiles/rails_6_0.gemfile
|
||||||
- gemfiles/rails_5_2.gemfile
|
- gemfiles/rails_5_2.gemfile
|
||||||
- gemfiles/rails_5_1.gemfile
|
|
||||||
- gemfiles/rails_4_2.gemfile
|
- gemfiles/rails_4_2.gemfile
|
||||||
- gemfiles/dalli2.gemfile
|
- gemfiles/dalli2.gemfile
|
||||||
- gemfiles/redis_4.gemfile
|
- gemfiles/redis_4.gemfile
|
||||||
|
|
@ -30,15 +30,21 @@ gemfile:
|
||||||
- gemfiles/active_support_redis_store.gemfile
|
- gemfiles/active_support_redis_store.gemfile
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
|
||||||
- rvm: ruby-head
|
|
||||||
exclude:
|
exclude:
|
||||||
- gemfile: gemfiles/rack_1.gemfile
|
- 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
|
- gemfile: gemfiles/rails_4_2.gemfile
|
||||||
rvm: 2.7.1
|
rvm: 3.0.0
|
||||||
- gemfile: gemfiles/rails_6_0.gemfile
|
- gemfile: gemfiles/dalli2.gemfile
|
||||||
rvm: 2.4.10
|
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
|
fast_finish: true
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
|
||||||
12
Appraisals
12
Appraisals
|
|
@ -17,6 +17,10 @@ appraise "rack_1" do
|
||||||
gem "rack-test", ">= 0.6"
|
gem "rack-test", ">= 0.6"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
appraise 'rails_6-1' do
|
||||||
|
gem 'railties', '~> 6.1.0'
|
||||||
|
end
|
||||||
|
|
||||||
appraise 'rails_6-0' do
|
appraise 'rails_6-0' do
|
||||||
gem 'railties', '~> 6.0.0'
|
gem 'railties', '~> 6.0.0'
|
||||||
end
|
end
|
||||||
|
|
@ -25,10 +29,6 @@ appraise 'rails_5-2' do
|
||||||
gem 'railties', '~> 5.2.0'
|
gem 'railties', '~> 5.2.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
appraise 'rails_5-1' do
|
|
||||||
gem 'railties', '~> 5.1.0'
|
|
||||||
end
|
|
||||||
|
|
||||||
appraise 'rails_4-2' do
|
appraise 'rails_4-2' do
|
||||||
gem 'railties', '~> 4.2.0'
|
gem 'railties', '~> 4.2.0'
|
||||||
|
|
||||||
|
|
@ -55,12 +55,12 @@ appraise "connection_pool_dalli" do
|
||||||
end
|
end
|
||||||
|
|
||||||
appraise "active_support_redis_cache_store" do
|
appraise "active_support_redis_cache_store" do
|
||||||
gem "activesupport", "~> 5.2.0"
|
gem "activesupport", "~> 6.1.0"
|
||||||
gem "redis", "~> 4.0"
|
gem "redis", "~> 4.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
appraise "active_support_redis_cache_store_pooled" do
|
appraise "active_support_redis_cache_store_pooled" do
|
||||||
gem "activesupport", "~> 5.2.0"
|
gem "activesupport", "~> 6.1.0"
|
||||||
gem "connection_pool", "~> 2.2"
|
gem "connection_pool", "~> 2.2"
|
||||||
gem "redis", "~> 4.0"
|
gem "redis", "~> 4.0"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "activesupport", "~> 5.2.0"
|
gem "activesupport", "~> 6.1.0"
|
||||||
gem "redis", "~> 4.0"
|
gem "redis", "~> 4.0"
|
||||||
|
|
||||||
gemspec path: "../"
|
gemspec path: "../"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "activesupport", "~> 5.2.0"
|
gem "activesupport", "~> 6.1.0"
|
||||||
gem "connection_pool", "~> 2.2"
|
gem "connection_pool", "~> 2.2"
|
||||||
gem "redis", "~> 4.0"
|
gem "redis", "~> 4.0"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "railties", "~> 5.1.0"
|
gem "railties", "~> 6.1.0"
|
||||||
|
|
||||||
gemspec path: "../"
|
gemspec path: "../"
|
||||||
|
|
@ -46,5 +46,5 @@ Gem::Specification.new do |s|
|
||||||
s.add_development_dependency 'byebug', '~> 11.0'
|
s.add_development_dependency 'byebug', '~> 11.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
s.add_development_dependency 'railties', '>= 4.2', '< 6.1'
|
s.add_development_dependency 'railties', '>= 4.2', '< 6.2'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,6 @@ if should_run
|
||||||
Rack::Attack.cache.store.clear
|
Rack::Attack.cache.store.clear
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,6 @@ if should_run
|
||||||
Rack::Attack.cache.store.clear
|
Rack::Attack.cache.store.clear
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue