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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4977d1d79d691b6825034ac05aaf84261ced3e7ebdad2b000e28fc0307a8864
|
4
|
+
data.tar.gz: a0685cfb4a9e2af1e64b0e0885170e86bcbc8564b6d99f42e3bc6df0408f9d3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 599bd994c3d9abe122ec925c2717b28acf68761fc6dcde7138251c5ba98a35765ad018f3ebb11e4c0c76231e941d6173b475948904bf465b82da96dad22abce0
|
7
|
+
data.tar.gz: 497bc3626ba25a40dc65791967754f3fb2ccc1fb7d3dd7e89989fd31e982141ca664272d3cc2a5db4db2639fcd04773a7c0603a175638b6bcaef04fa9b8c2871
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
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
|
data/lib/pact/version.rb
CHANGED
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.
|
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-
|
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
|