flipper-active_support_cache_store 0.28.3 → 1.3.4
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 417f9c340d72923c26ddbf1eceb7a527cf4dff543fd7baa2ef64d3a2780cfaa3
|
|
4
|
+
data.tar.gz: 87f8e3b6299f8a670aff3428fe86a4a55ed82dedd13f4d8ec44cbd71ae284ff1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: febc357aeb4b7f10b3578a7d5270bf31054e21903ec7fea04db2ad17eee508a3a20c6e6616e66fb1b9427fa73e7ee1e398322fa6bf730a749c751a48a6c56d5b
|
|
7
|
+
data.tar.gz: b9ef79a7d33cb10f5f5d0d0bb12828d21d96fe4f7444cfcd6bb173333c3faba27967167fb63eb5b54ba556db9d27e100e9f4dfc26cfc2fc4b519d6730dca0f31
|
|
@@ -8,10 +8,10 @@ end
|
|
|
8
8
|
|
|
9
9
|
Gem::Specification.new do |gem|
|
|
10
10
|
gem.authors = ['John Nunemaker']
|
|
11
|
-
gem.email =
|
|
12
|
-
gem.summary = 'ActiveSupport::Cache
|
|
11
|
+
gem.email = 'support@flippercloud.io'
|
|
12
|
+
gem.summary = 'ActiveSupport::Cache feature flag cache adapter for Flipper'
|
|
13
13
|
gem.license = 'MIT'
|
|
14
|
-
gem.homepage = 'https://
|
|
14
|
+
gem.homepage = 'https://www.flippercloud.io/docs/optimization#activesupportcachestore'
|
|
15
15
|
|
|
16
16
|
gem.files = `git ls-files`.split("\n").select(&flipper_active_support_cache_store_files) + ['lib/flipper/version.rb']
|
|
17
17
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n").select(&flipper_active_support_cache_store_files)
|
|
@@ -21,5 +21,5 @@ Gem::Specification.new do |gem|
|
|
|
21
21
|
gem.metadata = Flipper::METADATA
|
|
22
22
|
|
|
23
23
|
gem.add_dependency 'flipper', "~> #{Flipper::VERSION}"
|
|
24
|
-
gem.add_dependency 'activesupport', '>= 4.2', '<
|
|
24
|
+
gem.add_dependency 'activesupport', '>= 4.2', '< 9'
|
|
25
25
|
end
|
|
@@ -1,155 +1,79 @@
|
|
|
1
1
|
require 'flipper'
|
|
2
|
+
require 'flipper/adapters/cache_base'
|
|
2
3
|
require 'active_support/notifications'
|
|
3
4
|
|
|
4
5
|
module Flipper
|
|
5
6
|
module Adapters
|
|
6
7
|
# Public: Adapter that wraps another adapter with the ability to cache
|
|
7
8
|
# adapter calls in ActiveSupport::ActiveSupportCacheStore caches.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
# Internal
|
|
23
|
-
attr_reader :cache
|
|
24
|
-
|
|
25
|
-
# Public: The name of the adapter.
|
|
26
|
-
attr_reader :name
|
|
27
|
-
|
|
28
|
-
# Public
|
|
29
|
-
def initialize(adapter, cache, expires_in: nil, write_through: false)
|
|
30
|
-
@adapter = adapter
|
|
31
|
-
@name = :active_support_cache_store
|
|
32
|
-
@cache = cache
|
|
33
|
-
@write_options = {}
|
|
34
|
-
@write_options[:expires_in] = expires_in if expires_in
|
|
9
|
+
class ActiveSupportCacheStore < CacheBase
|
|
10
|
+
def initialize(adapter, cache, ttl = nil, expires_in: :none_provided, write_through: false, prefix: nil)
|
|
11
|
+
if expires_in == :none_provided
|
|
12
|
+
ttl ||= nil
|
|
13
|
+
else
|
|
14
|
+
warn "DEPRECATION WARNING: The `expires_in` kwarg is deprecated for " +
|
|
15
|
+
"Flipper::Adapters::ActiveSupportCacheStore and will be removed " +
|
|
16
|
+
"in the next major version. Please pass in expires in as third " +
|
|
17
|
+
"argument instead."
|
|
18
|
+
ttl = expires_in
|
|
19
|
+
end
|
|
20
|
+
super(adapter, cache, ttl, prefix: prefix)
|
|
35
21
|
@write_through = write_through
|
|
36
22
|
end
|
|
37
23
|
|
|
38
|
-
# Public
|
|
39
|
-
def features
|
|
40
|
-
read_feature_keys
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# Public
|
|
44
|
-
def add(feature)
|
|
45
|
-
result = @adapter.add(feature)
|
|
46
|
-
@cache.delete(FeaturesKey)
|
|
47
|
-
result
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
## Public
|
|
51
24
|
def remove(feature)
|
|
52
|
-
result = @adapter.remove(feature)
|
|
53
|
-
@cache.delete(FeaturesKey)
|
|
54
|
-
|
|
55
25
|
if @write_through
|
|
56
|
-
@
|
|
26
|
+
result = @adapter.remove(feature)
|
|
27
|
+
expire_features_cache
|
|
28
|
+
cache_write feature_cache_key(feature.key), default_config
|
|
29
|
+
result
|
|
57
30
|
else
|
|
58
|
-
|
|
31
|
+
super
|
|
59
32
|
end
|
|
60
|
-
|
|
61
|
-
result
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
## Public
|
|
65
|
-
def clear(feature)
|
|
66
|
-
result = @adapter.clear(feature)
|
|
67
|
-
@cache.delete(key_for(feature.key))
|
|
68
|
-
result
|
|
69
33
|
end
|
|
70
34
|
|
|
71
|
-
## Public
|
|
72
|
-
def get(feature)
|
|
73
|
-
@cache.fetch(key_for(feature.key), @write_options) do
|
|
74
|
-
@adapter.get(feature)
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def get_multi(features)
|
|
79
|
-
read_many_features(features)
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
def get_all
|
|
83
|
-
if @cache.write(GetAllKey, Time.now.to_i, @write_options.merge(unless_exist: true))
|
|
84
|
-
response = @adapter.get_all
|
|
85
|
-
response.each do |key, value|
|
|
86
|
-
@cache.write(key_for(key), value, @write_options)
|
|
87
|
-
end
|
|
88
|
-
@cache.write(FeaturesKey, response.keys.to_set, @write_options)
|
|
89
|
-
response
|
|
90
|
-
else
|
|
91
|
-
features = read_feature_keys.map { |key| Flipper::Feature.new(key, self) }
|
|
92
|
-
read_many_features(features)
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
## Public
|
|
97
35
|
def enable(feature, gate, thing)
|
|
98
|
-
result = @adapter.enable(feature, gate, thing)
|
|
99
|
-
|
|
100
36
|
if @write_through
|
|
101
|
-
|
|
37
|
+
result = @adapter.enable(feature, gate, thing)
|
|
38
|
+
cache_write feature_cache_key(feature.key), @adapter.get(feature)
|
|
39
|
+
result
|
|
102
40
|
else
|
|
103
|
-
|
|
41
|
+
super
|
|
104
42
|
end
|
|
105
|
-
|
|
106
|
-
result
|
|
107
43
|
end
|
|
108
44
|
|
|
109
|
-
## Public
|
|
110
45
|
def disable(feature, gate, thing)
|
|
111
|
-
result = @adapter.disable(feature, gate, thing)
|
|
112
|
-
|
|
113
46
|
if @write_through
|
|
114
|
-
|
|
47
|
+
result = @adapter.disable(feature, gate, thing)
|
|
48
|
+
cache_write feature_cache_key(feature.key), @adapter.get(feature)
|
|
49
|
+
result
|
|
115
50
|
else
|
|
116
|
-
|
|
51
|
+
super
|
|
117
52
|
end
|
|
118
|
-
|
|
119
|
-
result
|
|
120
53
|
end
|
|
121
54
|
|
|
122
55
|
private
|
|
123
56
|
|
|
124
|
-
def
|
|
125
|
-
|
|
57
|
+
def cache_fetch(key, &block)
|
|
58
|
+
@cache.fetch(key, write_options, &block)
|
|
126
59
|
end
|
|
127
60
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
@cache.fetch(FeaturesKey, @write_options) { @adapter.features }
|
|
61
|
+
def cache_read_multi(keys)
|
|
62
|
+
@cache.read_multi(*keys)
|
|
131
63
|
end
|
|
132
64
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
keys = features.map { |feature| key_for(feature.key) }
|
|
137
|
-
cache_result = @cache.read_multi(*keys)
|
|
138
|
-
uncached_features = features.reject { |feature| cache_result[key_for(feature)] }
|
|
65
|
+
def cache_write(key, value)
|
|
66
|
+
@cache.write(key, value, write_options)
|
|
67
|
+
end
|
|
139
68
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
@cache.write(key_for(key), value, @write_options)
|
|
144
|
-
cache_result[key_for(key)] = value
|
|
145
|
-
end
|
|
146
|
-
end
|
|
69
|
+
def cache_delete(key)
|
|
70
|
+
@cache.delete(key)
|
|
71
|
+
end
|
|
147
72
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
result
|
|
73
|
+
def write_options
|
|
74
|
+
write_options = {}
|
|
75
|
+
write_options[:expires_in] = @ttl if @ttl
|
|
76
|
+
write_options
|
|
153
77
|
end
|
|
154
78
|
end
|
|
155
79
|
end
|
data/lib/flipper/version.rb
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
module Flipper
|
|
2
|
-
VERSION = '
|
|
2
|
+
VERSION = '1.3.4'.freeze
|
|
3
|
+
|
|
4
|
+
REQUIRED_RUBY_VERSION = '2.6'.freeze
|
|
5
|
+
NEXT_REQUIRED_RUBY_VERSION = '3.0'.freeze
|
|
6
|
+
|
|
7
|
+
REQUIRED_RAILS_VERSION = '5.2'.freeze
|
|
8
|
+
NEXT_REQUIRED_RAILS_VERSION = '6.1.0'.freeze
|
|
9
|
+
|
|
10
|
+
def self.deprecated_ruby_version?
|
|
11
|
+
Gem::Version.new(RUBY_VERSION) < Gem::Version.new(NEXT_REQUIRED_RUBY_VERSION)
|
|
12
|
+
end
|
|
3
13
|
end
|
|
@@ -8,7 +8,7 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
8
8
|
end
|
|
9
9
|
let(:cache) { ActiveSupport::Cache::MemoryStore.new }
|
|
10
10
|
let(:write_through) { false }
|
|
11
|
-
let(:adapter) { described_class.new(memory_adapter, cache,
|
|
11
|
+
let(:adapter) { described_class.new(memory_adapter, cache, 10, write_through: write_through) }
|
|
12
12
|
let(:flipper) { Flipper.new(adapter) }
|
|
13
13
|
|
|
14
14
|
subject { adapter }
|
|
@@ -19,6 +19,92 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
19
19
|
|
|
20
20
|
it_should_behave_like 'a flipper adapter'
|
|
21
21
|
|
|
22
|
+
it "knows ttl" do
|
|
23
|
+
expect(adapter.ttl).to eq(10)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it "knows ttl when only expires_in provided" do
|
|
27
|
+
silence do
|
|
28
|
+
adapter = described_class.new(memory_adapter, cache, expires_in: 10)
|
|
29
|
+
expect(adapter.ttl).to eq(10)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
it "knows ttl when ttl and expires_in are provided" do
|
|
34
|
+
silence do
|
|
35
|
+
adapter = described_class.new(memory_adapter, cache, 200, expires_in: 10)
|
|
36
|
+
expect(adapter.ttl).to eq(10)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it "knows default when no ttl or expires_in provided" do
|
|
41
|
+
adapter = described_class.new(memory_adapter, cache)
|
|
42
|
+
expect(adapter.ttl).to be(nil)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
it "knows features_cache_key" do
|
|
46
|
+
expect(adapter.features_cache_key).to eq("flipper/v1/features")
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it "can expire features cache" do
|
|
50
|
+
# cache the features
|
|
51
|
+
adapter.features
|
|
52
|
+
expect(cache.read("flipper/v1/features")).not_to be(nil)
|
|
53
|
+
|
|
54
|
+
# expire cache
|
|
55
|
+
adapter.expire_features_cache
|
|
56
|
+
expect(cache.read("flipper/v1/features")).to be(nil)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
it "can expire feature cache" do
|
|
60
|
+
# cache the features
|
|
61
|
+
adapter.get(flipper[:stats])
|
|
62
|
+
expect(cache.read("flipper/v1/feature/stats")).not_to be(nil)
|
|
63
|
+
|
|
64
|
+
# expire cache
|
|
65
|
+
adapter.expire_feature_cache("stats")
|
|
66
|
+
expect(cache.read("flipper/v1/feature/stats")).to be(nil)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
it "can generate feature cache key" do
|
|
70
|
+
expect(adapter.feature_cache_key("stats")).to eq("flipper/v1/feature/stats")
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
context "when using a prefix" do
|
|
74
|
+
let(:adapter) { described_class.new(memory_adapter, cache, 10, prefix: "foo/") }
|
|
75
|
+
it_should_behave_like 'a flipper adapter'
|
|
76
|
+
|
|
77
|
+
it "knows features_cache_key" do
|
|
78
|
+
expect(adapter.features_cache_key).to eq("foo/flipper/v1/features")
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
it "can generate feature cache key" do
|
|
82
|
+
expect(adapter.feature_cache_key("stats")).to eq("foo/flipper/v1/feature/stats")
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
it "uses the prefix for all keys" do
|
|
86
|
+
# check individual feature get cached with prefix
|
|
87
|
+
adapter.get(flipper[:stats])
|
|
88
|
+
expect(cache.read("foo/flipper/v1/feature/stats")).not_to be(nil)
|
|
89
|
+
|
|
90
|
+
# check individual feature expired with prefix
|
|
91
|
+
adapter.remove(flipper[:stats])
|
|
92
|
+
expect(cache.read("foo/flipper/v1/feature/stats")).to be(nil)
|
|
93
|
+
|
|
94
|
+
# enable some stuff
|
|
95
|
+
flipper.enable_percentage_of_actors(:search, 10)
|
|
96
|
+
flipper.enable(:stats)
|
|
97
|
+
|
|
98
|
+
# populate the cache
|
|
99
|
+
adapter.get_all
|
|
100
|
+
|
|
101
|
+
# verify cached with prefix
|
|
102
|
+
expect(cache.read("foo/flipper/v1/features")).to eq(Set["stats", "search"])
|
|
103
|
+
expect(cache.read("foo/flipper/v1/feature/search")[:percentage_of_actors]).to eq("10")
|
|
104
|
+
expect(cache.read("foo/flipper/v1/feature/stats")[:boolean]).to eq("true")
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
22
108
|
describe '#remove' do
|
|
23
109
|
let(:feature) { flipper[:stats] }
|
|
24
110
|
|
|
@@ -28,8 +114,8 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
28
114
|
end
|
|
29
115
|
|
|
30
116
|
it 'expires feature and deletes the cache' do
|
|
31
|
-
expect(cache.read(
|
|
32
|
-
expect(cache.exist?(
|
|
117
|
+
expect(cache.read("flipper/v1/feature/#{feature.key}")).to be_nil
|
|
118
|
+
expect(cache.exist?("flipper/v1/feature/#{feature.key}")).to be(false)
|
|
33
119
|
expect(feature).not_to be_enabled
|
|
34
120
|
end
|
|
35
121
|
|
|
@@ -37,8 +123,8 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
37
123
|
let(:write_through) { true }
|
|
38
124
|
|
|
39
125
|
it 'expires feature and writes an empty value to the cache' do
|
|
40
|
-
expect(cache.read(
|
|
41
|
-
expect(cache.exist?(
|
|
126
|
+
expect(cache.read("flipper/v1/feature/#{feature.key}")).to eq(adapter.default_config)
|
|
127
|
+
expect(cache.exist?("flipper/v1/feature/#{feature.key}")).to be(true)
|
|
42
128
|
expect(feature).not_to be_enabled
|
|
43
129
|
end
|
|
44
130
|
end
|
|
@@ -48,12 +134,12 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
48
134
|
let(:feature) { flipper[:stats] }
|
|
49
135
|
|
|
50
136
|
before do
|
|
51
|
-
adapter.enable(feature, feature.gate(:boolean),
|
|
137
|
+
adapter.enable(feature, feature.gate(:boolean), Flipper::Types::Boolean.new(true))
|
|
52
138
|
end
|
|
53
139
|
|
|
54
140
|
it 'enables feature and deletes the cache' do
|
|
55
|
-
expect(cache.read(
|
|
56
|
-
expect(cache.exist?(
|
|
141
|
+
expect(cache.read("flipper/v1/feature/#{feature.key}")).to be_nil
|
|
142
|
+
expect(cache.exist?("flipper/v1/feature/#{feature.key}")).to be(false)
|
|
57
143
|
expect(feature).to be_enabled
|
|
58
144
|
end
|
|
59
145
|
|
|
@@ -61,8 +147,8 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
61
147
|
let(:write_through) { true }
|
|
62
148
|
|
|
63
149
|
it 'expires feature and writes to the cache' do
|
|
64
|
-
expect(cache.exist?(
|
|
65
|
-
expect(cache.read(
|
|
150
|
+
expect(cache.exist?("flipper/v1/feature/#{feature.key}")).to be(true)
|
|
151
|
+
expect(cache.read("flipper/v1/feature/#{feature.key}")).to include(boolean: 'true')
|
|
66
152
|
expect(feature).to be_enabled
|
|
67
153
|
end
|
|
68
154
|
end
|
|
@@ -72,12 +158,12 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
72
158
|
let(:feature) { flipper[:stats] }
|
|
73
159
|
|
|
74
160
|
before do
|
|
75
|
-
adapter.disable(feature, feature.gate(:boolean),
|
|
161
|
+
adapter.disable(feature, feature.gate(:boolean), Flipper::Types::Boolean.new)
|
|
76
162
|
end
|
|
77
163
|
|
|
78
164
|
it 'disables feature and deletes the cache' do
|
|
79
|
-
expect(cache.read(
|
|
80
|
-
expect(cache.exist?(
|
|
165
|
+
expect(cache.read("flipper/v1/feature/#{feature.key}")).to be_nil
|
|
166
|
+
expect(cache.exist?("flipper/v1/feature/#{feature.key}")).to be(false)
|
|
81
167
|
expect(feature).not_to be_enabled
|
|
82
168
|
end
|
|
83
169
|
|
|
@@ -85,8 +171,8 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
85
171
|
let(:write_through) { true }
|
|
86
172
|
|
|
87
173
|
it 'expires feature and writes to the cache' do
|
|
88
|
-
expect(cache.exist?(
|
|
89
|
-
expect(cache.read(
|
|
174
|
+
expect(cache.exist?("flipper/v1/feature/#{feature.key}")).to be(true)
|
|
175
|
+
expect(cache.read("flipper/v1/feature/#{feature.key}")).to include(boolean: nil)
|
|
90
176
|
expect(feature).not_to be_enabled
|
|
91
177
|
end
|
|
92
178
|
end
|
|
@@ -103,13 +189,13 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
103
189
|
memory_adapter.reset
|
|
104
190
|
|
|
105
191
|
adapter.get(stats)
|
|
106
|
-
expect(cache.read(
|
|
107
|
-
expect(cache.read(
|
|
192
|
+
expect(cache.read("flipper/v1/feature/#{search.key}")).to be(nil)
|
|
193
|
+
expect(cache.read("flipper/v1/feature/#{other.key}")).to be(nil)
|
|
108
194
|
|
|
109
195
|
adapter.get_multi([stats, search, other])
|
|
110
196
|
|
|
111
|
-
expect(cache.read(
|
|
112
|
-
expect(cache.read(
|
|
197
|
+
expect(cache.read("flipper/v1/feature/#{search.key}")[:boolean]).to eq('true')
|
|
198
|
+
expect(cache.read("flipper/v1/feature/#{other.key}")[:boolean]).to be(nil)
|
|
113
199
|
|
|
114
200
|
adapter.get_multi([stats, search, other])
|
|
115
201
|
adapter.get_multi([stats, search, other])
|
|
@@ -128,19 +214,21 @@ RSpec.describe Flipper::Adapters::ActiveSupportCacheStore do
|
|
|
128
214
|
|
|
129
215
|
it 'warms all features' do
|
|
130
216
|
adapter.get_all
|
|
131
|
-
expect(cache.read(
|
|
132
|
-
expect(cache.read(
|
|
133
|
-
expect(cache.read(
|
|
217
|
+
expect(cache.read("flipper/v1/feature/#{stats.key}")[:boolean]).to eq('true')
|
|
218
|
+
expect(cache.read("flipper/v1/feature/#{search.key}")[:boolean]).to be(nil)
|
|
219
|
+
expect(cache.read("flipper/v1/features")).to eq(Set["stats", "search"])
|
|
134
220
|
end
|
|
135
221
|
|
|
136
222
|
it 'returns same result when already cached' do
|
|
137
223
|
expect(adapter.get_all).to eq(adapter.get_all)
|
|
138
224
|
end
|
|
139
225
|
|
|
140
|
-
it 'only invokes
|
|
226
|
+
it 'only invokes two calls to wrapped adapter (for features set and gate data for each feature in set)' do
|
|
141
227
|
memory_adapter.reset
|
|
142
228
|
5.times { adapter.get_all }
|
|
143
|
-
expect(memory_adapter.count(:
|
|
229
|
+
expect(memory_adapter.count(:features)).to eq(1)
|
|
230
|
+
expect(memory_adapter.count(:get_multi)).to eq(1)
|
|
231
|
+
expect(memory_adapter.count).to eq(2)
|
|
144
232
|
end
|
|
145
233
|
end
|
|
146
234
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: flipper-active_support_cache_store
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Nunemaker
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2025-03-03 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: flipper
|
|
@@ -16,14 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: 1.3.4
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
25
|
+
version: 1.3.4
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: activesupport
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -33,7 +32,7 @@ dependencies:
|
|
|
33
32
|
version: '4.2'
|
|
34
33
|
- - "<"
|
|
35
34
|
- !ruby/object:Gem::Version
|
|
36
|
-
version: '
|
|
35
|
+
version: '9'
|
|
37
36
|
type: :runtime
|
|
38
37
|
prerelease: false
|
|
39
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -43,10 +42,8 @@ dependencies:
|
|
|
43
42
|
version: '4.2'
|
|
44
43
|
- - "<"
|
|
45
44
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
47
|
-
|
|
48
|
-
email:
|
|
49
|
-
- nunemaker@gmail.com
|
|
45
|
+
version: '9'
|
|
46
|
+
email: support@flippercloud.io
|
|
50
47
|
executables: []
|
|
51
48
|
extensions: []
|
|
52
49
|
extra_rdoc_files: []
|
|
@@ -56,12 +53,16 @@ files:
|
|
|
56
53
|
- lib/flipper/adapters/active_support_cache_store.rb
|
|
57
54
|
- lib/flipper/version.rb
|
|
58
55
|
- spec/flipper/adapters/active_support_cache_store_spec.rb
|
|
59
|
-
homepage: https://
|
|
56
|
+
homepage: https://www.flippercloud.io/docs/optimization#activesupportcachestore
|
|
60
57
|
licenses:
|
|
61
58
|
- MIT
|
|
62
59
|
metadata:
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
documentation_uri: https://www.flippercloud.io/docs
|
|
61
|
+
homepage_uri: https://www.flippercloud.io
|
|
62
|
+
source_code_uri: https://github.com/flippercloud/flipper
|
|
63
|
+
bug_tracker_uri: https://github.com/flippercloud/flipper/issues
|
|
64
|
+
changelog_uri: https://github.com/flippercloud/flipper/releases/tag/v1.3.4
|
|
65
|
+
funding_uri: https://github.com/sponsors/flippercloud
|
|
65
66
|
rdoc_options: []
|
|
66
67
|
require_paths:
|
|
67
68
|
- lib
|
|
@@ -76,9 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
76
77
|
- !ruby/object:Gem::Version
|
|
77
78
|
version: '0'
|
|
78
79
|
requirements: []
|
|
79
|
-
rubygems_version: 3.
|
|
80
|
-
signing_key:
|
|
80
|
+
rubygems_version: 3.6.5
|
|
81
81
|
specification_version: 4
|
|
82
|
-
summary: ActiveSupport::Cache
|
|
82
|
+
summary: ActiveSupport::Cache feature flag cache adapter for Flipper
|
|
83
83
|
test_files:
|
|
84
84
|
- spec/flipper/adapters/active_support_cache_store_spec.rb
|