flipper-redis 0.17.1 → 0.20.0.beta1

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
  SHA256:
3
- metadata.gz: 6ee70ace8c9ffcf6f8ce2fc14108ee6cfe922dcf05565695b4182fd5c6360159
4
- data.tar.gz: 6586d2a6e987ae050f5d670455ac714e13701df07a95acfdf27337a8b7adac1a
3
+ metadata.gz: fc96cc23ce8ad0d498d45f64d27875d864e91a7ff41c248b040fd0218974eb13
4
+ data.tar.gz: 7681786dae63c3e07a6ddfac97311386ed2b63dc742c6975596ea523c8640c1b
5
5
  SHA512:
6
- metadata.gz: 352d0cda1384d9bc1b59b57b5a22f60ca691dedf57801d5d919ed943f829c5be88d6b2d0435d9c7253e5abf8973e1645218a9ed2f82ea343eb36ac7d2ea5cc0e
7
- data.tar.gz: 83b6764d0caf47bd053412b8dc1ad5339f15caefd25f55bd50be8ba5e870ed44362e1508a0c39054ef71745d6ceee8e74805a2745d01de3173a8540b8554555d
6
+ metadata.gz: 4f7d59c27b94651da5ae1b3ae7c16a32f1466d4f1c5161f8dede9e78ffe3766b8a9f1fa143af8c4dbaf752a85ed1d348136e1fafcf9e073fa0396c3f8b708a7b
7
+ data.tar.gz: 0304412dabbd48ae28f4bd50c14b2cda487de9cda8aa91c21d42f7d135909e7bbf876f6bc6f963cd1deb89d9cc8b68b3d73896ac54bff116db5cab5666da538d
@@ -10,12 +10,11 @@ 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
 
17
- gem.files = `git ls-files`.split("\n").select(&flipper_redis_files) + ['lib/flipper/version.rb'] # rubocop:disable Metrics/LineLength
18
- gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n").select(&flipper_redis_files) # rubocop:disable Metrics/LineLength
16
+ gem.files = `git ls-files`.split("\n").select(&flipper_redis_files) + ['lib/flipper/version.rb']
17
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n").select(&flipper_redis_files)
19
18
  gem.name = 'flipper-redis'
20
19
  gem.require_paths = ['lib']
21
20
  gem.version = Flipper::VERSION
@@ -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.multi do
38
- @client.srem FeaturesKey, feature.key
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, :integer
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
@@ -145,6 +145,8 @@ module Flipper
145
145
  end
146
146
 
147
147
  def multi_cache_get(keys)
148
+ return [] if keys.empty?
149
+
148
150
  cache_keys = keys.map { |key| key_for(key) }
149
151
  @cache.mget(cache_keys).map do |value|
150
152
  value ? Marshal.load(value) : nil
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.17.1'.freeze
2
+ VERSION = '0.20.0.beta1'.freeze
3
3
  end
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.17.1
4
+ version: 0.20.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-14 00:00:00.000000000 Z
11
+ date: 2020-12-11 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.17.1
19
+ version: 0.20.0.beta1
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.17.1
26
+ version: 0.20.0.beta1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: redis
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,7 +44,7 @@ dependencies:
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '5'
47
- description: Redis adapter for Flipper
47
+ description:
48
48
  email:
49
49
  - nunemaker@gmail.com
50
50
  executables: []
@@ -80,9 +80,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - ">="
83
+ - - ">"
84
84
  - !ruby/object:Gem::Version
85
- version: '0'
85
+ version: 1.3.1
86
86
  requirements: []
87
87
  rubygems_version: 3.0.3
88
88
  signing_key: