redis-classy 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +12 -0
- data/lib/redis/classy/version.rb +1 -1
- data/lib/redis/classy.rb +7 -6
- data/redis-classy.gemspec +3 -0
- metadata +16 -20
data/.travis.yml
ADDED
data/lib/redis/classy/version.rb
CHANGED
data/lib/redis/classy.rb
CHANGED
@@ -4,16 +4,17 @@ class Redis
|
|
4
4
|
attr_accessor :db
|
5
5
|
|
6
6
|
def inherited(subclass)
|
7
|
-
subclass.db = Redis::Namespace.new(subclass.name, :redis => Redis::Classy.db)
|
7
|
+
subclass.db = Redis::Namespace.new(subclass.name, :redis => Redis::Classy.db) if Redis::Classy.db
|
8
8
|
end
|
9
9
|
|
10
10
|
def method_missing(method_name, *args, &block)
|
11
|
-
|
11
|
+
db.send(method_name, *args, &block)
|
12
12
|
end
|
13
13
|
|
14
14
|
Redis::Namespace::COMMANDS.keys.each do |key|
|
15
|
-
define_method(key) do |*args|
|
16
|
-
|
15
|
+
define_method(key) do |*args, &block|
|
16
|
+
raise 'Redis::Classy.db is not assigned' unless db
|
17
|
+
db.send(key, *args, &block)
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
@@ -21,11 +22,11 @@ class Redis
|
|
21
22
|
attr_accessor :key
|
22
23
|
|
23
24
|
def initialize(key)
|
24
|
-
|
25
|
+
@key = key
|
25
26
|
end
|
26
27
|
|
27
28
|
def method_missing(method_name, *args, &block)
|
28
|
-
self.class.send(method_name,
|
29
|
+
self.class.send(method_name, key, *args, &block)
|
29
30
|
end
|
30
31
|
end
|
31
32
|
end
|
data/redis-classy.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-classy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis-namespace
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70184551488360 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,15 +21,10 @@ dependencies:
|
|
21
21
|
version: '1.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.0'
|
24
|
+
version_requirements: *70184551488360
|
30
25
|
- !ruby/object:Gem::Dependency
|
31
26
|
name: rspec
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &70184551487720 !ruby/object:Gem::Requirement
|
33
28
|
none: false
|
34
29
|
requirements:
|
35
30
|
- - ! '>='
|
@@ -37,15 +32,10 @@ dependencies:
|
|
37
32
|
version: '0'
|
38
33
|
type: :development
|
39
34
|
prerelease: false
|
40
|
-
version_requirements:
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
35
|
+
version_requirements: *70184551487720
|
46
36
|
- !ruby/object:Gem::Dependency
|
47
37
|
name: bundler
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &70184551485580 !ruby/object:Gem::Requirement
|
49
39
|
none: false
|
50
40
|
requirements:
|
51
41
|
- - ! '>='
|
@@ -53,12 +43,18 @@ dependencies:
|
|
53
43
|
version: '0'
|
54
44
|
type: :development
|
55
45
|
prerelease: false
|
56
|
-
version_requirements:
|
46
|
+
version_requirements: *70184551485580
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: &70184551502420 !ruby/object:Gem::Requirement
|
57
50
|
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70184551502420
|
62
58
|
description: Class-style namespace prefixing for Redis
|
63
59
|
email:
|
64
60
|
- kenn.ejima@gmail.com
|
@@ -68,6 +64,7 @@ extra_rdoc_files: []
|
|
68
64
|
files:
|
69
65
|
- .gitignore
|
70
66
|
- .rspec
|
67
|
+
- .travis.yml
|
71
68
|
- Gemfile
|
72
69
|
- LICENSE
|
73
70
|
- README.md
|
@@ -98,11 +95,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
95
|
version: '0'
|
99
96
|
requirements: []
|
100
97
|
rubyforge_project:
|
101
|
-
rubygems_version: 1.8.
|
98
|
+
rubygems_version: 1.8.17
|
102
99
|
signing_key:
|
103
100
|
specification_version: 3
|
104
101
|
summary: Class-style namespace prefixing for Redis
|
105
102
|
test_files:
|
106
103
|
- spec/redis_classy_spec.rb
|
107
104
|
- spec/spec_helper.rb
|
108
|
-
has_rdoc:
|