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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 116ad141c8d03c81df64f49477c0d648bc9bf65c1ef1be683a65b38cfdcb4c35
4
- data.tar.gz: 3b3ce63cf12adfbe67f9fdcbbc99a2c37bace0dd6462bd2dba50e4806184a105
3
+ metadata.gz: 50ce1804252b0dc363fbc55f71df45a21189e41cc003044b6ee5e970fcdf384d
4
+ data.tar.gz: 1a0e0552a09a3c3979f2e07a1fb87e0dc7ddb7fa4d20fdbcb74985323e7561cd
5
5
  SHA512:
6
- metadata.gz: e992d2ccc7d15a53dd2b8f54ce77470128f8ad35deabbeb1ef79598931dbf6a3b3b5bec93672d937fab6925e4f08fa9b4da1ad1623976f431d114c493b68557d
7
- data.tar.gz: 6ae687abe33423ed5c1f06a43c9ab5416eca325cf56fe0c627da862b947f8cc66c6b554c2677338b4a75e6bdc7cc7d227de2a6b9c3b1f24ee3581e681dd6f14d
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.2'.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.2
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-18 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.2
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.2
26
+ version: 0.28.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: brow
29
29
  requirement: !ruby/object:Gem::Requirement