fault_tolerant_redis-activesupport 4.0.3 → 4.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25fe6d2b051a9367bb775780109fb9ce826fc019
|
4
|
+
data.tar.gz: 21b0163fd832ab3fb61785ea2e130e2dc7c6229e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ce0f4833aace4b1ec410f6046a7e98ad6d18203a5091e9c5561853c79de64657fb84711969c38610f3735f2c2b8fb8574371148d387e64e90f26ba739ef5f35
|
7
|
+
data.tar.gz: be1e3dc0ae3a862c5708be1184f6220223b022cf7a2da5b4894602fd180796c11f0e0028cf8881d964691d91ce9edc8c1b0df020920f083c6069a905a8b69e87
|
@@ -4,10 +4,10 @@ require 'redis/activesupport/version'
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'fault_tolerant_redis-activesupport'
|
7
|
-
s.version = '4.0.
|
8
|
-
s.authors = ['Luca Guidi', 'Jan Renra Gloser']
|
9
|
-
s.email = ['me@lucaguidi.com', 'jan.renra.gloser@gmail.com']
|
10
|
-
s.homepage = 'https://github.com/
|
7
|
+
s.version = '4.0.4'
|
8
|
+
s.authors = ['Luca Guidi', 'Jan Renra Gloser', 'Roman Sklenar']
|
9
|
+
s.email = ['me@lucaguidi.com', 'jan.renra.gloser@gmail.com', 'roman@globalwebindex.net']
|
10
|
+
s.homepage = 'https://github.com/globalwebindex/redis-activesupport'
|
11
11
|
s.summary = %q{Fault tolerant redis store for ActiveSupport}
|
12
12
|
s.description = %q{Fault tolerant redis store for ActiveSupport}
|
13
13
|
s.license = 'MIT'
|
@@ -30,4 +30,3 @@ Gem::Specification.new do |s|
|
|
30
30
|
s.add_development_dependency 'pry'
|
31
31
|
s.add_development_dependency 'redis-store-testing'
|
32
32
|
end
|
33
|
-
|
@@ -52,7 +52,7 @@ module ActiveSupport
|
|
52
52
|
instrument(:delete_matched, matcher.inspect) do
|
53
53
|
matcher = key_matcher(matcher, options)
|
54
54
|
begin
|
55
|
-
|
55
|
+
(keys = @data.keys(matcher)).present? && @data.del(*keys)
|
56
56
|
rescue Errno::ECONNREFUSED => e
|
57
57
|
false
|
58
58
|
end
|
@@ -204,4 +204,3 @@ module ActiveSupport
|
|
204
204
|
end
|
205
205
|
end
|
206
206
|
end
|
207
|
-
|
@@ -63,6 +63,17 @@ describe ActiveSupport::Cache::FaultTolerantRedisStore do
|
|
63
63
|
@store.read("rabbit").must_be_nil
|
64
64
|
end
|
65
65
|
|
66
|
+
it "#delete_matched handles correctly nils without raising exception" do
|
67
|
+
# simulate MaybeClient returning nils
|
68
|
+
mocked_client = MiniTest::Mock.new
|
69
|
+
mocked_client.expect :keys, nil, ["mouse*"]
|
70
|
+
mocked_client.expect :get, nil, ["mouse", {}]
|
71
|
+
|
72
|
+
@store.instance_variable_set(:@data, mocked_client)
|
73
|
+
@store.delete_matched "mouse*"
|
74
|
+
@store.read("mouse").must_be_nil
|
75
|
+
end
|
76
|
+
|
66
77
|
it "verifies existence of an object in the store" do
|
67
78
|
@store.exist?("rabbit").must_equal(true)
|
68
79
|
@store.exist?("rab-a-dub").must_equal(false)
|
@@ -253,4 +264,3 @@ describe ActiveSupport::Cache::FaultTolerantRedisStore do
|
|
253
264
|
ActiveSupport::Cache::FaultTolerantRedisStore.instrument = false
|
254
265
|
end
|
255
266
|
end
|
256
|
-
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fault_tolerant_redis-activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
- Jan Renra Gloser
|
9
|
+
- Roman Sklenar
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2017-11-22 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: redis-store
|
@@ -141,6 +142,7 @@ description: Fault tolerant redis store for ActiveSupport
|
|
141
142
|
email:
|
142
143
|
- me@lucaguidi.com
|
143
144
|
- jan.renra.gloser@gmail.com
|
145
|
+
- roman@globalwebindex.net
|
144
146
|
executables: []
|
145
147
|
extensions: []
|
146
148
|
extra_rdoc_files: []
|
@@ -162,7 +164,7 @@ files:
|
|
162
164
|
- test/redis/activesupport/version_test.rb
|
163
165
|
- test/test_helper.rb
|
164
166
|
- wercker.yml
|
165
|
-
homepage: https://github.com/
|
167
|
+
homepage: https://github.com/globalwebindex/redis-activesupport
|
166
168
|
licenses:
|
167
169
|
- MIT
|
168
170
|
metadata: {}
|
@@ -190,3 +192,4 @@ test_files:
|
|
190
192
|
- test/active_support/cache/redis_store_test.rb
|
191
193
|
- test/redis/activesupport/version_test.rb
|
192
194
|
- test/test_helper.rb
|
195
|
+
has_rdoc:
|