redis-cache 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/active_support/cache/redis_store.rb +2 -2
- data/spec/redis_store_spec.rb +9 -0
- metadata +4 -4
data/History.txt
CHANGED
@@ -51,14 +51,14 @@ module ActiveSupport
|
|
51
51
|
values = {}
|
52
52
|
keys_to_names.keys.zip(raw_values).each do |key, value|
|
53
53
|
entry = deserialize_entry(value)
|
54
|
-
values[keys_to_names[key]] = entry.value unless entry.expired?
|
54
|
+
values[keys_to_names[key]] = entry.value unless entry.nil? || entry.expired?
|
55
55
|
end
|
56
56
|
values
|
57
57
|
end
|
58
58
|
|
59
59
|
protected
|
60
60
|
def read_entry(key, options)
|
61
|
-
deserialize_entry
|
61
|
+
deserialize_entry(@redis.get(key))
|
62
62
|
end
|
63
63
|
|
64
64
|
def write_entry(key, entry, options)
|
data/spec/redis_store_spec.rb
CHANGED
@@ -52,6 +52,15 @@ describe "ActiveSupport::Cache::RedisStore" do
|
|
52
52
|
store.read("abc").should == "test"
|
53
53
|
end
|
54
54
|
end
|
55
|
+
|
56
|
+
context "without any keys, #read_multi" do
|
57
|
+
before(:each) { store.clear }
|
58
|
+
subject { lambda { store.read_multi("a1", "a2", "a3") } }
|
59
|
+
|
60
|
+
it "should not raise any errors" do
|
61
|
+
should_not raise_error
|
62
|
+
end
|
63
|
+
end
|
55
64
|
|
56
65
|
context "with keys 'a1', 'a2', 'a3', #read_multi('a1', 'a2', 'a3')" do
|
57
66
|
before(:each) do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: redis-cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 6
|
5
|
-
version: 1.0.0.
|
5
|
+
version: 1.0.0.rc2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Anton Ageev
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-07-07 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -71,8 +71,8 @@ files:
|
|
71
71
|
- Rakefile
|
72
72
|
- lib/redis-cache.rb
|
73
73
|
- lib/active_support/cache/redis_store.rb
|
74
|
-
- spec/spec_helper.rb
|
75
74
|
- spec/redis_store_spec.rb
|
75
|
+
- spec/spec_helper.rb
|
76
76
|
homepage: https://github.com/antage/redis-cache
|
77
77
|
licenses: []
|
78
78
|
|
@@ -101,5 +101,5 @@ signing_key:
|
|
101
101
|
specification_version: 3
|
102
102
|
summary: ActiveSupport cache adapter for Redis
|
103
103
|
test_files:
|
104
|
-
- spec/spec_helper.rb
|
105
104
|
- spec/redis_store_spec.rb
|
105
|
+
- spec/spec_helper.rb
|