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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5363c534d61ff3868377dd62a287b98f3a44ff0
4
- data.tar.gz: 15bf094f6ae539c8f960c0f5bfaadcc65ece5db8
3
+ metadata.gz: d426dd76236d19c054525d7cdf9e8eaab342a201
4
+ data.tar.gz: 30f4eee791cc5d0fa4e56b5471969947be9dfe3a
5
5
  SHA512:
6
- metadata.gz: 964c14af640c09fdc4c7adde58f25cf54c44d00a6b742fc908654202e88d05ae5a44c6839a586c45924f090bbe2338f9dee54eb67b9a54af5847b080a2b8d3d2
7
- data.tar.gz: b164d8f1074db1f021e78b8fced901517fb2205129a858dff08aa187ec06b3b2255d15b20da5e51fc23e6ff6db138b2a7fc98c62801e56a7ba6bc703d7ec994d
6
+ metadata.gz: 88f39e810b259e67b9a03c17daee133e9fbbb6ec3f1e5a90deb91a66576e2dbe6075de05937c9171a634795cb3fdbd6bd0e12486ddf904958a135d6aae335e1c
7
+ data.tar.gz: 15f2b988a428038714e56e042b19483593303dcb15b5900fa81c74e9e6752d74ea8bb78e92cec51abdf835a4a3d2a99e6951e0e3951df2ba0ff5580f703cc4fe
@@ -20,5 +20,5 @@ Gem::Specification.new do |gem|
20
20
  gem.version = Flipper::VERSION
21
21
 
22
22
  gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
23
- gem.add_dependency 'redis', '>= 2.2', '< 4.0.0'
23
+ gem.add_dependency 'redis', '>= 2.2', '< 4.1.0'
24
24
  end
@@ -128,13 +128,13 @@ module Flipper
128
128
  result
129
129
  end
130
130
 
131
- def fetch(key)
132
- cached = @cache.get(key)
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(key_for(key), to_cache)
137
+ set_with_ttl(cache_key, to_cache)
138
138
  to_cache
139
139
  end
140
140
  end
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.11.0'.freeze
2
+ VERSION = '0.12.0'.freeze
3
3
  end
@@ -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.11.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: 2017-11-07 00:00:00.000000000 Z
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.11.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.11.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.0.0
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.0.0
46
+ version: 4.1.0
47
47
  description: Redis adapter for Flipper
48
48
  email:
49
49
  - nunemaker@gmail.com