pact 1.48.0 → 1.49.1

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
  SHA256:
3
- metadata.gz: bf71975a44b67d9faeb43a80011d0ead09414a0effc2ae080036ebd44e0d8c2d
4
- data.tar.gz: 2161386666d724d2cebf7c1dda996880072c89046f3296f1bc1cffd178b0f259
3
+ metadata.gz: 245a9df2329523daa0698effa23fa7819e9bcbc04d09c649bae43e4dc7311d35
4
+ data.tar.gz: 49b657c4124b7b2d539792e8a169896036835b78570ca37d9767a63c360fd200
5
5
  SHA512:
6
- metadata.gz: a753e3b4f884b640707600f948c83e5f4a99bf8d9d3c5250f28aa9b6f11b5aed3154aa9459bad25dc17e96be1ace9b25944b46a69076a5d2734ab18a1711f90e
7
- data.tar.gz: a6dc4d42755cde3d2c94e3a0a1bb5c6405db7c4397744a0800bb1fea9d5764365ef60d47e474c4b3c037029531762ddcbd0da6940e931b15b0fe4650a6902ef1
6
+ metadata.gz: 1e76e4b52d827927861b3149bca52cb91bb1a86788a4b26fde0e32602f51095bc914ec442827f481bc36d068d216d4ec3d8a08220cd5b095e97b46c2ce341b78
7
+ data.tar.gz: ef83e7097b4804a686fad3a88c8d157bb517f550b8ab95d6985251c2336323681b6ff324fbb49a0f0d1e01aa0fa570959bd5ca521ac10aff3eaea2dcf9be85d1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ <a name="v1.49.1"></a>
2
+ ### v1.49.1 (2020-03-21)
3
+
4
+
5
+ #### Bug Fixes
6
+
7
+ * ensure diff is included in the json output ([0bd9753](/../../commit/0bd9753))
8
+ * ensure the presence of basic auth credentials does not cause an error when displaying the path of a pact on the local filesystem ([f6a0b4d](/../../commit/f6a0b4d))
9
+
10
+
11
+ <a name="v1.49.0"></a>
12
+ ### v1.49.0 (2020-02-18)
13
+
14
+
15
+ #### Features
16
+
17
+ * use environment variables PACT_BROKER_USERNAME and PACT_BROKER_PASSWORD when verifying a pact by URL, if the environment variables are present ([308f25d](/../../commit/308f25d))
18
+
19
+
1
20
  <a name="v1.48.0"></a>
2
21
  ### v1.48.0 (2020-02-13)
3
22
 
@@ -56,9 +56,11 @@ module Pact
56
56
 
57
57
  def run_with_pact_url_string
58
58
  pact_repository_uri_options = {}
59
+ pact_repository_uri_options[:username] = ENV['PACT_BROKER_USERNAME'] if ENV['PACT_BROKER_USERNAME']
60
+ pact_repository_uri_options[:password] = ENV['PACT_BROKER_PASSWORD'] if ENV['PACT_BROKER_PASSWORD']
61
+ pact_repository_uri_options[:token] = ENV['PACT_BROKER_TOKEN']
59
62
  pact_repository_uri_options[:username] = options[:pact_broker_username] if options[:pact_broker_username]
60
63
  pact_repository_uri_options[:password] = options[:pact_broker_password] if options[:pact_broker_password]
61
- pact_repository_uri_options[:token] = ENV['PACT_BROKER_TOKEN']
62
64
  pact_uri = ::Pact::Provider::PactURI.new(options[:pact_uri], pact_repository_uri_options)
63
65
  Pact::Provider::PactSpecRunner.new([pact_uri], pact_spec_options).run
64
66
  end
@@ -29,10 +29,10 @@ module Pact
29
29
  end
30
30
 
31
31
  def to_s
32
- if(basic_auth?)
32
+ if basic_auth? && uri.start_with?('http://', 'https://')
33
33
  URI(@uri).tap { |x| x.userinfo="#{username}:*****"}.to_s
34
34
  else
35
- @uri
35
+ uri
36
36
  end
37
37
  end
38
38
  end
@@ -30,13 +30,15 @@ module Pact
30
30
  output_hash[:examples] = notification.examples.map do |example|
31
31
  format_example(example).tap do |hash|
32
32
  e = example.exception
33
- # No point providing a backtrace for a mismatch, too much noise
34
- if e && ! e.is_a?(::RSpec::Expectations::ExpectationNotMetError)
33
+ if e
35
34
  hash[:exception] = {
36
- :class => e.class.name,
37
- :message => e.message,
38
- :backtrace => e.backtrace,
35
+ class: e.class.name,
36
+ message: e.message,
39
37
  }
38
+ # No point providing a backtrace for a mismatch, too much noise
39
+ if !e.is_a?(::RSpec::Expectations::ExpectationNotMetError)
40
+ hash[:exception][:backtrace]
41
+ end
40
42
  end
41
43
  end
42
44
  end
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.48.0"
3
+ VERSION = "1.49.1"
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.48.0
4
+ version: 1.49.1
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: 2020-02-13 00:00:00.000000000 Z
15
+ date: 2020-03-21 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec