pact 1.39.0 → 1.40.0
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 +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/pact/cli.rb +1 -0
- data/lib/pact/cli/run_pact_verification.rb +1 -0
- data/lib/pact/hal/http_client.rb +3 -1
- data/lib/pact/provider/verification_results/publish.rb +1 -7
- data/lib/pact/version.rb +1 -1
- data/pact.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee129d01fa73fcb91d659aa33cae62309053e0af
|
4
|
+
data.tar.gz: 9bb48533af443d5fec321152d45712d84159bf14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b0b467e0dabd5394e9206a0f74261b528870a5a54edc69b9de6be511100631c85bb9a0aed3b3738ce05f0a9c640ad92654220a6da2b51b2984cd3351831000d
|
7
|
+
data.tar.gz: cc95aefba6827fd507fcf9366462a8035acc5027b12221b5801036412e9161fb968d44795e33494c0f21a0a75b6b038820d12dc0511430cb8b68d063d2f77dce
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
<a name="v1.40.0"></a>
|
2
|
+
### v1.40.0 (2019-02-22)
|
3
|
+
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* remove ruby 2.2 tests ([4a30791](/../../commit/4a30791))
|
8
|
+
* add support for bearer token ([297268d](/../../commit/297268d))
|
9
|
+
|
10
|
+
|
1
11
|
<a name="v1.39.0"></a>
|
2
12
|
### v1.39.0 (2019-02-21)
|
3
13
|
|
data/lib/pact/cli.rb
CHANGED
@@ -11,6 +11,7 @@ module Pact
|
|
11
11
|
method_option :ignore_failures, type: :boolean, default: false, desc: "Process will always exit with exit code 0", hide: true
|
12
12
|
method_option :pact_broker_username, aliases: "-u", desc: "Pact broker user name"
|
13
13
|
method_option :pact_broker_password, aliases: "-w", desc: "Pact broker password"
|
14
|
+
method_option :pact_broker_token, aliases: "-k", desc: "Pact broker token"
|
14
15
|
method_option :backtrace, aliases: "-b", desc: "Show full backtrace", :default => false, :type => :boolean
|
15
16
|
method_option :interactions_replay_order, aliases: "-o",
|
16
17
|
desc: "Interactions replay order: randomised or recorded (default)",
|
@@ -56,6 +56,7 @@ module Pact
|
|
56
56
|
pact_repository_uri_options = {}
|
57
57
|
pact_repository_uri_options[:username] = options[:pact_broker_username] if options[:pact_broker_username]
|
58
58
|
pact_repository_uri_options[:password] = options[:pact_broker_password] if options[:pact_broker_password]
|
59
|
+
pact_repository_uri_options[:token] = ENV['PACT_BROKER_TOKEN']
|
59
60
|
pact_uri = ::Pact::Provider::PactURI.new(options[:pact_uri], pact_repository_uri_options)
|
60
61
|
Pact::Provider::PactSpecRunner.new([pact_uri], pact_spec_options).run
|
61
62
|
end
|
data/lib/pact/hal/http_client.rb
CHANGED
@@ -4,12 +4,13 @@ require 'net/http'
|
|
4
4
|
module Pact
|
5
5
|
module Hal
|
6
6
|
class HttpClient
|
7
|
-
attr_accessor :username, :password, :verbose
|
7
|
+
attr_accessor :username, :password, :verbose, :token
|
8
8
|
|
9
9
|
def initialize options
|
10
10
|
@username = options[:username]
|
11
11
|
@password = options[:password]
|
12
12
|
@verbose = options[:verbose]
|
13
|
+
@token = options[:token]
|
13
14
|
end
|
14
15
|
|
15
16
|
def get href, params = {}, headers = {}
|
@@ -39,6 +40,7 @@ module Pact
|
|
39
40
|
|
40
41
|
request.body = body if body
|
41
42
|
request.basic_auth username, password if username
|
43
|
+
request['Authorization'] = "Bearer #{token}" if token
|
42
44
|
request
|
43
45
|
end
|
44
46
|
|
@@ -24,13 +24,7 @@ module Pact
|
|
24
24
|
def initialize pact_source, verification_result
|
25
25
|
@pact_source = pact_source
|
26
26
|
@verification_result = verification_result
|
27
|
-
|
28
|
-
http_client_options = {}
|
29
|
-
if pact_source.uri.basic_auth?
|
30
|
-
http_client_options[:username] = pact_source.uri.username
|
31
|
-
http_client_options[:password] = pact_source.uri.password
|
32
|
-
end
|
33
|
-
|
27
|
+
http_client_options = pact_source.uri.options.reject{ |k, v| ![:username, :password, :token].include?(k) }
|
34
28
|
@http_client = Pact::Hal::HttpClient.new(http_client_options)
|
35
29
|
@pact_entity = Pact::Hal::Entity.new(pact_source.uri, pact_source.pact_hash, http_client)
|
36
30
|
end
|
data/lib/pact/version.rb
CHANGED
data/pact.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |gem|
|
|
28
28
|
gem.add_runtime_dependency 'webrick'
|
29
29
|
gem.add_runtime_dependency 'term-ansicolor', '~> 1.0'
|
30
30
|
|
31
|
-
gem.add_runtime_dependency 'pact-support', '~> 1.
|
31
|
+
gem.add_runtime_dependency 'pact-support', '~> 1.9'
|
32
32
|
gem.add_runtime_dependency 'pact-mock_service', '~> 3.0'
|
33
33
|
|
34
34
|
gem.add_development_dependency 'rake', '~> 10.0.3'
|
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.
|
4
|
+
version: 1.40.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: 2019-
|
15
|
+
date: 2019-03-04 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: randexp
|
@@ -124,14 +124,14 @@ dependencies:
|
|
124
124
|
requirements:
|
125
125
|
- - "~>"
|
126
126
|
- !ruby/object:Gem::Version
|
127
|
-
version: '1.
|
127
|
+
version: '1.9'
|
128
128
|
type: :runtime
|
129
129
|
prerelease: false
|
130
130
|
version_requirements: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
132
|
- - "~>"
|
133
133
|
- !ruby/object:Gem::Version
|
134
|
-
version: '1.
|
134
|
+
version: '1.9'
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: pact-mock_service
|
137
137
|
requirement: !ruby/object:Gem::Requirement
|