pact_broker 2.52.0 → 2.52.1

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: 9ac697acb622b83117ef653787076248bc6fc112a610b8534384483ee7bbec90
4
- data.tar.gz: '09def84c04412f624739e75e5762452a5f16f8d01837b00b7728bc287c659a91'
3
+ metadata.gz: bcde7335c14299ef14a5e21aa486ae302542bf439e78ed849ce7752f85b6dc9b
4
+ data.tar.gz: 4746a31c5ced8803ab8657801e3ff1e07dadc57aaa4afeed4fe448de9d865255
5
5
  SHA512:
6
- metadata.gz: 2e7b3b8000991f4b4989ec1674d75c2b512605c8a7cc066ab101e8644163bfd2bba4a3a9d102e455e59c14649fbc250080b5d1498a46ac303663fbfc778b19c9
7
- data.tar.gz: a5d00393a9237d10a27ea28b4cb4896b452957185db1ecee8a7ac6b0ef91c99dcf899024fa5ecd7949ee0fafab0128afd63a9e2f8146dbeabb22f6f01f4934c6
6
+ metadata.gz: 531d527b0b3772373874678f52eca8ad7a9f54954d05dfbf5852b51e5565e0654fd80bdca6b2a1c9510fc4442e6269447c71867854f1d70cd95b35eba1e7f521
7
+ data.tar.gz: f5cd8971d2ad9b1b0e66edb54c19e6e2676a5dd624c5da07dfbe90ed3797d428eb024b34d4b37564ddcad8e28720d7322783eefa140ed6dabe84f74b4d9b3f44
@@ -1,3 +1,12 @@
1
+ <a name="v2.52.1"></a>
2
+ ### v2.52.1 (2020-03-30)
3
+
4
+
5
+ #### Bug Fixes
6
+
7
+ * set consumer and provider to nil on the underlying webhook when they are not specified in the incoming webhook JSON ([f85b6ea2](/../../commit/f85b6ea2))
8
+
9
+
1
10
  <a name="v2.52.0"></a>
2
11
  ### v2.52.0 (2020-03-25)
3
12
 
@@ -11,18 +11,17 @@ module PactBroker
11
11
  module Api
12
12
  module Decorators
13
13
  class WebhookDecorator < BaseDecorator
14
-
15
14
  class WebhookEventDecorator < BaseDecorator
16
15
  property :name
17
16
  end
18
17
 
19
18
  property :description, getter: lambda { |context| context[:represented].display_description }
20
19
 
21
- property :consumer, :class => PactBroker::Domain::Pacticipant do
20
+ property :consumer, :class => PactBroker::Domain::Pacticipant, default: nil do
22
21
  property :name
23
22
  end
24
23
 
25
- property :provider, :class => PactBroker::Domain::Pacticipant do
24
+ property :provider, :class => PactBroker::Domain::Pacticipant, default: nil do
26
25
  property :name
27
26
  end
28
27
 
@@ -1,3 +1,3 @@
1
1
  module PactBroker
2
- VERSION = '2.52.0'
2
+ VERSION = '2.52.1'
3
3
  end
@@ -189,6 +189,20 @@ module PactBroker
189
189
  expect(parsed_object.events.first.name).to eq PactBroker::Webhooks::WebhookEvent::DEFAULT_EVENT_NAME
190
190
  end
191
191
  end
192
+
193
+ context "when the decorated object has a consumer/provider but the incoming JSON does not" do
194
+ let(:webhook) do
195
+ Domain::Webhook.new(
196
+ consumer: Domain::Pacticipant.new(name: 'consumer'),
197
+ provider: Domain::Pacticipant.new(name: 'provider')
198
+ )
199
+ end
200
+
201
+ it "sets the consumer and provider to nil on the decorated object" do
202
+ expect(parsed_object.consumer).to be nil
203
+ expect(parsed_object.provider).to be nil
204
+ end
205
+ end
192
206
  end
193
207
  end
194
208
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact_broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.52.0
4
+ version: 2.52.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bethany Skurrie
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-03-25 00:00:00.000000000 Z
13
+ date: 2020-03-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty