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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3be2902ef57a2367371bbc65a68394875f91e2c2
4
- data.tar.gz: 2717b8043ad6ea83c97668153b4ed1ec644f20ce
3
+ metadata.gz: 248090608d865d4caff97852be57c879821c6767
4
+ data.tar.gz: bcfc7f660910fec55e2d0208dc21e89482c907aa
5
5
  SHA512:
6
- metadata.gz: 23f6c7c6cbd7910dd3bc27f704cd6e8e8cb69c27587c6c5f49c20d63cc158a4879ff6483bc43088441ed066f74edaf6e467878dbff3198eb25bc31e362c6d20d
7
- data.tar.gz: 88e25959d7e6c29b405ef277ca40544287a32c3453774f993d639651dc1fb5e815f7b59e08c1dab12bf0bd13c246baf448bfe0a454ef802fb6a89f001e9af701
6
+ metadata.gz: 214e544bab894ddad7bd80778805321c97c923d2b9868913a060c7ca03ff6a0b1d723257de0b22242c8a9bd6627f951cbddd2e0b695efe130c1b4dba0a4f60fa
7
+ data.tar.gz: 6826472a396a78d8d09f956ad14bb0667fba4f1cd72883d348b7139e81e787e65b05c8d07805c06fa46d9df44e416856f0acd447e73c40c5c4fe69496a98cdfb
@@ -1,3 +1,12 @@
1
+ <a name="v1.14.1"></a>
2
+ ### v1.14.1 (2018-04-11)
3
+
4
+
5
+ #### Bug Fixes
6
+
7
+ * use SSL_CERT_FILE and SSL_CERT_DIR environment variables for https connections ([e4e7a15](/../../commit/e4e7a15))
8
+
9
+
1
10
  <a name="v1.14.0"></a>
2
11
  ### v1.14.0 (2018-01-25)
3
12
 
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
  ```
@@ -15,3 +15,8 @@ before_test:
15
15
 
16
16
  test_script:
17
17
  - bundle exec rake
18
+
19
+ notifications:
20
+ - provider: Slack
21
+ incoming_webhook:
22
+ secure: zUujuzaZFqpFndOFkoIMkXMFTniWWi0ZtR58PN63c796EcWHJEyOf+XBi81LPrBBKzQYiY1auI1gkNt+ESnJXLxSzY+Q1bbncwN35hc2J84=
@@ -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
@@ -1,5 +1,5 @@
1
1
  module PactBroker
2
2
  module Client
3
- VERSION = '1.14.0'
3
+ VERSION = '1.14.1'
4
4
  end
5
5
  end
@@ -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
@@ -1,6 +1,7 @@
1
1
  #!/bin/sh
2
2
  set -e
3
3
 
4
+ bundle exec rake
4
5
  bundle exec bump ${1:-minor} --no-commit
5
6
  bundle exec rake generate_changelog
6
7
  git add CHANGELOG.md lib/pact_broker/client/version.rb
@@ -1,4 +1,6 @@
1
- describe "pact-broker can-i-deploy" do
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
- describe "pact-broker create-version-tag" do
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 'should set base url' do
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 'should set client options ' do
29
+ it 'sets the client options ' do
30
30
  expect(subject.client_options).to eq(client_options)
31
31
  end
32
32
 
33
- it 'should set httpparty basic auth when client options contains basic auth' do
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 'should set client options to empty hash ' do
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 'should not set httpparty basic auth' do
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.0
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-01-25 00:00:00.000000000 Z
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: '0'
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: '0'
124
+ version: '1.3'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: pact
127
127
  requirement: !ruby/object:Gem::Requirement