redis-namespace 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of redis-namespace might be problematic. Click here for more details.
- data/Rakefile +4 -1
- data/lib/redis/namespace.rb +3 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
task :default => :spec
|
2
2
|
task :test => :spec
|
3
3
|
|
4
|
+
desc "Build a gem"
|
5
|
+
task :gem => [ :gemspec, :build ]
|
6
|
+
|
4
7
|
desc "Run specs"
|
5
8
|
task :spec do
|
6
9
|
exec "spec spec/redis_spec.rb"
|
@@ -14,7 +17,7 @@ begin
|
|
14
17
|
gemspec.email = "chris@ozmm.org"
|
15
18
|
gemspec.homepage = "http://github.com/defunkt/redis-namespace"
|
16
19
|
gemspec.authors = ["Chris Wanstrath"]
|
17
|
-
gemspec.version = '0.4.
|
20
|
+
gemspec.version = '0.4.1'
|
18
21
|
gemspec.add_dependency 'redis'
|
19
22
|
gemspec.description = <<description
|
20
23
|
Adds a Redis::Namespace class which can be used to namespace calls
|
data/lib/redis/namespace.rb
CHANGED
@@ -124,6 +124,8 @@ class Redis
|
|
124
124
|
"[]=" => [ :first ]
|
125
125
|
}
|
126
126
|
|
127
|
+
# support previous versions of redis gem
|
128
|
+
ALIASES = defined? Redis::Client ? Redis::Client::ALIASES : Redis::ALIASES
|
127
129
|
|
128
130
|
attr_accessor :namespace
|
129
131
|
|
@@ -140,7 +142,7 @@ class Redis
|
|
140
142
|
|
141
143
|
def method_missing(command, *args, &block)
|
142
144
|
(before, after) = COMMANDS[command.to_s] ||
|
143
|
-
COMMANDS[
|
145
|
+
COMMANDS[ALIASES[command.to_s]]
|
144
146
|
|
145
147
|
# Add the namespace to any parameters that are keys.
|
146
148
|
case before
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-namespace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-04-05 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|