kitchen-dokken 0.0.21 → 0.0.22
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/lib/kitchen/driver/dokken_version.rb +1 -1
- data/lib/kitchen/provisioner/dokken.rb +1 -0
- data/lib/kitchen/transport/dokken.rb +23 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 36b8da6c654ccc469295b65a8a7c36b56d67303d
|
|
4
|
+
data.tar.gz: aa39e97b7c800fd927f9a51d4e2c5126e25f40b4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ee146128b290846fc0b15961fcffa5c070bc119bc05ab396f8501b764c780f6a8c4f69eb99fa777abc2baf6f7bef10d79b5b6d37d1057d136a2babff2d9068c
|
|
7
|
+
data.tar.gz: 2b5baf4335b4e956277dfa7a261404097f673827af781b7bc130fdb4196a6eca93e0ece39744335bab1e135f8fb378fc084339e02c3c20608868a22bf7316fb8
|
|
@@ -34,6 +34,9 @@ module Kitchen
|
|
|
34
34
|
#
|
|
35
35
|
# @author Sean OMeara <sean@chef.io>
|
|
36
36
|
class Dokken < Kitchen::Transport::Base
|
|
37
|
+
|
|
38
|
+
include Kitchen::Logging
|
|
39
|
+
|
|
37
40
|
kitchen_transport_api_version 1
|
|
38
41
|
|
|
39
42
|
plugin_version Kitchen::VERSION
|
|
@@ -55,6 +58,20 @@ module Kitchen
|
|
|
55
58
|
|
|
56
59
|
# @author Sean OMeara <sean@chef.io>
|
|
57
60
|
class Connection < Kitchen::Transport::Dokken::Connection
|
|
61
|
+
|
|
62
|
+
def initialize(options = {})
|
|
63
|
+
init_options(options)
|
|
64
|
+
|
|
65
|
+
if block_given?
|
|
66
|
+
yield self
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def init_options(options)
|
|
71
|
+
@options = options.dup
|
|
72
|
+
@logger = @options.delete(:logger) || Kitchen.logger
|
|
73
|
+
end
|
|
74
|
+
|
|
58
75
|
def docker_connection
|
|
59
76
|
@docker_connection ||= Docker::Connection.new(options[:docker_host_url], options[:docker_host_options])
|
|
60
77
|
end
|
|
@@ -64,7 +81,9 @@ module Kitchen
|
|
|
64
81
|
|
|
65
82
|
with_retries { @runner = Docker::Container.get(instance_name, {}, docker_connection) }
|
|
66
83
|
with_retries do
|
|
67
|
-
o = @runner.exec(Shellwords.shellwords(command))
|
|
84
|
+
o = @runner.exec(Shellwords.shellwords(command)) do |_stream, chunk|
|
|
85
|
+
logger << (chunk + "\n")
|
|
86
|
+
end
|
|
68
87
|
@exit_code = o[2]
|
|
69
88
|
end
|
|
70
89
|
|
|
@@ -160,7 +179,9 @@ module Kitchen
|
|
|
160
179
|
# @return [Hash] hash of connection options
|
|
161
180
|
# @api private
|
|
162
181
|
def connection_options(data) # rubocop:disable Metrics/MethodLength
|
|
163
|
-
opts = {
|
|
182
|
+
opts = {
|
|
183
|
+
:logger => logger
|
|
184
|
+
}
|
|
164
185
|
opts[:docker_host_url] = config[:docker_host_url]
|
|
165
186
|
opts[:docker_host_options] = Docker.options
|
|
166
187
|
opts[:data_container] = data[:data_container]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-dokken
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.22
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sean OMeara
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|