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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4616045ef03c7c861b44f787d141e0a29ae665e
4
- data.tar.gz: 2584c8b2027c317fb520b494cb5bc8531a7bda87
3
+ metadata.gz: 36b8da6c654ccc469295b65a8a7c36b56d67303d
4
+ data.tar.gz: aa39e97b7c800fd927f9a51d4e2c5126e25f40b4
5
5
  SHA512:
6
- metadata.gz: 2baef2f71bb31c6734cef4f832f15f44d5cd4666d3c2663aae7a8529830074c84deb9c7bd933aeed42f5ffcc273d9ac974c9f3f220f777a5c950fffd72f31c01
7
- data.tar.gz: b8e09385084554f89835ec37a2ee10038c34616e351978306a1b7c12b0edf874c5216c4f45b312d169b5f6366bd4e1bf3e7aa6fb302f2e51edd4bffc92d73aa9
6
+ metadata.gz: 5ee146128b290846fc0b15961fcffa5c070bc119bc05ab396f8501b764c780f6a8c4f69eb99fa777abc2baf6f7bef10d79b5b6d37d1057d136a2babff2d9068c
7
+ data.tar.gz: 2b5baf4335b4e956277dfa7a261404097f673827af781b7bc130fdb4196a6eca93e0ece39744335bab1e135f8fb378fc084339e02c3c20608868a22bf7316fb8
@@ -19,6 +19,6 @@
19
19
  module Kitchen
20
20
  module Driver
21
21
  # Version string for Dokken Kitchen driver
22
- DOKKEN_VERSION = '0.0.21'
22
+ DOKKEN_VERSION = '0.0.22'
23
23
  end
24
24
  end
@@ -56,6 +56,7 @@ module Kitchen
56
56
  cmd << ' -j /opt/kitchen/dna.json'
57
57
  cmd << ' -l warn'
58
58
  cmd << ' -F doc'
59
+ cmd << ' --no-color'
59
60
  end
60
61
 
61
62
  def runner_container_name
@@ -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)) { |_stream, chunk| print "#{chunk}" }
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.21
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-28 00:00:00.000000000 Z
11
+ date: 2015-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen