redis-namespace 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of redis-namespace might be problematic. Click here for more details.

Files changed (3) hide show
  1. data/Rakefile +4 -1
  2. data/lib/redis/namespace.rb +3 -1
  3. 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.0'
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
@@ -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[Redis::ALIASES[command.to_s]]
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.0
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-03-29 00:00:00 -07:00
12
+ date: 2010-04-05 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency