Skip to content

Commit 96d54e5

Browse files
authored
Replace abandoned fakeredis with real redis, upgrade redis-rb to 5.x (#22)
fakeredis is unmaintained (last release 0.9.2, 2023) and hard-pins redis ~> 4.8, which kept redis-rb stuck at 4.8.1 across every Dependabot bump. Drop it in favor of testing against a real redis server. - Remove fakeredis from the Gemfile and the spec/support stub - Relock: redis 4.8.1 -> 5.4.1 (pulls in redis-client) - Add a redis service to the CI test_and_lint job, since fakeredis was previously the only reason specs passed without a server Specs need no changes: redis-rb 5 connects lazily, so type assertions and verify!/quit work against the live server.
1 parent a5c4148 commit 96d54e5

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ jobs:
1717
env:
1818
BUNDLE_GEMFILE: Gemfile
1919
name: "Test and lint: Ruby ${{ matrix.ruby }}"
20+
services:
21+
redis:
22+
image: redis
23+
ports:
24+
- 6379:6379
25+
options: >-
26+
--health-cmd "redis-cli ping"
27+
--health-interval 10s
28+
--health-timeout 5s
29+
--health-retries 5
2030
steps:
2131
- uses: actions/checkout@v4
2232
- name: Set up Ruby ${{ matrix.ruby }}

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ gemspec
88
gem "rake"
99
gem "rspec"
1010
gem "standard"
11-
gem "fakeredis"
1211
gem "connection_pool"

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ GEM
4848
diff-lcs (1.6.2)
4949
drb (2.2.3)
5050
erubi (1.12.0)
51-
fakeredis (0.9.2)
52-
redis (~> 4.8)
5351
i18n (1.15.2)
5452
concurrent-ruby (~> 1.0)
5553
io-console (0.7.2)
@@ -116,7 +114,10 @@ GEM
116114
rake (13.4.2)
117115
rdoc (6.6.3.1)
118116
psych (>= 4.0.0)
119-
redis (4.8.1)
117+
redis (5.4.1)
118+
redis-client (>= 0.22.0)
119+
redis-client (0.30.0)
120+
connection_pool
120121
regexp_parser (2.12.0)
121122
reline (0.5.7)
122123
io-console (~> 0.5)
@@ -189,7 +190,6 @@ PLATFORMS
189190
DEPENDENCIES
190191
bigrails-redis!
191192
connection_pool
192-
fakeredis
193193
rake
194194
rspec
195195
standard

spec/support/fakeredis.rb

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)