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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcde7335c14299ef14a5e21aa486ae302542bf439e78ed849ce7752f85b6dc9b
|
4
|
+
data.tar.gz: 4746a31c5ced8803ab8657801e3ff1e07dadc57aaa4afeed4fe448de9d865255
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 531d527b0b3772373874678f52eca8ad7a9f54954d05dfbf5852b51e5565e0654fd80bdca6b2a1c9510fc4442e6269447c71867854f1d70cd95b35eba1e7f521
|
7
|
+
data.tar.gz: f5cd8971d2ad9b1b0e66edb54c19e6e2676a5dd624c5da07dfbe90ed3797d428eb024b34d4b37564ddcad8e28720d7322783eefa140ed6dabe84f74b4d9b3f44
|
data/CHANGELOG.md
CHANGED
@@ -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
|
|
data/lib/pact_broker/version.rb
CHANGED
@@ -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.
|
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-
|
13
|
+
date: 2020-03-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|