fakeredis 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fakeredis/version.rb +1 -1
- data/lib/redis/connection/memory.rb +4 -5
- metadata +7 -9
data/lib/fakeredis/version.rb
CHANGED
@@ -8,12 +8,12 @@ class Redis
|
|
8
8
|
# associated with each key
|
9
9
|
class ExpiringHash < Hash
|
10
10
|
attr_reader :expires
|
11
|
-
|
11
|
+
|
12
12
|
def initialize(*)
|
13
13
|
super
|
14
14
|
@expires = {}
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
def [](key)
|
18
18
|
delete(key) if expired?(key)
|
19
19
|
super
|
@@ -58,13 +58,14 @@ class Redis
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
61
|
-
|
61
|
+
|
62
62
|
include Redis::Connection::CommandHelper
|
63
63
|
|
64
64
|
def initialize
|
65
65
|
@data = ExpiringHash.new
|
66
66
|
@connected = false
|
67
67
|
@replies = []
|
68
|
+
@buffer = nil
|
68
69
|
end
|
69
70
|
|
70
71
|
def connected?
|
@@ -578,8 +579,6 @@ class Redis
|
|
578
579
|
@data[key].key?(field)
|
579
580
|
end
|
580
581
|
|
581
|
-
def monitor ; end
|
582
|
-
|
583
582
|
def sync ; end
|
584
583
|
|
585
584
|
def [](key)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fakeredis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-08-
|
13
|
-
default_executable:
|
12
|
+
date: 2011-08-23 00:00:00.000000000Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: redis
|
17
|
-
requirement: &
|
16
|
+
requirement: &70228508905360 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
19
|
- - ~>
|
@@ -22,10 +21,10 @@ dependencies:
|
|
22
21
|
version: 2.2.0
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *70228508905360
|
26
25
|
- !ruby/object:Gem::Dependency
|
27
26
|
name: rspec
|
28
|
-
requirement: &
|
27
|
+
requirement: &70228508904840 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
29
|
requirements:
|
31
30
|
- - ! '>='
|
@@ -33,7 +32,7 @@ dependencies:
|
|
33
32
|
version: 2.0.0
|
34
33
|
type: :development
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
35
|
+
version_requirements: *70228508904840
|
37
36
|
description: Fake (In-memory) driver for redis-rb. Useful for testing environment
|
38
37
|
and machines without Redis.
|
39
38
|
email:
|
@@ -64,7 +63,6 @@ files:
|
|
64
63
|
- spec/spec_helper.rb
|
65
64
|
- spec/strings_spec.rb
|
66
65
|
- spec/transactions_spec.rb
|
67
|
-
has_rdoc: true
|
68
66
|
homepage: https://github.com/guilleiguaran/fakeredis
|
69
67
|
licenses: []
|
70
68
|
post_install_message:
|
@@ -85,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
83
|
version: '0'
|
86
84
|
requirements: []
|
87
85
|
rubyforge_project: fakeredis
|
88
|
-
rubygems_version: 1.
|
86
|
+
rubygems_version: 1.8.7
|
89
87
|
signing_key:
|
90
88
|
specification_version: 3
|
91
89
|
summary: Fake (In-memory) driver for redis-rb.
|