pact 1.31.0 → 1.32.0

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: 3246206b449a6e86f34238c21b65d9c7398bacbe
4
- data.tar.gz: 81e315d3a515245380b74d5bd0af808907509915
3
+ metadata.gz: 31e15b6e6c38268de6f34ce8666124734fda01d1
4
+ data.tar.gz: f8cbed9ab225aa39984bab1a4380577a4cbadc6d
5
5
  SHA512:
6
- metadata.gz: 8e639c95f870d765157461662325b366ff13b2cde410225a02e52544f06cc030338bb291ab284fb8f7bce93ddc696c9059c051884b7d2bda1bb644fde99eac6f
7
- data.tar.gz: fcbd756e9af2cb0b5cbce44dbbd6afcb75d986b9c20477c2286d1c21bcee26fe7339d309886553019607901ac40d34c322b89a1fa565887e16e6dc606b472fd9
6
+ metadata.gz: 649d77730ab50b7ed08fcf381f86c1a025c8cd024bb9193709d5c7c7c3341c7395fb21f37bfae58ad961363d8afb005e043c69eae5800e98a3cdde62cd12b1f7
7
+ data.tar.gz: 2e8da320393e66e3e3487ce7249ea3a825d23c304f1ed213bfe1590ac834524319b7132261a69d698aeba6d7ca4be3b1cd1f9f34cd8f1085f07466531bbe35f9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ <a name="v1.32.0"></a>
2
+ ### v1.32.0 (2018-07-25)
3
+
4
+
5
+ #### Features
6
+
7
+ * add actual pact message contents to results published to Pact Broker ([09e9d89](/../../commit/09e9d89))
8
+
9
+
1
10
  <a name="v1.31.0"></a>
2
11
  ### v1.31.0 (2018-07-25)
3
12
 
@@ -110,20 +110,21 @@ module Pact
110
110
  include Pact::RSpec::Matchers
111
111
  extend Pact::Matchers::Messages
112
112
 
113
- let(:expected_content) { expected_response.body[:contents].as_json }
113
+ let(:expected_contents) { expected_response.body[:contents].as_json }
114
114
  let(:response) { interaction_context.last_response }
115
115
  let(:differ) { Pact.configuration.body_differ_for_content_type diff_content_type }
116
116
  let(:diff_formatter) { Pact.configuration.diff_formatter_for_content_type diff_content_type }
117
117
  let(:diff_options) { { with: differ, diff_formatter: diff_formatter } }
118
118
  let(:diff_content_type) { 'application/json' }
119
119
  let(:response_body) { parse_body_from_response(response) }
120
- let(:actual_content) { response_body['contents'] }
120
+ let(:actual_contents) { response_body['contents'] }
121
121
 
122
122
  it "has matching content" do | example |
123
123
  if response.status != 200
124
124
  raise "An error was raised while verifying the message. The response body is: #{response.body}"
125
125
  end
126
- expect(actual_content).to match_term expected_content, diff_options, example
126
+ set_metadata(example, :pact_actual_contents, actual_contents)
127
+ expect(actual_contents).to match_term expected_contents, diff_options, example
127
128
  end
128
129
  end
129
130
 
@@ -59,6 +59,10 @@ module Pact
59
59
  hash[:actualBody] = example.metadata[:pact_actual_body]
60
60
  end
61
61
 
62
+ if example.metadata[:pact_actual_contents]
63
+ hash[:actualContents] = example.metadata[:pact_actual_contents]
64
+ end
65
+
62
66
  if example.metadata[:pact_diff]
63
67
  hash[:differences] = Pact::Matchers::ExtractDiffMessages.call(example.metadata[:pact_diff])
64
68
  .to_a
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.31.0"
3
+ VERSION = "1.32.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.31.0
4
+ version: 1.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fraser