this_feature 0.6.0 → 0.6.1
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/Gemfile.lock +20 -20
- data/docs/memory.md +12 -12
- data/lib/this_feature/adapters/memory.rb +4 -0
- data/lib/this_feature/version.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: 03e205e9b9a6a53ff76d8c93b315eb7e8cd2f05a96a9e7f4ae9ac434371155e9
|
4
|
+
data.tar.gz: 1e5e996c866d55076f205a47685e295e4b04f0373aa545d183c0192d640ac8a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ea504d76f8f435166ba50bb4643065030e40ea44626ffd4222fe60a5f80588d3242fe89dc339b14cce7b8cc1657fef016c9c59e5decdc9879f3bf64f23581b5
|
7
|
+
data.tar.gz: 523abe2a99278d2c559931e3b89ba0a946ca03f5e7a3fc92fd0e060555d0a0b25308d863f57904f4f4cc9ddb5fd93535e79bcee9164cff769b3d2ee61a6fcf0c
|
data/Gemfile.lock
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
this_feature (0.6.
|
5
|
-
this_feature-adapters-flipper (0.6.
|
4
|
+
this_feature (0.6.1)
|
5
|
+
this_feature-adapters-flipper (0.6.1)
|
6
6
|
flipper (~> 0.16)
|
7
7
|
flipper-active_record (~> 0.16)
|
8
8
|
this_feature
|
9
|
-
this_feature-adapters-split_io (0.6.
|
9
|
+
this_feature-adapters-split_io (0.6.1)
|
10
10
|
splitclient-rb
|
11
11
|
this_feature
|
12
12
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activemodel (6.
|
17
|
-
activesupport (= 6.
|
18
|
-
activerecord (6.
|
19
|
-
activemodel (= 6.
|
20
|
-
activesupport (= 6.
|
21
|
-
activesupport (6.
|
16
|
+
activemodel (6.1.3)
|
17
|
+
activesupport (= 6.1.3)
|
18
|
+
activerecord (6.1.3)
|
19
|
+
activemodel (= 6.1.3)
|
20
|
+
activesupport (= 6.1.3)
|
21
|
+
activesupport (6.1.3)
|
22
22
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
23
|
-
i18n (>=
|
24
|
-
minitest (
|
25
|
-
tzinfo (~>
|
26
|
-
zeitwerk (~> 2.
|
23
|
+
i18n (>= 1.6, < 2)
|
24
|
+
minitest (>= 5.1)
|
25
|
+
tzinfo (~> 2.0)
|
26
|
+
zeitwerk (~> 2.3)
|
27
27
|
byebug (11.1.2)
|
28
28
|
coderay (1.1.2)
|
29
|
-
concurrent-ruby (1.1.
|
29
|
+
concurrent-ruby (1.1.8)
|
30
30
|
connection_pool (2.2.3)
|
31
31
|
database_cleaner (1.8.4)
|
32
32
|
database_cleaner-active_record (1.8.0)
|
@@ -44,13 +44,13 @@ GEM
|
|
44
44
|
flipper (~> 0.20.3)
|
45
45
|
gem-release (2.2.1)
|
46
46
|
hitimes (1.3.1)
|
47
|
-
i18n (1.8.
|
47
|
+
i18n (1.8.9)
|
48
48
|
concurrent-ruby (~> 1.0)
|
49
49
|
json (2.5.1)
|
50
50
|
jwt (2.2.2)
|
51
51
|
lru_redux (1.1.0)
|
52
52
|
method_source (1.0.0)
|
53
|
-
minitest (5.14.
|
53
|
+
minitest (5.14.4)
|
54
54
|
multipart-post (2.1.1)
|
55
55
|
net-http-persistent (4.0.1)
|
56
56
|
connection_pool (~> 2.2)
|
@@ -78,7 +78,7 @@ GEM
|
|
78
78
|
ruby2_keywords (0.0.4)
|
79
79
|
socketry (0.5.1)
|
80
80
|
hitimes (~> 1.2)
|
81
|
-
splitclient-rb (7.2.
|
81
|
+
splitclient-rb (7.2.3)
|
82
82
|
concurrent-ruby (~> 1.0)
|
83
83
|
faraday (>= 0.8)
|
84
84
|
json (>= 1.8)
|
@@ -90,9 +90,9 @@ GEM
|
|
90
90
|
thread_safe (>= 0.3)
|
91
91
|
sqlite3 (1.4.2)
|
92
92
|
thread_safe (0.3.6)
|
93
|
-
tzinfo (
|
94
|
-
|
95
|
-
zeitwerk (2.4.
|
93
|
+
tzinfo (2.0.4)
|
94
|
+
concurrent-ruby (~> 1.0)
|
95
|
+
zeitwerk (2.4.2)
|
96
96
|
|
97
97
|
PLATFORMS
|
98
98
|
ruby
|
data/docs/memory.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Under the hood, the memory adapter stores data in a dictionary like so:
|
6
6
|
|
7
|
-
```
|
7
|
+
```ruby
|
8
8
|
{
|
9
9
|
some_flag_name: {
|
10
10
|
global: false,
|
@@ -41,7 +41,7 @@ ThisFeature.configure do |config|
|
|
41
41
|
end
|
42
42
|
```
|
43
43
|
|
44
|
-
The initializer takes an optional `context_key_method` argument. This is only relevant when using `context` -
|
44
|
+
The initializer takes an optional `context_key_method` argument. This is only relevant when using `context` -
|
45
45
|
it specifies a method name which should be called on the context object to determine its identity.
|
46
46
|
For example:
|
47
47
|
|
@@ -66,19 +66,11 @@ If this option is ommitted, then the context object uses its `self` as its "iden
|
|
66
66
|
|
67
67
|
The Memory adapter supports the public API of `ThisFeature`.
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
Read the following notes as well:
|
69
|
+
### **#on? / #off?**
|
72
70
|
|
73
|
-
|
71
|
+
If passed a `context` argument, uses the aformentioned logic
|
74
72
|
(`context_key_method`) to determine how it's handled.
|
75
73
|
|
76
|
-
- **control?** is not yet implemented
|
77
|
-
|
78
|
-
We also support two additional methods here that aren't present on the main adapter yet:
|
79
|
-
|
80
|
-
- **on!** / **off!**
|
81
|
-
|
82
74
|
Usage example of these:
|
83
75
|
|
84
76
|
```ruby
|
@@ -86,3 +78,11 @@ Usage example of these:
|
|
86
78
|
ThisFeature.test_adapter.on!(:flag_name, context: user) # with context
|
87
79
|
ThisFeature.test_adapter.off!(:flag_name) # without context
|
88
80
|
```
|
81
|
+
|
82
|
+
### **#clear**
|
83
|
+
|
84
|
+
Since the memory adapter stores flags in memory, it won't automatically get cleaned up in your tests. You can use this method to reset the memory adapter state.
|
85
|
+
|
86
|
+
```ruby
|
87
|
+
ThisFeature.test_adapter.clear
|
88
|
+
```
|
data/lib/this_feature/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: this_feature
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Pleaner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|