pact_broker 2.23.1 → 2.23.2

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
  SHA1:
3
- metadata.gz: af5e56af0fcb01af75c45a0f2d0377795c2d57b8
4
- data.tar.gz: 90dd47be6e7aa273e7f5f7d50e381f3968bde7b3
3
+ metadata.gz: efa7bd1b81dec80b51d23b83c514e0adb255d141
4
+ data.tar.gz: 306e1717036acb4bc2b8af82b0e1380e09f5629c
5
5
  SHA512:
6
- metadata.gz: 3aca8efd6e49da134e00322211e084ebb9696db70c7dc92cfdb6f09b342a8d48e1e7a6d5831315c2463dddd5b53b873576a527f57195495b3e2c78cb46e613f2
7
- data.tar.gz: 84feaf4b1641bab2293d9b2f332ba8b5e9a92e9fe6afbd8270ad9618de90e58d5e34b5f2496c7ade4d91451ce8049c0df17e269468ab631ac08e3a38d74405b3
6
+ metadata.gz: d0d724f7a674dfb674af00c4dc1f9d4f73df1caad8d1d5a12374183144b30dca33155f0d29cd64f824645f0f50ffa90366d22afdb42a14c4eb9cdd565fc23063
7
+ data.tar.gz: 96398ef4461a299b66a83695e7c34c4e891cba21e2223ce1b43937a0439a009a2e3e9fdf2372873f8c6df169fa9a2f44d158f5342fa09eb2cbee720c9d4b521a
@@ -1,3 +1,12 @@
1
+ <a name="v2.23.2"></a>
2
+ ### v2.23.2 (2018-06-25)
3
+
4
+
5
+ #### Bug Fixes
6
+
7
+ * ensure configured webhook headers are used when making request ([50c876f](/../../commit/50c876f))
8
+
9
+
1
10
  <a name="v2.23.1"></a>
2
11
  ### v2.23.1 (2018-06-23)
3
12
 
@@ -1,3 +1,3 @@
1
1
  module PactBroker
2
- VERSION = '2.23.1'
2
+ VERSION = '2.23.2'
3
3
  end
@@ -31,6 +31,7 @@ module PactBroker
31
31
  attributes = {
32
32
  method: http_method,
33
33
  url: build_url(context[:pact], context[:verification]),
34
+ headers: headers,
34
35
  username: username,
35
36
  password: password,
36
37
  uuid: uuid,
@@ -47,7 +47,7 @@ TestDataBuilder.new
47
47
  .create_global_webhook(method: 'GET', url: "http://example.org?consumer=${pactbroker.consumerName}&provider=${pactbroker.providerName}")
48
48
  .create_certificate(path: 'spec/fixtures/certificates/self-signed.badssl.com.pem')
49
49
  .create_consumer("Bethtest")
50
- .create_verification_webhook(method: 'POST', url: "http://localhost:9292", body: webhook_body, username: "foo", password: "bar")
50
+ .create_verification_webhook(method: 'GET', url: "http://localhost:9292", body: webhook_body, username: "foo", password: "bar", headers: {"Accept" => "application/json"})
51
51
  .create_consumer("Foo")
52
52
  .create_label("microservice")
53
53
  .create_provider("Bar")
@@ -10,7 +10,8 @@ module PactBroker
10
10
  username: "foo",
11
11
  password: "bar",
12
12
  uuid: "1234",
13
- body: body
13
+ body: body,
14
+ headers: {'Foo' => 'bar'}
14
15
  }
15
16
  end
16
17
 
@@ -21,7 +22,8 @@ module PactBroker
21
22
  username: "foo",
22
23
  password: "bar",
23
24
  uuid: "1234",
24
- body: built_body
25
+ body: built_body,
26
+ headers: {'Foo' => 'bar'}
25
27
  }
26
28
  end
27
29
 
@@ -255,14 +255,14 @@ class TestDataBuilder
255
255
  params[:events] || [{ name: PactBroker::Webhooks::WebhookEvent::DEFAULT_EVENT_NAME }]
256
256
  end
257
257
  events = event_params.collect{ |e| PactBroker::Webhooks::WebhookEvent.new(e) }
258
- default_params = { method: 'POST', url: 'http://example.org', headers: {'Content-Type' => 'application/json'}}
258
+ default_params = { method: 'POST', url: 'http://example.org', headers: {'Content-Type' => 'application/json'}, username: params[:username], password: params[:password]}
259
259
  request = PactBroker::Webhooks::WebhookRequestTemplate.new(default_params.merge(params))
260
260
  @webhook = PactBroker::Webhooks::Repository.new.create uuid, PactBroker::Domain::Webhook.new(request: request, events: events), consumer, provider
261
261
  self
262
262
  end
263
263
 
264
264
  def create_verification_webhook parameters = {}
265
- create_webhook(parameters.merge(event_names: PactBroker::Webhooks::WebhookEvent::VERIFICATION_PUBLISHED))
265
+ create_webhook(parameters.merge(event_names: [PactBroker::Webhooks::WebhookEvent::VERIFICATION_PUBLISHED]))
266
266
  end
267
267
 
268
268
  def create_global_webhook parameters = {}
@@ -277,10 +277,6 @@ class TestDataBuilder
277
277
  create_webhook(parameters.merge(provider: nil))
278
278
  end
279
279
 
280
- def create_verification_webhook params = {}
281
- create_webhook params.merge(events: [{ name: PactBroker::Webhooks::WebhookEvent::VERIFICATION_PUBLISHED }])
282
- end
283
-
284
280
  def create_triggered_webhook params = {}
285
281
  params.delete(:comment)
286
282
  trigger_uuid = params[:trigger_uuid] || webhook_service.next_uuid
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.23.1
4
+ version: 2.23.2
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: 2018-06-22 00:00:00.000000000 Z
13
+ date: 2018-06-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty