flipper-redis 0.16.1 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/flipper-redis.gemspec +1 -2
- data/lib/flipper/adapters/redis.rb +6 -5
- data/lib/flipper/adapters/redis_cache.rb +2 -0
- data/lib/flipper/version.rb +1 -1
- data/test/adapters/redis_cache_test.rb +1 -1
- metadata +8 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1f5e51fd46f4b1f4f2ef1bffc9b3eb8ab0633b361b0e2db4d11d494b98abfc91
|
4
|
+
data.tar.gz: 5070808769fff00f491e91773daf95338d947dd5f1875a567a11b63382021b6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 584f72db94a39b588ec36b00f0491071e186a8c7ec88cd52e7659d93abaf20403c9b63841b0268461b290e604fc9539d24528e826aed67c419599212ac053d89
|
7
|
+
data.tar.gz: b066604643a6b8fcbe4e37e385457dbffb1519abe607ddd82745673cf618a5660096ec52f64ba0aeef0c00c712e5db43b41a5b465877b0a6d650a54af4933293
|
data/flipper-redis.gemspec
CHANGED
@@ -10,7 +10,6 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.authors = ['John Nunemaker']
|
11
11
|
gem.email = ['nunemaker@gmail.com']
|
12
12
|
gem.summary = 'Redis adapter for Flipper'
|
13
|
-
gem.description = 'Redis adapter for Flipper'
|
14
13
|
gem.license = 'MIT'
|
15
14
|
gem.homepage = 'https://github.com/jnunemaker/flipper'
|
16
15
|
|
@@ -22,5 +21,5 @@ Gem::Specification.new do |gem|
|
|
22
21
|
gem.metadata = Flipper::METADATA
|
23
22
|
|
24
23
|
gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
|
25
|
-
gem.add_dependency 'redis', '>= 2.2', '<
|
24
|
+
gem.add_dependency 'redis', '>= 2.2', '< 5'
|
26
25
|
end
|
@@ -34,10 +34,8 @@ module Flipper
|
|
34
34
|
|
35
35
|
# Public: Removes a feature from the set of known features.
|
36
36
|
def remove(feature)
|
37
|
-
@client.
|
38
|
-
|
39
|
-
@client.del feature.key
|
40
|
-
end
|
37
|
+
@client.srem FeaturesKey, feature.key
|
38
|
+
@client.del feature.key
|
41
39
|
true
|
42
40
|
end
|
43
41
|
|
@@ -73,7 +71,10 @@ module Flipper
|
|
73
71
|
# Returns true.
|
74
72
|
def enable(feature, gate, thing)
|
75
73
|
case gate.data_type
|
76
|
-
when :boolean
|
74
|
+
when :boolean
|
75
|
+
clear(feature)
|
76
|
+
@client.hset feature.key, gate.key, thing.value.to_s
|
77
|
+
when :integer
|
77
78
|
@client.hset feature.key, gate.key, thing.value.to_s
|
78
79
|
when :set
|
79
80
|
@client.hset feature.key, to_field(gate, thing), 1
|
data/lib/flipper/version.rb
CHANGED
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.19.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: 2020-09-25 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.19.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.19.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:
|
36
|
+
version: '5'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,8 +43,8 @@ dependencies:
|
|
43
43
|
version: '2.2'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
47
|
-
description:
|
46
|
+
version: '5'
|
47
|
+
description:
|
48
48
|
email:
|
49
49
|
- nunemaker@gmail.com
|
50
50
|
executables: []
|
@@ -84,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
|
-
|
88
|
-
rubygems_version: 2.4.5.4
|
87
|
+
rubygems_version: 3.0.3
|
89
88
|
signing_key:
|
90
89
|
specification_version: 4
|
91
90
|
summary: Redis adapter for Flipper
|