flipper-cloud 0.28.1 → 0.28.3

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: e63da8ea8565bdc3feef6fe3b43c4c446853f9cee1260132a01128d0e5d8b0e7
4
- data.tar.gz: eedf098ab8d68439f3b3d68053f1d321b9853fca8d2f6747398b956851300abb
3
+ metadata.gz: 50ce1804252b0dc363fbc55f71df45a21189e41cc003044b6ee5e970fcdf384d
4
+ data.tar.gz: 1a0e0552a09a3c3979f2e07a1fb87e0dc7ddb7fa4d20fdbcb74985323e7561cd
5
5
  SHA512:
6
- metadata.gz: 67f7f8f62ac55c92a995c0994e0c5f041f5fd456b106a7af6618a266e3fa10777e49345bb860d4bf5ca97c59173b22299a1285d47f30d93365c76fced68a8190
7
- data.tar.gz: 895fe9e74f5ef7bd60c4c396c844813b169913d0c2937a28d39cb247364f81c34c8ed321126f35b1afe94e5e132b4b8456932a18b180284bd4a4e40b9941b36e
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 ? dual_write_adapter : poll_adapter
160
- end
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, dual_write_adapter)
171
+ Flipper::Adapters::Poll.new(poller, local_adapter)
176
172
  end
177
173
 
178
174
  def http_adapter
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.28.1'.freeze
2
+ VERSION = '0.28.3'.freeze
3
3
  end
@@ -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::Poll)
89
+ expect(instance.adapter).to be_instance_of(Flipper::Adapters::DualWrite)
90
90
  end
91
91
 
92
92
  it "can override adapter block" do
@@ -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
- poll_adapter = memoized_adapter.adapter
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
- @instance = described_class.new(token: 'asdf', url: 'https://www.fakeflipper.com/sadpanda')
47
- uri = @instance.adapter.adapter.adapter.remote.client.uri
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.1
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-17 00:00:00.000000000 Z
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.1
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.1
26
+ version: 0.28.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: brow
29
29
  requirement: !ruby/object:Gem::Requirement