flipper-redis 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/flipper-redis.gemspec +1 -1
- data/lib/flipper/adapters/redis_cache.rb +3 -3
- data/lib/flipper/version.rb +1 -1
- data/spec/flipper/adapters/redis_cache_spec.rb +8 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d426dd76236d19c054525d7cdf9e8eaab342a201
|
4
|
+
data.tar.gz: 30f4eee791cc5d0fa4e56b5471969947be9dfe3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88f39e810b259e67b9a03c17daee133e9fbbb6ec3f1e5a90deb91a66576e2dbe6075de05937c9171a634795cb3fdbd6bd0e12486ddf904958a135d6aae335e1c
|
7
|
+
data.tar.gz: 15f2b988a428038714e56e042b19483593303dcb15b5900fa81c74e9e6752d74ea8bb78e92cec51abdf835a4a3d2a99e6951e0e3951df2ba0ff5580f703cc4fe
|
data/flipper-redis.gemspec
CHANGED
@@ -128,13 +128,13 @@ module Flipper
|
|
128
128
|
result
|
129
129
|
end
|
130
130
|
|
131
|
-
def fetch(
|
132
|
-
cached = @cache.get(
|
131
|
+
def fetch(cache_key)
|
132
|
+
cached = @cache.get(cache_key)
|
133
133
|
if cached
|
134
134
|
Marshal.load(cached)
|
135
135
|
else
|
136
136
|
to_cache = yield
|
137
|
-
set_with_ttl(
|
137
|
+
set_with_ttl(cache_key, to_cache)
|
138
138
|
to_cache
|
139
139
|
end
|
140
140
|
end
|
data/lib/flipper/version.rb
CHANGED
@@ -34,6 +34,14 @@ RSpec.describe Flipper::Adapters::RedisCache do
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
describe '#get' do
|
38
|
+
it 'uses correct cache key' do
|
39
|
+
stats = flipper[:stats]
|
40
|
+
adapter.get(stats)
|
41
|
+
expect(client.get(described_class.key_for(stats))).not_to be_nil
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
37
45
|
describe '#get_multi' do
|
38
46
|
it 'warms uncached features' do
|
39
47
|
stats = flipper[:stats]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flipper
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.12.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.12.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: redis
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '2.2'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 4.
|
36
|
+
version: 4.1.0
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '2.2'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 4.
|
46
|
+
version: 4.1.0
|
47
47
|
description: Redis adapter for Flipper
|
48
48
|
email:
|
49
49
|
- nunemaker@gmail.com
|