pact 1.56.0 → 1.57.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
  SHA256:
3
- metadata.gz: '07691380e13b6856eb1c2df42bf7ce5f360ed46b8e75aff4e122c22f685e45b5'
4
- data.tar.gz: f2ce2cf40b492b0f163fe27732ef09f37c5b1a5061a05e07427807343cfee431
3
+ metadata.gz: 2f5bff8179ed3588a9363fd864b36527a51672bc2f0812778e188f60571975c1
4
+ data.tar.gz: 8bec6ad8f69b8a60836256c261f32c288624ae1a876e452acedfc62daeffebc8
5
5
  SHA512:
6
- metadata.gz: cf78bed99d4180a145ae7edf411a8d6840e622e315f2b1173294ded82288b87d404ef23796e38bb025fea51f8e437a09fc7d5e643835156400bda73cafc64ebe
7
- data.tar.gz: a69c674a42bab959fe7483ac568a2e7102d141f3d861327c1b4f64c4d7e22864f298385917fbbb0b93bcc205565c4233d4a455423885d91a86b315796063c2b4
6
+ metadata.gz: a0638972bc29d64815a6d29fbd46a88092eb0d748e21f0da41cde9e485c63fa1158cbf03d9b4d638d273b1caff78470d07d40377be176804fab62e96aecce043
7
+ data.tar.gz: 9161da6d7c9490db14c7472ca54e0c8a0d7a8fdad65f033694a31db8d80097f3a343098fc41f4c12fb59f12a3ae5a36f2b5503ade581eeb1f9c0f8fb66e74920
@@ -1,3 +1,10 @@
1
+ <a name="v1.57.0"></a>
2
+ ### v1.57.0 (2021-01-27)
3
+
4
+ #### Features
5
+
6
+ * allow verbose flag to be set when publishing verifications ([9238e4c](/../../commit/9238e4c))
7
+
1
8
  <a name="v1.56.0"></a>
2
9
  ### v1.56.0 (2021-01-22)
3
10
 
@@ -16,6 +16,7 @@ module Pact
16
16
  method_option :pact_broker_password, aliases: "-w", desc: "Pact broker password"
17
17
  method_option :pact_broker_token, aliases: "-k", desc: "Pact broker token"
18
18
  method_option :backtrace, aliases: "-b", desc: "Show full backtrace", :default => false, :type => :boolean
19
+ method_option :verbose, aliases: "-v", desc: "Show verbose HTTP logging", :default => false, :type => :boolean
19
20
  method_option :interactions_replay_order, aliases: "-o",
20
21
  desc: "Interactions replay order: randomised or recorded (default)",
21
22
  default: Pact.configuration.interactions_replay_order
@@ -79,6 +79,7 @@ module Pact
79
79
  def pact_spec_options
80
80
  {
81
81
  full_backtrace: options[:backtrace],
82
+ verbose: options[:verbose] || ENV['VERBOSE'] == 'true',
82
83
  criteria: SpecCriteria.call(options),
83
84
  format: options[:format],
84
85
  out: options[:out],
@@ -75,6 +75,7 @@ module Pact
75
75
  end
76
76
 
77
77
  # For the Pact::Provider::RSpec::PactBrokerFormatter
78
+ Pact.provider_world.verbose = options[:verbose]
78
79
  Pact.provider_world.pact_sources = pact_sources
79
80
  jsons = pact_jsons
80
81
  executing_with_ruby = executing_with_ruby?
@@ -36,7 +36,7 @@ module Pact
36
36
  pact_source: pact_source,
37
37
  consumer_contract: consumer_contract,
38
38
  criteria: options[:criteria]
39
- )
39
+ )
40
40
  end
41
41
  end
42
42
 
@@ -25,7 +25,7 @@ module Pact
25
25
  end
26
26
 
27
27
  def close(_notification)
28
- Pact::Provider::VerificationResults::PublishAll.call(Pact.provider_world.pact_sources, output_hash)
28
+ Pact::Provider::VerificationResults::PublishAll.call(Pact.provider_world.pact_sources, output_hash, { verbose: Pact.provider_world.verbose })
29
29
  end
30
30
 
31
31
  private
@@ -17,15 +17,15 @@ module Pact
17
17
  PROVIDER_RELATION = 'pb:provider'.freeze
18
18
  VERSION_TAG_RELATION = 'pb:version-tag'.freeze
19
19
 
20
- def self.call pact_source, verification_result
21
- new(pact_source, verification_result).call
20
+ def self.call pact_source, verification_result, options = {}
21
+ new(pact_source, verification_result, options).call
22
22
  end
23
23
 
24
- def initialize pact_source, verification_result
24
+ def initialize pact_source, verification_result, options = {}
25
25
  @pact_source = pact_source
26
26
  @verification_result = verification_result
27
27
  http_client_options = pact_source.uri.options.reject{ |k, v| ![:username, :password, :token].include?(k) }
28
- @http_client = Pact::Hal::HttpClient.new(http_client_options)
28
+ @http_client = Pact::Hal::HttpClient.new(http_client_options.merge(verbose: options[:verbose]))
29
29
  @pact_entity = Pact::Hal::Entity.new(pact_source.uri, pact_source.pact_hash, http_client)
30
30
  end
31
31
 
@@ -6,20 +6,21 @@ module Pact
6
6
  module VerificationResults
7
7
  class PublishAll
8
8
 
9
- def self.call pact_sources, test_results_hash
10
- new(pact_sources, test_results_hash).call
9
+ def self.call pact_sources, test_results_hash, options = {}
10
+ new(pact_sources, test_results_hash, options).call
11
11
  end
12
12
 
13
- def initialize pact_sources, test_results_hash
13
+ def initialize pact_sources, test_results_hash, options = {}
14
14
  @pact_sources = pact_sources
15
15
  @test_results_hash = test_results_hash
16
+ @options = options
16
17
  end
17
18
 
18
19
  def call
19
20
  verification_results.collect do | (pact_source, verification_result) |
20
21
  published = false
21
22
  begin
22
- published = Publish.call(pact_source, verification_result)
23
+ published = Publish.call(pact_source, verification_result, { verbose: options[:verbose] })
23
24
  ensure
24
25
  print_after_verification_notices(pact_source, verification_result, published)
25
26
  end
@@ -42,7 +43,7 @@ module Pact
42
43
  end
43
44
  end
44
45
 
45
- attr_reader :pact_sources, :test_results_hash
46
+ attr_reader :pact_sources, :test_results_hash, :options
46
47
  end
47
48
  end
48
49
  end
@@ -14,7 +14,7 @@ module Pact
14
14
  module Provider
15
15
  class World
16
16
 
17
- attr_accessor :pact_sources, :failed_examples
17
+ attr_accessor :pact_sources, :failed_examples, :verbose
18
18
 
19
19
  def provider_states
20
20
  @provider_states_proxy ||= Pact::Provider::State::ProviderStateProxy.new
@@ -1,4 +1,4 @@
1
1
  # Remember to bump pact-provider-proxy when this changes major version
2
2
  module Pact
3
- VERSION = "1.56.0"
3
+ VERSION = "1.57.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.56.0
4
+ version: 1.57.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: 2021-01-21 00:00:00.000000000 Z
15
+ date: 2021-01-31 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec
@@ -405,7 +405,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
405
405
  - !ruby/object:Gem::Version
406
406
  version: '0'
407
407
  requirements: []
408
- rubygems_version: 3.2.6
408
+ rubygems_version: 3.2.7
409
409
  signing_key:
410
410
  specification_version: 4
411
411
  summary: Enables consumer driven contract testing, providing a mock service and DSL