Skip to content

Commit

Permalink
Remove support for unmaintained ActiveSupport::Cache::RedisStore (#625)
Browse files Browse the repository at this point in the history
* remove support for unmaintained ActiveSupport::Cache::RedisStore

* ci: removes active_support_redis_store matrix job

* test: removes unecessary redis-activesupport require

* test: removes dead code

* fix typo

---------

Co-authored-by: Gonzalo <456459+grzuy@users.noreply.github.com>
  • Loading branch information
mitchellhenke and grzuy authored Oct 14, 2023
1 parent c9bd363 commit 9a7815c
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 88 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
- active_support_redis_cache_store
- active_support_redis_cache_store_pooled
- redis_store
- active_support_redis_store
exclude:
- gemfile: rack_1
ruby: 3.2.2
Expand Down
5 changes: 0 additions & 5 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,3 @@ end
appraise "redis_store" do
gem "redis-store", "~> 1.5"
end

appraise "active_support_redis_store" do
gem "redis-activesupport", "~> 5.0"
gem 'redis-store', '1.9.1' # remove after https://github.com/redis-store/redis-store/issues/358 is resolved
end
8 changes: 0 additions & 8 deletions gemfiles/active_support_redis_store.gemfile

This file was deleted.

1 change: 0 additions & 1 deletion lib/rack/attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
require 'rack/attack/store_proxy/redis_proxy'
require 'rack/attack/store_proxy/redis_store_proxy'
require 'rack/attack/store_proxy/redis_cache_store_proxy'
require 'rack/attack/store_proxy/active_support_redis_store_proxy'

require 'rack/attack/railtie' if defined?(::Rails)

Expand Down
39 changes: 0 additions & 39 deletions lib/rack/attack/store_proxy/active_support_redis_store_proxy.rb

This file was deleted.

20 changes: 0 additions & 20 deletions spec/acceptance/stores/active_support_redis_store_spec.rb

This file was deleted.

2 changes: 1 addition & 1 deletion spec/acceptance/stores/redis_store_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if defined?(::Redis::Store)
require "timecop"

describe "ActiveSupport::Cache::RedisStore as a cache backend" do
describe "Redis::Store as a cache backend" do
before do
Rack::Attack.cache.store = ::Redis::Store.new
end
Expand Down
12 changes: 0 additions & 12 deletions spec/integration/offline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@
end
end

if defined?(::ActiveSupport::Cache::RedisStore)
describe 'when Redis is offline' do
include OfflineExamples

before do
@cache = Rack::Attack::Cache.new
# Use presumably unused port for Redis client
@cache.store = ActiveSupport::Cache::RedisStore.new(host: '127.0.0.1', port: 3333)
end
end
end

if defined?(Redis) && defined?(ActiveSupport::Cache::RedisCacheStore) && Redis::VERSION >= '4'
describe 'when Redis is offline' do
include OfflineExamples
Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def safe_require(name)
safe_require "connection_pool"
safe_require "dalli"
safe_require "redis"
safe_require "redis-activesupport"
safe_require "redis-store"

class Minitest::Spec
Expand Down

0 comments on commit 9a7815c

Please sign in to comment.