flipper 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changelog.md +7 -0
- data/lib/flipper/feature.rb +1 -1
- data/lib/flipper/version.rb +1 -1
- data/spec/flipper/feature_spec.rb +5 -5
- data/spec/flipper/middleware/memoizer_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 988b31a807cedba4ca7b26ce056207198bddd3ce4a3c8e2ad177bc22c1977f4b
|
4
|
+
data.tar.gz: 89b7ae96bf65c9975edb06cdab1fc4a0d2453ee9cc876ffa7cb84a7ba44f4b91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2cfb8bdebeb0de99f5f79258ae04eb547bbe06fc8242ee0c2d9c0557968942ffad9eecd4ecd80420cdbda85f75043daddaee80a7fab2bb4f7fcfa18de55d2af
|
7
|
+
data.tar.gz: 39813690991745a27bdb3e03207ebd89e61b12b2d516fc470a74ea8770c4ebc2445d60a7f17b0870e6d7582d070b221d866a90244864f9a5dfe58d6f97b4c7f0
|
data/Changelog.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.19.0
|
2
|
+
|
3
|
+
## Additions/Changes
|
4
|
+
|
5
|
+
* 100% of actors is now considered conditional. Feature#on?, Feature#conditional?, Feature#state would all be affected. See https://github.com/jnunemaker/flipper/issues/463 for more.
|
6
|
+
* Several doc updates.
|
7
|
+
|
1
8
|
## 0.18.0
|
2
9
|
|
3
10
|
## Additions/Changes
|
data/lib/flipper/feature.rb
CHANGED
@@ -205,7 +205,7 @@ module Flipper
|
|
205
205
|
boolean = gate(:boolean)
|
206
206
|
non_boolean_gates = gates - [boolean]
|
207
207
|
|
208
|
-
if values.boolean || values.
|
208
|
+
if values.boolean || values.percentage_of_time == 100
|
209
209
|
:on
|
210
210
|
elsif non_boolean_gates.detect { |gate| gate.enabled?(values[gate.key]) }
|
211
211
|
:conditional
|
data/lib/flipper/version.rb
CHANGED
@@ -359,19 +359,19 @@ RSpec.describe Flipper::Feature do
|
|
359
359
|
end
|
360
360
|
|
361
361
|
it 'returns :on' do
|
362
|
-
expect(subject.state).to be(:
|
362
|
+
expect(subject.state).to be(:conditional)
|
363
363
|
end
|
364
364
|
|
365
|
-
it 'returns
|
366
|
-
expect(subject.on?).to be(
|
365
|
+
it 'returns false for on?' do
|
366
|
+
expect(subject.on?).to be(false)
|
367
367
|
end
|
368
368
|
|
369
369
|
it 'returns false for off?' do
|
370
370
|
expect(subject.off?).to be(false)
|
371
371
|
end
|
372
372
|
|
373
|
-
it 'returns
|
374
|
-
expect(subject.conditional?).to be(
|
373
|
+
it 'returns true for conditional?' do
|
374
|
+
expect(subject.conditional?).to be(true)
|
375
375
|
end
|
376
376
|
end
|
377
377
|
|
@@ -342,7 +342,7 @@ RSpec.describe Flipper::Middleware::Memoizer do
|
|
342
342
|
it 'eagerly caches known features for duration of request' do
|
343
343
|
memory = Flipper::Adapters::Memory.new
|
344
344
|
logged_memory = Flipper::Adapters::OperationLogger.new(memory)
|
345
|
-
cache = ActiveSupport::Cache::DalliStore.new
|
345
|
+
cache = ActiveSupport::Cache::DalliStore.new(ENV['MEMCACHED_URL'])
|
346
346
|
cache.clear
|
347
347
|
cached = Flipper::Adapters::ActiveSupportCacheStore.new(logged_memory, cache, expires_in: 10)
|
348
348
|
logged_cached = Flipper::Adapters::OperationLogger.new(cached)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper
|
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: 2020-
|
11
|
+
date: 2020-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|