docker-armada 2.9.0 → 2.9.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 403ae99285b97c3c3032440db767628a8fa2876e
4
- data.tar.gz: bc5a27e415ae56faa4ef5885c92ddb1ae852ad7d
3
+ metadata.gz: 3736e08a4a96d2d25595cc4ea868846c3b24f396
4
+ data.tar.gz: f9e925d2fb2a4a7cfa357e2621d5fae915966231
5
5
  SHA512:
6
- metadata.gz: a7710d1c50edcd5b06ee5c199c343a8a4196eedbe0257e3fab7e892a201379733fe15c7debef106019706dd8ded6cf3bbd3911bed8265a28f23ec6e5415c65f3
7
- data.tar.gz: b5407fdabb2fe90a90fbdbf0e803186bb64e357de021fb1a5fb098ad5fbf32d54fe87c7155805170e5e8cfb0fa4cb52b68909932fd895670a77845fb1cd705c4
6
+ metadata.gz: a8a188a837b9b39b6ff9330486ee0603e355f6c8e221a49cb87a7b62cbe5e6e2e9a70546e9e29de2c1ae892f26a9ff715a7d1b0f5845aaf14f408a7788422137
7
+ data.tar.gz: eb4a628a1d631aa4276d6e44f5ce82ffbb09e05c4bf53f1062146880c21f55adc62275aff5e7407e331fa68b4e146efd8b0f18b7d0a53e871a95a76c472f121d
@@ -24,12 +24,11 @@ module Armada
24
24
 
25
25
  def connection_opts
26
26
  opts = {}
27
-
28
27
  if cert_path = ENV['DOCKER_CERT_PATH']
29
28
  opts[:client_cert] = File.join(cert_path, 'cert.pem')
30
29
  opts[:client_key] = File.join(cert_path, 'key.pem')
31
30
  opts[:ssl_ca_file] = File.join(cert_path, 'ca.pem')
32
- opts[:ssl_verify_peer] = false if @gateway
31
+ opts[:ssl_verify_peer] = @gateway ? false : ENV['DOCKER_TLS_VERIFY'] == '1'
33
32
  end
34
33
 
35
34
  opts
@@ -19,6 +19,9 @@ describe Armada::Connection::Docker do
19
19
  end
20
20
  end
21
21
 
22
+ context 'when docker tls verify is set' do
23
+ end
24
+
22
25
  context 'when certificate path is set' do
23
26
  before(:each) { ENV['DOCKER_CERT_PATH'] = '/some/cert/path' }
24
27
 
@@ -31,8 +34,24 @@ describe Armada::Connection::Docker do
31
34
  context 'connection options' do
32
35
  subject { connection.options }
33
36
 
34
- it { should include(:client_cert, :client_key, :ssl_ca_file) }
35
- it { should_not include(:ssl_verify_peer) }
37
+ it { should include(:client_cert, :client_key, :ssl_ca_file, :ssl_verify_peer) }
38
+ its([:ssl_verify_peer]) { should be_false }
39
+ end
40
+
41
+ context 'disable TLS verify' do
42
+ before(:each) { ENV['DOCKER_TLS_VERIFY'] = '0'}
43
+ subject { connection.options }
44
+
45
+ it { should include(:client_cert, :client_key, :ssl_ca_file, :ssl_verify_peer) }
46
+ its([:ssl_verify_peer]) { should be_false }
47
+ end
48
+
49
+ context 'enable TLS verify' do
50
+ before(:each) { ENV['DOCKER_TLS_VERIFY'] = '1'}
51
+ subject { connection.options }
52
+
53
+ it { should include(:client_cert, :client_key, :ssl_ca_file, :ssl_verify_peer) }
54
+ its([:ssl_verify_peer]) { should be_true }
36
55
  end
37
56
  end
38
57
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-armada
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Chauncey
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-02-19 00:00:00.000000000 Z
13
+ date: 2015-03-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: excon