pact-provider-verifier 1.28.0 → 1.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/pact/provider_verifier/app.rb +0 -3
- data/lib/pact/provider_verifier/cli/verify.rb +8 -0
- data/lib/pact/provider_verifier/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63532bb1b371a5f8fa5ea69e5393eaab586a49183799d01713cde4ad06737152
|
4
|
+
data.tar.gz: a638f33f5391338163da93202a4bf994e374f39cb930838b5ca54870618f7684
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1bc90f19b67c6dc051c43088ff736554d02990a1ea4abea5b965d0d3f388c2fe7773acb312c572e0e51b2047878ee31e93f0715621e708e36f82ca9ff9743ed
|
7
|
+
data.tar.gz: 6ae247c50649cd281331b848fcf3c2e3be93bf6328154904778c8e355dffda704b58bb0ae70da115b91861a90e836add5104ef730db48995056d2029cc92eff0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
<a name="v1.29.0-1"></a>
|
2
|
+
### v1.29.0-1 (2020-02-18)
|
3
|
+
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* **cli**
|
8
|
+
* raise an error when basic auth credentials and bearer token are set at the same time ([7f4507e](/../../commit/7f4507e))
|
9
|
+
|
10
|
+
|
1
11
|
<a name="v1.28.0-1"></a>
|
2
12
|
### v1.28.0-1 (2020-01-22)
|
3
13
|
|
@@ -157,9 +157,6 @@ module Pact
|
|
157
157
|
pact_helper: PROXY_PACT_HELPER,
|
158
158
|
pact_uri: pact_uri,
|
159
159
|
backtrace: ENV['BACKTRACE'] == 'true',
|
160
|
-
pact_broker_username: options.broker_username,
|
161
|
-
pact_broker_password: options.broker_password,
|
162
|
-
pact_broker_token: options.broker_token,
|
163
160
|
format: options.format,
|
164
161
|
out: options.out,
|
165
162
|
request_customizer: ProviderStates::AddProviderStatesHeader
|
@@ -15,6 +15,7 @@ module Pact
|
|
15
15
|
class Verify < CustomThor
|
16
16
|
|
17
17
|
class InvalidArgumentsError < ::Thor::Error; end
|
18
|
+
class AuthError < ::Thor::Error; end
|
18
19
|
|
19
20
|
SELECTOR_DOCS = "Selectors: These are specified using JSON strings. The keys are 'tag' (the name of the consumer version tag) and 'latest' (true|false). " +
|
20
21
|
"For example '{\"tag\": \"master\", \"latest\": true}'. For a detailed explanation of selectors, see https://pact.io/selectors"
|
@@ -49,6 +50,7 @@ module Pact
|
|
49
50
|
method_option :wait, banner: "SECONDS", required: false, type: :numeric, desc: "The number of seconds to poll for the provider to become available before running the verification", default: 0
|
50
51
|
|
51
52
|
def verify(*pact_urls)
|
53
|
+
validate_credentials
|
52
54
|
validate_verify
|
53
55
|
print_deprecation_warnings
|
54
56
|
success = Pact::ProviderVerifier::App.call(merged_urls(pact_urls), options)
|
@@ -75,6 +77,12 @@ module Pact
|
|
75
77
|
end
|
76
78
|
end
|
77
79
|
|
80
|
+
def validate_credentials
|
81
|
+
if (options.broker_username || ENV['PACT_BROKER_USERNAME']) && (options.broker_token || ENV['PACT_BROKER_TOKEN'])
|
82
|
+
raise AuthError, "You cannot provide both a username/password and a bearer token. If your Pact Broker uses a bearer token, please remove the username and password configuration."
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
78
86
|
def validate_verify
|
79
87
|
if options.pact_broker_base_url && (options.provider.nil? || options.provider == "")
|
80
88
|
raise InvalidArgumentsError, "No value provided for required option '--provider'"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact-provider-verifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.29.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Fellows
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|