unified-redis 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,7 @@
1
- require 'unified_redis/core'
2
1
  require 'unified_redis/adapter'
3
2
 
4
3
  module UnifiedRedis
5
4
  def self.new(redis)
6
- Core.new(redis)
5
+ Adapter.get_adapter(redis)
7
6
  end
8
7
  end
@@ -5,7 +5,7 @@ module UnifiedRedis
5
5
  @redis = redis
6
6
  end
7
7
 
8
- def call(command, *args, &block)
8
+ def method_missing(command, *args, &block)
9
9
  @redis.send(command, *args, &block)
10
10
  end
11
11
  end
@@ -5,10 +5,10 @@ module UnifiedRedis
5
5
  @redis = redis
6
6
  end
7
7
 
8
- def call(command, *args)
9
- *result = @redis.send(command, *args)
10
- yield *result if block_given?
11
- return *result
8
+ def method_missing(command, *args)
9
+ result = @redis.send(command, *args)
10
+ yield result if block_given?
11
+ return result
12
12
  end
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module UnifiedRedis
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unified-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-10-24 00:00:00.000000000Z
13
+ date: 2011-10-25 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: eventmachine
17
- requirement: &13506000 !ruby/object:Gem::Requirement
17
+ requirement: &10035180 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.0.beta
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *13506000
25
+ version_requirements: *10035180
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
28
- requirement: &13539940 !ruby/object:Gem::Requirement
28
+ requirement: &10065000 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *13539940
36
+ version_requirements: *10065000
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec
39
- requirement: &13539480 !ruby/object:Gem::Requirement
39
+ requirement: &10064540 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *13539480
47
+ version_requirements: *10064540
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: redis
50
- requirement: &13539060 !ruby/object:Gem::Requirement
50
+ requirement: &10064120 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *13539060
58
+ version_requirements: *10064120
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: em-redis
61
- requirement: &13538640 !ruby/object:Gem::Requirement
61
+ requirement: &10063700 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *13538640
69
+ version_requirements: *10063700
70
70
  description: An unified redis interface for redis-rb and em-redis.
71
71
  email:
72
72
  - fdemetz@af83.com
@@ -80,7 +80,6 @@ files:
80
80
  - lib/unified_redis/adapter.rb
81
81
  - lib/unified_redis/adapters/emredis.rb
82
82
  - lib/unified_redis/adapters/redis.rb
83
- - lib/unified_redis/core.rb
84
83
  - lib/unified_redis/version.rb
85
84
  homepage: https://github.com/af83/unified-redis
86
85
  licenses: []
@@ -1,13 +0,0 @@
1
- module UnifiedRedis
2
- class Core
3
- def initialize(redis)
4
- @redis = redis
5
- @adapter = Adapter.get_adapter(redis)
6
- end
7
-
8
- def method_missing(command, *args, &block)
9
- #return unless @redis.respond_to?(command.to_sym)
10
- @adapter.call(command, *args, &block)
11
- end
12
- end
13
- end