flipper-cloud 0.20.0.beta2 → 0.20.0.beta3

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: ad733b77b848c6b7b0f1acbe1b9b6c95f87a71e0075dee518c3cfea654b46742
4
- data.tar.gz: f030f6785ccd8482c660fd9f3e9ece0a81c4b5f455b8c8559ab39b6dc025d29e
3
+ metadata.gz: 6117cc953e569df240b187815f80b55a4c91014916e98fd9b0e2c0fa9ad45cf1
4
+ data.tar.gz: 9bcdb028730c3f5376316b3f3536df24463e6aa8c1e09b515ad472015147a1ec
5
5
  SHA512:
6
- metadata.gz: 747bc35cfd3642780198a4219cf3b8d91b63aa008efaf445900763b1a8fc61229c4dae9da8affe2b0e607ee86bb1774b6a37abd1ab338c8766dca52baf5ba436
7
- data.tar.gz: 3d4d1e9b03701f21719e132bcf11cc8d0b9f1d134fea56a14d19df95b9ea6c472eff0fc6daf87d4a9888741b950e3ba21d611b174959c6d707d83a316c77668d
6
+ metadata.gz: 3bc8e410bc84697b17ddaa0d5afc6fb4e9fd7ae2e775375e3b7b03a31c4fee2628d2fe964aeba93e00ae512d6df1d9338037b667f71907ed1453e0bedb8d0fa0
7
+ data.tar.gz: 711c266fbc227fa51bc37bff2b3d2cca8ae6c5fc595d7ae1121fce9876cae05974dcae56a259d2f380f2712908f6fe02bcafba8b8b3a1754fb72fd1aa10de288
@@ -152,6 +152,7 @@ module Flipper
152
152
  debug_output: @debug_output,
153
153
  headers: {
154
154
  "Flipper-Cloud-Token" => @token,
155
+ "Feature-Flipper-Token" => @token,
155
156
  },
156
157
  })
157
158
  end
@@ -33,6 +33,9 @@ module Flipper
33
33
  message_verifier = MessageVerifier.new(secret: flipper.sync_secret)
34
34
  if message_verifier.verify(payload, signature)
35
35
  flipper.sync
36
+ body = JSON.generate({
37
+ groups: Flipper.group_names.map { |name| {name: name}}
38
+ })
36
39
  end
37
40
  rescue MessageVerifier::InvalidSignature
38
41
  status = 400
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = '0.20.0.beta2'.freeze
2
+ VERSION = '0.20.0.beta3'.freeze
3
3
  end
@@ -43,6 +43,12 @@ RSpec.describe Flipper::Cloud::Middleware do
43
43
  let(:app) { Flipper::Cloud.app(flipper) }
44
44
 
45
45
  it 'uses instance to sync' do
46
+ Flipper.register(:admins) { |*args| false }
47
+ Flipper.register(:staff) { |*args| false }
48
+ Flipper.register(:basic) { |*args| false }
49
+ Flipper.register(:plus) { |*args| false }
50
+ Flipper.register(:premium) { |*args| false }
51
+
46
52
  stub = stub_request_for_token('regular')
47
53
  env = {
48
54
  "HTTP_FLIPPER_CLOUD_SIGNATURE" => signature_header_value,
@@ -50,6 +56,15 @@ RSpec.describe Flipper::Cloud::Middleware do
50
56
  post '/webhooks', request_body, env
51
57
 
52
58
  expect(last_response.status).to eq(200)
59
+ expect(JSON.parse(last_response.body)).to eq({
60
+ "groups" => [
61
+ {"name" => "admins"},
62
+ {"name" => "staff"},
63
+ {"name" => "basic"},
64
+ {"name" => "plus"},
65
+ {"name" => "premium"},
66
+ ],
67
+ })
53
68
  expect(stub).to have_been_requested
54
69
  end
55
70
  end
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.20.0.beta2
4
+ version: 0.20.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-14 00:00:00.000000000 Z
11
+ date: 2020-12-17 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.20.0.beta2
19
+ version: 0.20.0.beta3
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.20.0.beta2
26
+ version: 0.20.0.beta3
27
27
  description:
28
28
  email:
29
29
  - nunemaker@gmail.com