Skip to content

Replace abandoned fakeredis with real redis, upgrade redis-rb to 5.x#22

Merged
dduugg merged 1 commit into
mainfrom
upgrade-redis-5
Jun 30, 2026
Merged

Replace abandoned fakeredis with real redis, upgrade redis-rb to 5.x#22
dduugg merged 1 commit into
mainfrom
upgrade-redis-5

Conversation

@dduugg

@dduugg dduugg commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What & why

fakeredis is unmaintained — its last release (0.9.2, May 2023) hard-pins redis ~> 4.8, which is why every Dependabot bump (including #19) left redis stuck at 4.8.1 while it moved everything else. There is no fakeredis release that supports redis-rb 5, so this replaces it rather than upgrading it.

The specs never exercised fakeredis's in-memory data store — they only assert connection types and call verify!/quit. So this switches the test suite to a real redis server, which is what the gem actually ships against.

Changes

  • Remove fakeredis from the Gemfile and delete the spec/support/fakeredis.rb global stub
  • Relock: redis 4.8.1 → 5.4.1 (pulls in redis-client)
  • Add a redis service to the CI test_and_lint job — fakeredis was previously the only reason specs passed without a server

Notes

  • The gemspec still declares redis ">= 4", so downstream apps on redis 4 are not forced to upgrade — this only advances the dev/test lock.
  • Specs required no rewrite: redis-rb 5 connects lazily, so type assertions and verify!/quit work against the live server.

Verification

  • bundle exec rake → 10 examples, 0 failures (run against a local redis)
  • bundle exec standardrb → clean

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.
@dduugg dduugg requested a review from a team as a code owner June 30, 2026 17:42
@dduugg dduugg merged commit 96d54e5 into main Jun 30, 2026
3 checks passed
@dduugg dduugg deleted the upgrade-redis-5 branch June 30, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant