pact 1.49.2 → 1.49.3

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: dbaf27920b084c3e068879eca948ec784ce829ad8779aea73125ee1c5b947218
4
- data.tar.gz: 5e53c5bf61194d1bfa8e768ece8c8bacaf8c9b096b9f4ba8e8bca89ff28749b2
3
+ metadata.gz: b4977d1d79d691b6825034ac05aaf84261ced3e7ebdad2b000e28fc0307a8864
4
+ data.tar.gz: a0685cfb4a9e2af1e64b0e0885170e86bcbc8564b6d99f42e3bc6df0408f9d3b
5
5
  SHA512:
6
- metadata.gz: 62cd377157130e34e4b8b32e9acea4ae28d00e1c89696520e3afb54f3bc534165179045cc21e9eeba41503b49d195dbd5a31f939edfafa2cd20a088304012aa2
7
- data.tar.gz: b16b23ee357139cefcea6ad97cba99779776e9264b3b0d8653e9ab000a5c7f61af8d4e1b0c42b2ffc47ae32bbc464b6a67496be2ab5ffced6bc843fc8143d6e7
6
+ metadata.gz: 599bd994c3d9abe122ec925c2717b28acf68761fc6dcde7138251c5ba98a35765ad018f3ebb11e4c0c76231e941d6173b475948904bf465b82da96dad22abce0
7
+ data.tar.gz: 497bc3626ba25a40dc65791967754f3fb2ccc1fb7d3dd7e89989fd31e982141ca664272d3cc2a5db4db2639fcd04773a7c0603a175638b6bcaef04fa9b8c2871
@@ -1,3 +1,12 @@
1
+ <a name="v1.49.3"></a>
2
+ ### v1.49.3 (2020-04-22)
3
+
4
+
5
+ #### Bug Fixes
6
+
7
+ * pact selection verification options logging ([9ff59f4](/../../commit/9ff59f4))
8
+
9
+
1
10
  <a name="v1.49.2"></a>
2
11
  ### v1.49.2 (2020-04-08)
3
12
 
@@ -4,10 +4,12 @@ require 'pact/provider/pact_uri'
4
4
  require 'pact/errors'
5
5
  require 'pact/pact_broker/fetch_pacts'
6
6
  require 'pact/pact_broker/notices'
7
+ require 'pact/pact_broker/pact_selection_description'
7
8
 
8
9
  module Pact
9
10
  module PactBroker
10
11
  class FetchPactURIsForVerification
12
+ include PactSelectionDescription
11
13
  attr_reader :provider, :consumer_version_selectors, :provider_version_tags, :broker_base_url, :http_client_options, :http_client, :options
12
14
 
13
15
  PACTS_FOR_VERIFICATION_RELATION = 'beta:provider-pacts-for-verification'.freeze
@@ -84,18 +86,7 @@ module Pact
84
86
  end
85
87
 
86
88
  def log_message
87
- latest = consumer_version_selectors.any? ? "" : "latest "
88
- message = "INFO: Fetching pacts for #{provider} from #{broker_base_url} with the selection criteria: "
89
- if consumer_version_selectors.any?
90
- desc = consumer_version_selectors.collect do |selector|
91
- all_or_latest = selector[:all] ? "all for tag" : "latest for tag"
92
- # TODO support fallback
93
- name = selector[:fallback] ? "#{selector[:tag]} (or #{selector[:fallback]} if not found)" : selector[:tag]
94
- "#{all_or_latest} #{name}"
95
- end.join(", ")
96
- message << ": #{desc}"
97
- end
98
- Pact.configuration.output_stream.puts message
89
+ Pact.configuration.output_stream.puts "INFO: #{pact_selection_description(provider, consumer_version_selectors, options, broker_base_url)}"
99
90
  end
100
91
  end
101
92
  end
@@ -0,0 +1,24 @@
1
+ module Pact
2
+ module PactBroker
3
+ module PactSelectionDescription
4
+ def pact_selection_description(provider, consumer_version_selectors, options, broker_base_url)
5
+ latest = consumer_version_selectors.any? ? "" : "latest "
6
+ message = "Fetching pacts for #{provider} from #{broker_base_url} with the selection criteria: "
7
+ if consumer_version_selectors.any?
8
+ desc = consumer_version_selectors.collect do |selector|
9
+ all_or_latest = !selector[:latest] ? "all for tag" : "latest for tag"
10
+ # TODO support fallback
11
+ fallback = selector[:fallback] || selector[:fallbackTag]
12
+ name = fallback ? "#{selector[:tag]} (or #{fallback} if not found)" : selector[:tag]
13
+ "#{all_or_latest} #{name}"
14
+ end.join(", ")
15
+ if options[:include_wip_pacts_since]
16
+ desc = "#{desc}, work in progress pacts created after #{options[:include_wip_pacts_since]}"
17
+ end
18
+ message << "#{desc}"
19
+ end
20
+ message
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,4 +1,4 @@
1
1
  # Remember to bump pact-provider-proxy when this changes major version
2
2
  module Pact
3
- VERSION = "1.49.2"
3
+ VERSION = "1.49.3"
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.49.2
4
+ version: 1.49.3
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-04-08 00:00:00.000000000 Z
15
+ date: 2020-04-22 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec
@@ -319,6 +319,7 @@ files:
319
319
  - lib/pact/pact_broker/fetch_pact_uris_for_verification.rb
320
320
  - lib/pact/pact_broker/fetch_pacts.rb
321
321
  - lib/pact/pact_broker/notices.rb
322
+ - lib/pact/pact_broker/pact_selection_description.rb
322
323
  - lib/pact/project_root.rb
323
324
  - lib/pact/provider.rb
324
325
  - lib/pact/provider/configuration.rb