kitchen-dokken 2.0.13 → 2.0.14
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 +31 -4
- metadata +1 -2
- data/CHANGELOG.md +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5befb25e9af14115657f2ad87b88c7c384ebf53b
|
|
4
|
+
data.tar.gz: 255c175defd349e3e9ee07fa3f84cdd6527486c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 29606237be93c692d0f3d625f35318b7aed088dd716cbab51be89fd56e03e3e617fd42671bcc90dba2d4f58badd41937d00e343fbd4a93d25b3e2fe235ee6871
|
|
7
|
+
data.tar.gz: c532bea9da3fa79e6e35d7fc6fe3f92e357b2b157d08f12afc56de457f747d9a8b41601620040d8b9667fb53175c7815290e1200aad66f977cc6954c26fd6855
|
|
@@ -31,6 +31,10 @@ module Kitchen
|
|
|
31
31
|
plugin_version Kitchen::VERSION
|
|
32
32
|
|
|
33
33
|
default_config :root_path, '/opt/kitchen'
|
|
34
|
+
default_config :chef_binary, '/opt/chef/embedded/bin/chef-client'
|
|
35
|
+
default_config :chef_options, ' -z'
|
|
36
|
+
default_config :chef_log_level, 'warn'
|
|
37
|
+
default_config :chef_output_format, 'doc'
|
|
34
38
|
|
|
35
39
|
# (see Base#call)
|
|
36
40
|
def call(state)
|
|
@@ -44,16 +48,39 @@ module Kitchen
|
|
|
44
48
|
# cleanup_sandbox
|
|
45
49
|
end
|
|
46
50
|
|
|
51
|
+
def validate_config
|
|
52
|
+
# check if we have an space for the user provided options
|
|
53
|
+
# or add it if not to avoid issues
|
|
54
|
+
unless config[:chef_options].start_with? ' '
|
|
55
|
+
config[:chef_options].prepend(' ')
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# strip spaces from all other options
|
|
59
|
+
config[:chef_binary] = config[:chef_binary].strip
|
|
60
|
+
config[:chef_log_level] = config[:chef_log_level].strip
|
|
61
|
+
config[:chef_output_format] = config[:chef_output_format].strip
|
|
62
|
+
|
|
63
|
+
# if the user wants to be funny and pass empty strings
|
|
64
|
+
# just use the defaults
|
|
65
|
+
if config[:chef_log_level].empty?
|
|
66
|
+
config[:chef_log_level] = 'warn'
|
|
67
|
+
end
|
|
68
|
+
if config[:chef_output_format].empty?
|
|
69
|
+
config[:chef_output_format] = 'doc'
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
47
73
|
private
|
|
48
74
|
|
|
49
75
|
# patching Kitchen::Provisioner::ChefZero#run_command
|
|
50
76
|
def run_command
|
|
51
|
-
|
|
52
|
-
cmd
|
|
77
|
+
validate_config
|
|
78
|
+
cmd = config[:chef_binary]
|
|
79
|
+
cmd << config[:chef_options].to_s
|
|
80
|
+
cmd << " -l #{config[:chef_log_level]}"
|
|
81
|
+
cmd << " -F #{config[:chef_output_format]}"
|
|
53
82
|
cmd << ' -c /opt/kitchen/client.rb'
|
|
54
83
|
cmd << ' -j /opt/kitchen/dna.json'
|
|
55
|
-
cmd << ' -l warn'
|
|
56
|
-
cmd << ' -F doc'
|
|
57
84
|
end
|
|
58
85
|
|
|
59
86
|
def runner_container_name
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-dokken
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sean OMeara
|
|
@@ -45,7 +45,6 @@ executables: []
|
|
|
45
45
|
extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
|
47
47
|
files:
|
|
48
|
-
- CHANGELOG.md
|
|
49
48
|
- LICENSE
|
|
50
49
|
- lib/kitchen/driver/dokken.rb
|
|
51
50
|
- lib/kitchen/driver/dokken_version.rb
|
data/CHANGELOG.md
DELETED