A summary of data about the Ruby ecosystem.

https://github.com/resque/redis-namespace

This gem adds a Redis::Namespace class which can be used to namespace Redis keys.
https://github.com/resque/redis-namespace

Keywords from Contributors

activerecord mvc activejob rubygems background-jobs rack job-scheduler job-queue sinatra asynchronous-tasks

Last synced: about 22 hours ago
JSON representation

Repository metadata

This gem adds a Redis::Namespace class which can be used to namespace Redis keys.

README.md

redis-namespace

Redis::Namespace provides an interface to a namespaced subset of your redis keyspace (e.g., keys with a common beginning), and requires the redis-rb gem.

require 'redis-namespace'
# => true

redis_connection = Redis.new
# => #<Redis client v3.1.0 for redis://127.0.0.1:6379/0>
namespaced_redis = Redis::Namespace.new(:ns, redis: redis_connection)
# => #<Redis::Namespace v1.5.0 with client v3.1.0 for redis://127.0.0.1:6379/0/ns>

namespaced_redis.set('foo', 'bar') # redis_connection.set('ns:foo', 'bar')
# => "OK"

# Redis::Namespace automatically prepended our namespace to the key
# before sending it to our redis client.

namespaced_redis.get('foo')
# => "bar"
redis_connection.get('foo')
# => nil
redis_connection.get('ns:foo')
# => "bar"

namespaced_redis.del('foo')
# => 1
namespaced_redis.get('foo')
# => nil
redis_connection.get('ns:foo')
# => nil

Redis::Namespace also supports Proc as a namespace and will take the result string as namespace at runtime.

redis_connection = Redis.new
namespaced_redis = Redis::Namespace.new(Proc.new { Tenant.current_tenant }, redis: redis_connection)

Installation

Redis::Namespace is packaged as the redis-namespace gem, and hosted on rubygems.org.

From the command line:

$ gem install redis-namespace

Or in your Gemfile:

gem 'redis-namespace'

Caveats

Redis::Namespace provides a namespaced interface to Redis by keeping an internal registry of the method signatures in Redis provided by the redis-rb gem; we keep track of which arguments need the namespace added, and which return values need the namespace removed.

Blind Passthrough

If your version of this gem doesn't know about a particular command, it can't namespace it. Historically, this has meant that Redis::Namespace blindly passes unknown commands on to the underlying redis connection without modification which can lead to surprising effects.

As of v1.5.0, blind passthrough has been deprecated, and the functionality will be removed entirely in 2.0.

If you come across a command that is not yet supported, please open an issue on the issue tracker or submit a pull-request.

Administrative Commands

The effects of some redis commands cannot be limited to a particular namespace (e.g., FLUSHALL, which literally truncates all databases in your redis server, regardless of keyspace). Historically, this has meant that Redis::Namespace intentionally passes administrative commands on to the underlying redis connection without modification, which can lead to surprising effects.

As of v1.6.0, the direct use of administrative commands has been deprecated, and the functionality will be removed entirely in 2.0; while such commands are often useful for testing or administration, their meaning is inherently hidden when placed behind an interface that implies it will namespace everything.

The prefered way to send an administrative command is on the redis connection itself, which is publicly exposed as Redis::Namespace#redis:

namespaced.redis.flushall()
# => "OK"

2.x Planned Breaking Changes

As mentioned above, 2.0 will remove blind passthrough and the administrative command passthrough.
By default in 1.5+, deprecation warnings are present and enabled;
they can be silenced by initializing Redis::Namespace with warning: false or by setting the REDIS_NAMESPACE_QUIET environment variable.

Early opt-in

To enable testing against the 2.x interface before its release, in addition to deprecation warnings, early opt-in to these changes can be enabled by initializing Redis::Namespace with deprecations: true or by setting the REDIS_NAMESPACE_DEPRECATIONS environment variable.
This should only be done once all warnings have been addressed.

Authors

While there are many authors who have contributed to this project, the following have done so on an ongoing basis with at least 5 commits:

  • Chris Wanstrath (@defunkt)
  • Ryan Biesemeyer (@yaauie)
  • Steve Klabnik (@steveklabnik)
  • Terence Lee (@hone)
  • Eoin Coffey (@ecoffey)

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 2 days ago

Total Commits: 261
Total Committers: 104
Avg Commits per committer: 2.51
Development Distribution Score (DDS): 0.824

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Chris Wanstrath c****s@o****g 46
Ryan Biesemeyer r****n@s****m 45
Terence Lee h****2@g****m 11
ota42y o****y@g****m 10
Steve Klabnik s****e@s****m 7
Stefan Budeanu s****u@s****m 5
Jean Boussier j****r@g****m 5
Łukasz Strzałkowski l****i@g****m 4
Rafael Mendonça França r****l@f****v 4
Nicholas La Roux l****n@g****m 4
Carl Zulauf c****l@l****m 4
Menno van der Sman m****o@w****m 4
David Czarnecki c****d@a****g 4
fatkodima f****3@g****m 3
Caius Durling d****v@c****e 3
Adam Mckaig a****g@g****m 3
j-wilkins p****y@m****m 3
anothermh a****h 2
Patrick Tulskie p****e@g****m 2
Michael Bianco i****y@g****m 2
Jakub Suder j****r@g****m 2
Galen O'Hanlon g****n@p****m 2
Florian Weingarten f****o@h****e 2
Filip Tepper f****p@t****l 2
Denis Tataurov s****s@m****u 2
Todd Thomas t****s@o****m 2
Andrii Dmytrenko a****i@f****m 1
Aliaksandr Buhayeu a****u@g****m 1
Alexey Zapparov i****i@m****g 1
Alexander Kahn a****n@g****m 1
and 74 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 17 days ago

Total issues: 35
Total pull requests: 80
Average time to close issues: 10 months
Average time to close pull requests: 9 months
Total issue authors: 34
Total pull request authors: 65
Average comments per issue: 2.69
Average comments per pull request: 1.46
Merged pull request: 55
Bot issues: 0
Bot pull requests: 2

Past year issues: 0
Past year pull requests: 2
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/resque/redis-namespace

Top Issue Authors

  • mperham (2)
  • Ghanimaid (1)
  • everaldo (1)
  • mhenrixon (1)
  • vannicktrinquier (1)
  • ytaben (1)
  • librato-peter (1)
  • Marcellllll (1)
  • pravi (1)
  • Nerian (1)
  • bnymn (1)
  • Buk1m (1)
  • ArturT (1)
  • djanowski (1)
  • ThomasKoppensteiner (1)

Top Pull Request Authors

  • casperisfine (4)
  • larouxn (3)
  • fatkodima (3)
  • jbmeerkat (2)
  • dependabot[bot] (2)
  • amatsuda (2)
  • PatrickTulskie (2)
  • francois-ferrandis (2)
  • quentinvernot (2)
  • ota42y (2)
  • maximebedard (2)
  • danlo (1)
  • aliaksandrb (1)
  • pdamer (1)
  • pedrofurtado (1)

Top Issue Labels

Top Pull Request Labels

  • dependencies (2)
  • github_actions (2)

Package metadata

gem.coop: redis-namespace

Adds a Redis::Namespace class which can be used to namespace calls to Redis. This is useful when using a single instance of Redis with multiple, different applications.

rubygems.org: redis-namespace

Adds a Redis::Namespace class which can be used to namespace calls to Redis. This is useful when using a single instance of Redis with multiple, different applications.

proxy.golang.org: github.com/resque/redis-namespace

ubuntu-22.04: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Licenses:
  • Latest release: 1.8.1-1 (published 18 days ago)
  • Last Synced: 2026-02-13T13:24:30.716Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.04: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Licenses:
  • Latest release: 1.11.0-1 (published 25 days ago)
  • Last Synced: 2026-02-06T15:56:18.092Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-23.04: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Licenses:
  • Latest release: 1.9.0-1 (published 20 days ago)
  • Last Synced: 2026-02-11T06:48:22.213Z (20 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-20.04: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Licenses:
  • Latest release: 1.7.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T07:21:37.869Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-11: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Documentation: https://packages.debian.org/bullseye/ruby-redis-namespace
  • Licenses:
  • Latest release: 1.7.0-1 (published 20 days ago)
  • Last Synced: 2026-02-13T08:24:17.462Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.10: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Licenses:
  • Latest release: 1.9.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T18:31:22.279Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Licenses:
  • Latest release: 1.11.0-1 (published 22 days ago)
  • Last Synced: 2026-02-09T17:09:09.462Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-10: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Documentation: https://packages.debian.org/buster/ruby-redis-namespace
  • Licenses:
  • Latest release: 1.6.0-1 (published 20 days ago)
  • Last Synced: 2026-02-13T04:25:07.677Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Documentation: https://packages.debian.org/bookworm/ruby-redis-namespace
  • Licenses:
  • Latest release: 1.9.0-1 (published 18 days ago)
  • Last Synced: 2026-02-12T23:39:26.080Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-13: ruby-redis-namespace

  • Homepage: https://github.com/resque/redis-namespace
  • Documentation: https://packages.debian.org/trixie/ruby-redis-namespace
  • Licenses:
  • Latest release: 1.11.0-2 (published 19 days ago)
  • Last Synced: 2026-02-13T13:19:03.534Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Dependencies

Gemfile rubygems
  • rubysl-cgi >= 0
  • rubysl-logger >= 0
  • rubysl-net-http >= 0
  • rubysl-socket >= 0
  • rubysl-stringio >= 0
  • rubysl-timeout >= 0
  • rubysl-uri >= 0
  • rubysl-zlib >= 0
redis-namespace.gemspec rubygems
  • rake >= 0 development
  • rspec ~> 3.7 development
  • rspec-its >= 0 development
  • redis >= 3.0.4
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • ruby/setup-ruby v1 composite
  • redis * docker
.github/workflows/codeql.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite

Score: 32.2322550286955