pact_broker-client 1.14.0 → 1.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +2 -0
- data/appveyor.yml +5 -0
- data/lib/pact_broker/client/base_client.rb +2 -0
- data/lib/pact_broker/client/version.rb +1 -1
- data/pact-broker-client.gemspec +1 -1
- data/script/release.sh +1 -0
- data/spec/integration/can_i_deploy_spec.rb +4 -1
- data/spec/integration/create_version_tag_spec.rb +3 -1
- data/spec/lib/pact_broker/client/base_client_spec.rb +33 -5
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 248090608d865d4caff97852be57c879821c6767
|
4
|
+
data.tar.gz: bcfc7f660910fec55e2d0208dc21e89482c907aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 214e544bab894ddad7bd80778805321c97c923d2b9868913a060c7ca03ff6a0b1d723257de0b22242c8a9bd6627f951cbddd2e0b695efe130c1b4dba0a4f60fa
|
7
|
+
data.tar.gz: 6826472a396a78d8d09f956ad14bb0667fba4f1cd72883d348b7139e81e787e65b05c8d07805c06fa46d9df44e416856f0acd447e73c40c5c4fe69496a98cdfb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -16,6 +16,8 @@ Add `gem 'pact_broker-client'` to your Gemfile and run `bundle install`, or inst
|
|
16
16
|
|
17
17
|
## Usage - CLI
|
18
18
|
|
19
|
+
To connect to a Pact Broker that uses custom SSL cerificates, set the environment variable `$SSL_CERT_FILE` or `$SSL_CERT_DIR` to a path that contains the appropriate certificate.
|
20
|
+
|
19
21
|
### publish
|
20
22
|
|
21
23
|
```
|
data/appveyor.yml
CHANGED
@@ -43,6 +43,8 @@ module PactBroker
|
|
43
43
|
self.class.base_uri base_url
|
44
44
|
self.class.debug_output($stderr) if verbose?
|
45
45
|
self.class.basic_auth(client_options[:basic_auth][:username], client_options[:basic_auth][:password]) if client_options[:basic_auth]
|
46
|
+
self.class.ssl_ca_file(ENV['SSL_CERT_FILE']) if ENV['SSL_CERT_FILE'] && ENV['SSL_CERT_FILE'] != ''
|
47
|
+
self.class.ssl_ca_path(ENV['SSL_CERT_DIR']) if ENV['SSL_CERT_DIR'] && ENV['SSL_CERT_DIR'] != ''
|
46
48
|
end
|
47
49
|
|
48
50
|
def default_request_headers
|
data/pact-broker-client.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |gem|
|
|
29
29
|
|
30
30
|
gem.add_development_dependency 'fakefs', '~> 0.4'
|
31
31
|
gem.add_development_dependency 'webmock', '~> 3.0'
|
32
|
-
gem.add_development_dependency 'conventional-changelog'
|
32
|
+
gem.add_development_dependency 'conventional-changelog', '~>1.3'
|
33
33
|
gem.add_development_dependency 'pact', '~> 1.16'
|
34
34
|
gem.add_development_dependency 'bump', '~> 0.5'
|
35
35
|
end
|
data/script/release.sh
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
is_windows = !!RbConfig::CONFIG['host_os'] =~ /bccwin|cygwin|djgpp|mingw|mswin|wince/
|
2
|
+
|
3
|
+
describe "pact-broker can-i-deploy", pending: is_windows do
|
2
4
|
before(:all) do
|
3
5
|
@pipe = IO.popen("bundle exec pact-stub-service spec/pacts/pact_broker_client-pact_broker.json -p 5000")
|
4
6
|
sleep 2
|
@@ -9,6 +11,7 @@ describe "pact-broker can-i-deploy" do
|
|
9
11
|
|
10
12
|
it "returns a success exit code" do
|
11
13
|
subject
|
14
|
+
puts subject unless $?.exitstatus == 0
|
12
15
|
expect($?.exitstatus).to eq 0
|
13
16
|
expect(subject).to match /CONSUMER/
|
14
17
|
expect(subject).to match /Foo/
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
is_windows = !!RbConfig::CONFIG['host_os'] =~ /bccwin|cygwin|djgpp|mingw|mswin|wince/
|
2
|
+
|
3
|
+
describe "pact-broker create-version-tag", pending: is_windows do
|
2
4
|
before(:all) do
|
3
5
|
@pipe = IO.popen("bundle exec pact-stub-service spec/pacts/pact_broker_client-pact_broker.json -p 5001")
|
4
6
|
sleep 2
|
@@ -17,7 +17,7 @@ module PactBroker
|
|
17
17
|
}
|
18
18
|
end
|
19
19
|
context 'with basic url' do
|
20
|
-
it '
|
20
|
+
it 'sets the base url' do
|
21
21
|
base_client = BaseClient.new(base_url: base_url)
|
22
22
|
expect(base_client.base_url).to eq(base_url)
|
23
23
|
expect(BaseClient.base_uri).to eq(base_url)
|
@@ -26,11 +26,11 @@ module PactBroker
|
|
26
26
|
|
27
27
|
context 'with client options' do
|
28
28
|
subject { BaseClient.new(base_url: base_url, client_options: client_options) }
|
29
|
-
it '
|
29
|
+
it 'sets the client options ' do
|
30
30
|
expect(subject.client_options).to eq(client_options)
|
31
31
|
end
|
32
32
|
|
33
|
-
it '
|
33
|
+
it 'sets the httpparty basic auth when client options contains basic auth' do
|
34
34
|
expect(BaseClient).to receive(:basic_auth).with(username, password)
|
35
35
|
subject
|
36
36
|
end
|
@@ -38,16 +38,44 @@ module PactBroker
|
|
38
38
|
|
39
39
|
context 'without client options' do
|
40
40
|
subject { BaseClient.new(base_url: base_url) }
|
41
|
-
it '
|
41
|
+
it 'set the client options to empty hash ' do
|
42
42
|
expect(subject.client_options).to eq({})
|
43
43
|
end
|
44
44
|
|
45
|
-
it '
|
45
|
+
it 'does not set the httpparty basic auth' do
|
46
46
|
expect(BaseClient).to_not receive(:basic_auth).with(username, password)
|
47
47
|
subject
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
+
context 'when the SSL_CERT_FILE environment variable is set' do
|
52
|
+
before do
|
53
|
+
allow(ENV).to receive(:[]).and_call_original
|
54
|
+
allow(ENV).to receive(:[]).with('SSL_CERT_FILE').and_return('ssl_cert_file')
|
55
|
+
end
|
56
|
+
|
57
|
+
subject { BaseClient.new(base_url: base_url) }
|
58
|
+
|
59
|
+
it 'sets the ssl_ca_file' do
|
60
|
+
expect(BaseClient).to receive(:ssl_ca_file).with('ssl_cert_file')
|
61
|
+
subject
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
context 'when the SSL_CERT_DIR environment variable is set' do
|
66
|
+
before do
|
67
|
+
allow(ENV).to receive(:[]).and_call_original
|
68
|
+
allow(ENV).to receive(:[]).with('SSL_CERT_DIR').and_return('ssl_cert_dir')
|
69
|
+
end
|
70
|
+
|
71
|
+
subject { BaseClient.new(base_url: base_url) }
|
72
|
+
|
73
|
+
it 'sets the ssl_ca_file' do
|
74
|
+
expect(BaseClient).to receive(:ssl_ca_path).with('ssl_cert_dir')
|
75
|
+
subject
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
51
79
|
describe "url_for_relation" do
|
52
80
|
let(:index_body) do
|
53
81
|
{
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact_broker-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Beth Skurrie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -112,16 +112,16 @@ dependencies:
|
|
112
112
|
name: conventional-changelog
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '1.3'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '1.3'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: pact
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|