From 8ec8f33f64eb261587b026af63f33568b1d2d438 Mon Sep 17 00:00:00 2001 From: Santiago Bartesaghi Date: Tue, 15 Oct 2024 12:01:19 -0300 Subject: [PATCH] Fix CI --- .../stores/active_support_mem_cache_store_pooled_spec.rb | 6 +++++- .../stores/active_support_redis_cache_store_pooled_spec.rb | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/spec/acceptance/stores/active_support_mem_cache_store_pooled_spec.rb b/spec/acceptance/stores/active_support_mem_cache_store_pooled_spec.rb index a04cedab..046919a7 100644 --- a/spec/acceptance/stores/active_support_mem_cache_store_pooled_spec.rb +++ b/spec/acceptance/stores/active_support_mem_cache_store_pooled_spec.rb @@ -7,7 +7,11 @@ describe "ActiveSupport::Cache::MemCacheStore (pooled) as a cache backend" 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 after do 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 3da658f6..29947381 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 @@ -13,7 +13,11 @@ describe "ActiveSupport::Cache::RedisCacheStore (pooled) as a cache backend" 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 after do