flipper-cloud 0.28.2 → 0.28.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flipper/cloud/configuration.rb +3 -7
- data/lib/flipper/version.rb +1 -1
- data/spec/flipper/cloud/configuration_spec.rb +1 -1
- data/spec/flipper/cloud_spec.rb +9 -6
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50ce1804252b0dc363fbc55f71df45a21189e41cc003044b6ee5e970fcdf384d
|
4
|
+
data.tar.gz: 1a0e0552a09a3c3979f2e07a1fb87e0dc7ddb7fa4d20fdbcb74985323e7561cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 901e42974dbb76020bcb7ca6394ad5951fcfe18e00b2a4ea735a2cfabd8965953b8867a3bb5184c7161aeb9c611e7aa205a062cae5a1d99aa653f7e88d35882b
|
7
|
+
data.tar.gz: 21e0c1738b9b34203388bae07240fb1ffb6ad82163b59bb4abbd9796af02c513551639d1ce3bacd7939cad6f4088b240792200baed8724c0eefe7325dcbaae8a
|
@@ -126,7 +126,6 @@ module Flipper
|
|
126
126
|
def sync
|
127
127
|
Flipper::Adapters::Sync::Synchronizer.new(local_adapter, http_adapter, {
|
128
128
|
instrumenter: instrumenter,
|
129
|
-
interval: sync_interval,
|
130
129
|
}).call
|
131
130
|
end
|
132
131
|
|
@@ -156,11 +155,8 @@ module Flipper
|
|
156
155
|
private
|
157
156
|
|
158
157
|
def app_adapter
|
159
|
-
sync_method == :webhook ?
|
160
|
-
|
161
|
-
|
162
|
-
def dual_write_adapter
|
163
|
-
Flipper::Adapters::DualWrite.new(local_adapter, http_adapter)
|
158
|
+
read_adapter = sync_method == :webhook ? local_adapter : poll_adapter
|
159
|
+
Flipper::Adapters::DualWrite.new(read_adapter, http_adapter)
|
164
160
|
end
|
165
161
|
|
166
162
|
def poller
|
@@ -172,7 +168,7 @@ module Flipper
|
|
172
168
|
end
|
173
169
|
|
174
170
|
def poll_adapter
|
175
|
-
Flipper::Adapters::Poll.new(poller,
|
171
|
+
Flipper::Adapters::Poll.new(poller, local_adapter)
|
176
172
|
end
|
177
173
|
|
178
174
|
def http_adapter
|
data/lib/flipper/version.rb
CHANGED
@@ -86,7 +86,7 @@ RSpec.describe Flipper::Cloud::Configuration do
|
|
86
86
|
stub_request(:get, /flippercloud\.io/).to_return(status: 200, body: "{}")
|
87
87
|
|
88
88
|
instance = described_class.new(required_options)
|
89
|
-
expect(instance.adapter).to be_instance_of(Flipper::Adapters::
|
89
|
+
expect(instance.adapter).to be_instance_of(Flipper::Adapters::DualWrite)
|
90
90
|
end
|
91
91
|
|
92
92
|
it "can override adapter block" do
|
data/spec/flipper/cloud_spec.rb
CHANGED
@@ -25,11 +25,10 @@ RSpec.describe Flipper::Cloud do
|
|
25
25
|
it 'configures the correct adapter' do
|
26
26
|
# pardon the nesting...
|
27
27
|
memoized_adapter = @instance.adapter
|
28
|
-
|
29
|
-
dual_write_adapter = poll_adapter.adapter
|
30
|
-
|
31
|
-
expect(poll_adapter).to be_instance_of(Flipper::Adapters::Poll)
|
28
|
+
dual_write_adapter = memoized_adapter.adapter
|
32
29
|
expect(dual_write_adapter).to be_instance_of(Flipper::Adapters::DualWrite)
|
30
|
+
poll_adapter = dual_write_adapter.local
|
31
|
+
expect(poll_adapter).to be_instance_of(Flipper::Adapters::Poll)
|
33
32
|
|
34
33
|
http_adapter = dual_write_adapter.remote
|
35
34
|
client = http_adapter.client
|
@@ -43,8 +42,12 @@ RSpec.describe Flipper::Cloud do
|
|
43
42
|
|
44
43
|
context 'initialize with token and options' do
|
45
44
|
it 'sets correct url' do
|
46
|
-
|
47
|
-
|
45
|
+
instance = described_class.new(token: 'asdf', url: 'https://www.fakeflipper.com/sadpanda')
|
46
|
+
# pardon the nesting...
|
47
|
+
memoized = instance.adapter
|
48
|
+
dual_write = memoized.adapter
|
49
|
+
remote = dual_write.remote
|
50
|
+
uri = remote.client.uri
|
48
51
|
expect(uri.scheme).to eq('https')
|
49
52
|
expect(uri.host).to eq('www.fakeflipper.com')
|
50
53
|
expect(uri.path).to eq('/sadpanda')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.28.
|
4
|
+
version: 0.28.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-21 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.28.
|
19
|
+
version: 0.28.3
|
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.28.
|
26
|
+
version: 0.28.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: brow
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|