pact 1.33.2 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8db3cf4bee5793b660088bb8b6f26416177775e
4
- data.tar.gz: 57b4d0a5bdca797c96a5e10bb7954113b42aede1
3
+ metadata.gz: cb9f3147fb9ff1878469700cb000042058f043dd
4
+ data.tar.gz: 8c8058099ee03e3fc35081590c217ca5c02663c9
5
5
  SHA512:
6
- metadata.gz: 2106d87fd14e705488cdb1cf85837e621bcda4453fd008e6db93350fe797d003f91093c71bbeb00d3323bceb0ad0b80fa3a3e541036ffca69595a89fc22e1363
7
- data.tar.gz: 40c4bc7b521b1bba584631d9ebf93bcf4c2a1900506cb24b88349ba7f493d41ac5a3c82df48ac7f66f952b4720ba739925adee8bf7fb57851181ef942aa8c40e
6
+ metadata.gz: 54fb5bad27bd4610b9b690d2cf4a332d78a10bcf25d1f6e10b66e5904e76389f61aeba6844fb526365e22f8419465b034984f6275544e5a392c7a016c1772525
7
+ data.tar.gz: 68885f0aabdc5707a6caf763b565eb41532c72a87d960a6179a17b133a48d67693f0f95fd85e20272770690e4a4b5280951efd68cce54dc9ce509a8fb7ee753b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ <a name="v1.34.0"></a>
2
+ ### v1.34.0 (2018-09-06)
3
+
4
+
5
+ #### Features
6
+
7
+ * **verify**
8
+ * add request customizer for pact-provider-verifier ([4ae0b58](/../../commit/4ae0b58))
9
+
10
+
11
+ #### Bug Fixes
12
+
13
+ * add missing require for net/http ([fe2ebb1](/../../commit/fe2ebb1))
14
+
15
+
1
16
  <a name="v1.33.2"></a>
2
17
  ### v1.33.2 (2018-09-06)
3
18
 
@@ -72,7 +72,8 @@ module Pact
72
72
  criteria: SpecCriteria.call(options),
73
73
  format: options[:format],
74
74
  out: options[:out],
75
- ignore_failures: options[:ignore_failures]
75
+ ignore_failures: options[:ignore_failures],
76
+ request_customizer: options[:request_customizer]
76
77
  }
77
78
  end
78
79
  end
@@ -1,4 +1,5 @@
1
1
  require 'pact/retry'
2
+ require 'net/http'
2
3
 
3
4
  module Pact
4
5
  module Hal
@@ -120,7 +120,8 @@ module Pact
120
120
  pact_sources.each do | pact_source |
121
121
  options = {
122
122
  criteria: @options[:criteria],
123
- ignore_failures: @options[:ignore_failures]
123
+ ignore_failures: @options[:ignore_failures],
124
+ request_customizer: @options[:request_customizer]
124
125
  }
125
126
  honour_pactfile pact_source.uri, ordered_pact_json(pact_source.pact_json), options
126
127
  end
@@ -85,7 +85,7 @@ module Pact
85
85
  interaction_context.run_once :before do
86
86
  Pact.configuration.logger.info "Running example '#{Pact::RSpec.full_description(example)}'"
87
87
  set_up_provider_state interaction.provider_state, options[:consumer]
88
- replay_interaction interaction
88
+ replay_interaction interaction, options[:request_customizer]
89
89
  interaction_context.last_response = last_response
90
90
  end
91
91
  end
@@ -14,8 +14,9 @@ module Pact
14
14
  include Pact::Logging
15
15
  include Rack::Test::Methods
16
16
 
17
- def replay_interaction interaction
17
+ def replay_interaction interaction, request_customizer = nil
18
18
  request = Request::Replayable.new(interaction.request)
19
+ request = request_customizer.call(request, interaction) if request_customizer
19
20
  args = [request.path, request.body, request.headers]
20
21
 
21
22
  logger.info "Sending #{request.method.upcase} request to path: \"#{request.path}\" with headers: #{request.headers}, see debug logs for body"
data/lib/pact/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Remember to bump pact-provider-proxy when this changes major version
2
2
  module Pact
3
- VERSION = "1.33.2"
3
+ VERSION = "1.34.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.33.2
4
+ version: 1.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2018-09-05 00:00:00.000000000 Z
15
+ date: 2018-09-06 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: randexp