mirror of
https://github.com/samsonjs/rack-attack.git
synced 2026-03-25 09:25:49 +00:00
parent
427fdfabbc
commit
0d40ea6538
7 changed files with 91 additions and 2 deletions
27
.github/workflows/build.yml
vendored
27
.github/workflows/build.yml
vendored
|
|
@ -28,6 +28,7 @@ jobs:
|
||||||
gemfile:
|
gemfile:
|
||||||
- rack_3
|
- rack_3
|
||||||
- rack_2
|
- rack_2
|
||||||
|
- rails_7_2
|
||||||
- rails_7_1
|
- rails_7_1
|
||||||
- rails_7_0
|
- rails_7_0
|
||||||
- rails_6_1
|
- rails_6_1
|
||||||
|
|
@ -38,6 +39,8 @@ jobs:
|
||||||
- redis_5
|
- redis_5
|
||||||
- redis_4
|
- redis_4
|
||||||
- connection_pool_dalli
|
- connection_pool_dalli
|
||||||
|
- active_support_7_2_redis_cache_store
|
||||||
|
- active_support_7_2_redis_cache_store_pooled
|
||||||
- active_support_7_1_redis_cache_store
|
- active_support_7_1_redis_cache_store
|
||||||
- active_support_7_1_redis_cache_store_pooled
|
- active_support_7_1_redis_cache_store_pooled
|
||||||
- active_support_7_0_redis_cache_store
|
- active_support_7_0_redis_cache_store
|
||||||
|
|
@ -104,6 +107,30 @@ jobs:
|
||||||
ruby: '2.6'
|
ruby: '2.6'
|
||||||
- gemfile: active_support_7_1_redis_cache_store_pooled
|
- gemfile: active_support_7_1_redis_cache_store_pooled
|
||||||
ruby: '2.5'
|
ruby: '2.5'
|
||||||
|
- gemfile: rails_7_2
|
||||||
|
ruby: '3.0'
|
||||||
|
- gemfile: rails_7_2
|
||||||
|
ruby: '2.7'
|
||||||
|
- gemfile: rails_7_2
|
||||||
|
ruby: '2.6'
|
||||||
|
- gemfile: rails_7_2
|
||||||
|
ruby: '2.5'
|
||||||
|
- gemfile: active_support_7_2_redis_cache_store
|
||||||
|
ruby: '3.0'
|
||||||
|
- gemfile: active_support_7_2_redis_cache_store
|
||||||
|
ruby: '2.7'
|
||||||
|
- gemfile: active_support_7_2_redis_cache_store
|
||||||
|
ruby: '2.6'
|
||||||
|
- gemfile: active_support_7_2_redis_cache_store
|
||||||
|
ruby: '2.5'
|
||||||
|
- gemfile: active_support_7_2_redis_cache_store_pooled
|
||||||
|
ruby: '3.0'
|
||||||
|
- gemfile: active_support_7_2_redis_cache_store_pooled
|
||||||
|
ruby: '2.7'
|
||||||
|
- gemfile: active_support_7_2_redis_cache_store_pooled
|
||||||
|
ruby: '2.6'
|
||||||
|
- gemfile: active_support_7_2_redis_cache_store_pooled
|
||||||
|
ruby: '2.5'
|
||||||
env:
|
env:
|
||||||
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
15
Appraisals
15
Appraisals
|
|
@ -8,6 +8,10 @@ appraise "rack_2" do
|
||||||
gem "rack", "~> 2.0"
|
gem "rack", "~> 2.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
appraise 'rails_7-2' do
|
||||||
|
gem 'railties', '~> 7.2.0'
|
||||||
|
end
|
||||||
|
|
||||||
appraise 'rails_7-1' do
|
appraise 'rails_7-1' do
|
||||||
gem 'railties', '~> 7.1.0'
|
gem 'railties', '~> 7.1.0'
|
||||||
end
|
end
|
||||||
|
|
@ -49,6 +53,17 @@ appraise "connection_pool_dalli" do
|
||||||
gem "dalli", "~> 3.0"
|
gem "dalli", "~> 3.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
appraise "active_support_7-2_redis_cache_store" do
|
||||||
|
gem "activesupport", "~> 7.2.0"
|
||||||
|
gem "redis", "~> 5.0"
|
||||||
|
end
|
||||||
|
|
||||||
|
appraise "active_support_7-2_redis_cache_store_pooled" do
|
||||||
|
gem "activesupport", "~> 7.2.0"
|
||||||
|
gem "connection_pool", "~> 2.2"
|
||||||
|
gem "redis", "~> 5.0"
|
||||||
|
end
|
||||||
|
|
||||||
appraise "active_support_7-1_redis_cache_store" do
|
appraise "active_support_7-1_redis_cache_store" do
|
||||||
gem "activesupport", "~> 7.1.0"
|
gem "activesupport", "~> 7.1.0"
|
||||||
gem "redis", "~> 5.0"
|
gem "redis", "~> 5.0"
|
||||||
|
|
|
||||||
13
gemfiles/active_support_7_2_redis_cache_store.gemfile
Normal file
13
gemfiles/active_support_7_2_redis_cache_store.gemfile
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# This file was generated by Appraisal
|
||||||
|
|
||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
gem "activesupport", "~> 7.2.0"
|
||||||
|
gem "redis", "~> 5.0"
|
||||||
|
|
||||||
|
group :maintenance, optional: true do
|
||||||
|
gem "bake"
|
||||||
|
gem "bake-gem"
|
||||||
|
end
|
||||||
|
|
||||||
|
gemspec path: "../"
|
||||||
14
gemfiles/active_support_7_2_redis_cache_store_pooled.gemfile
Normal file
14
gemfiles/active_support_7_2_redis_cache_store_pooled.gemfile
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# This file was generated by Appraisal
|
||||||
|
|
||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
gem "activesupport", "~> 7.2.0"
|
||||||
|
gem "connection_pool", "~> 2.2"
|
||||||
|
gem "redis", "~> 5.0"
|
||||||
|
|
||||||
|
group :maintenance, optional: true do
|
||||||
|
gem "bake"
|
||||||
|
gem "bake-gem"
|
||||||
|
end
|
||||||
|
|
||||||
|
gemspec path: "../"
|
||||||
12
gemfiles/rails_7_2.gemfile
Normal file
12
gemfiles/rails_7_2.gemfile
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
# This file was generated by Appraisal
|
||||||
|
|
||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
gem "railties", "~> 7.2.0"
|
||||||
|
|
||||||
|
group :maintenance, optional: true do
|
||||||
|
gem "bake"
|
||||||
|
gem "bake-gem"
|
||||||
|
end
|
||||||
|
|
||||||
|
gemspec path: "../"
|
||||||
|
|
@ -7,7 +7,11 @@ if defined?(::ConnectionPool) && defined?(::Dalli)
|
||||||
|
|
||||||
describe "ActiveSupport::Cache::MemCacheStore (pooled) as a cache backend" do
|
describe "ActiveSupport::Cache::MemCacheStore (pooled) as a cache backend" do
|
||||||
before do
|
before do
|
||||||
Rack::Attack.cache.store = ActiveSupport::Cache::MemCacheStore.new(pool_size: 2)
|
Rack::Attack.cache.store = if ActiveSupport.gem_version >= Gem::Version.new("7.2.0")
|
||||||
|
ActiveSupport::Cache::MemCacheStore.new(pool: true)
|
||||||
|
else
|
||||||
|
ActiveSupport::Cache::MemCacheStore.new(pool_size: 2)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,11 @@ if should_run
|
||||||
|
|
||||||
describe "ActiveSupport::Cache::RedisCacheStore (pooled) as a cache backend" do
|
describe "ActiveSupport::Cache::RedisCacheStore (pooled) as a cache backend" do
|
||||||
before do
|
before do
|
||||||
Rack::Attack.cache.store = ActiveSupport::Cache::RedisCacheStore.new(pool_size: 2)
|
Rack::Attack.cache.store = if ActiveSupport.gem_version >= Gem::Version.new("7.2.0")
|
||||||
|
ActiveSupport::Cache::RedisCacheStore.new(pool: true)
|
||||||
|
else
|
||||||
|
ActiveSupport::Cache::RedisCacheStore.new(pool_size: 2)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue