kitchen-dokken 0.0.22 → 0.0.23
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 +0 -1
- data/lib/kitchen/transport/dokken.rb +2 -23
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0edd89b1a8ca57b530bc8d7da5b85be8d4c0a866
|
|
4
|
+
data.tar.gz: 7a744621f00838d970447eb5b599a1ffa0e86ffe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49297a14a6b0ba30aacc081d00c86398075dd6bec125a4c9ea47fc85fae2917704c813da1b4fd4cc134108f17fb3c0959883db31992da37d6f2f5a54c4baaf0a
|
|
7
|
+
data.tar.gz: 69d3a53256a6ca28d7fa70d3aa3351cbe6a0c67c7e76cad4587efd4a0f8a9fa6d158bf564f580e2d1bc28a23d40a7403f30c7bb4c14a0415ae1b4352f344e6bd
|
|
@@ -34,9 +34,6 @@ 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
|
-
|
|
40
37
|
kitchen_transport_api_version 1
|
|
41
38
|
|
|
42
39
|
plugin_version Kitchen::VERSION
|
|
@@ -58,20 +55,6 @@ module Kitchen
|
|
|
58
55
|
|
|
59
56
|
# @author Sean OMeara <sean@chef.io>
|
|
60
57
|
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
|
-
|
|
75
58
|
def docker_connection
|
|
76
59
|
@docker_connection ||= Docker::Connection.new(options[:docker_host_url], options[:docker_host_options])
|
|
77
60
|
end
|
|
@@ -81,9 +64,7 @@ module Kitchen
|
|
|
81
64
|
|
|
82
65
|
with_retries { @runner = Docker::Container.get(instance_name, {}, docker_connection) }
|
|
83
66
|
with_retries do
|
|
84
|
-
o = @runner.exec(Shellwords.shellwords(command))
|
|
85
|
-
logger << (chunk + "\n")
|
|
86
|
-
end
|
|
67
|
+
o = @runner.exec(Shellwords.shellwords(command)) { |_stream, chunk| print "#{chunk}" }
|
|
87
68
|
@exit_code = o[2]
|
|
88
69
|
end
|
|
89
70
|
|
|
@@ -179,9 +160,7 @@ module Kitchen
|
|
|
179
160
|
# @return [Hash] hash of connection options
|
|
180
161
|
# @api private
|
|
181
162
|
def connection_options(data) # rubocop:disable Metrics/MethodLength
|
|
182
|
-
opts = {
|
|
183
|
-
:logger => logger
|
|
184
|
-
}
|
|
163
|
+
opts = {}
|
|
185
164
|
opts[:docker_host_url] = config[:docker_host_url]
|
|
186
165
|
opts[:docker_host_options] = Docker.options
|
|
187
166
|
opts[:data_container] = data[:data_container]
|