kitchen-itamae 0.1.1 → 0.2.0
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/CHANGELOG.md +5 -0
- data/lib/kitchen/provisioner/itamae.rb +17 -2
- data/lib/kitchen-itamae/version.rb +1 -1
- 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: 59dec5d7ae3c30539b9bb71086ce2eb8059f053f
|
|
4
|
+
data.tar.gz: b7279dc56d493105d640166023c837de4fbb457b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37bda91c8d41082c5f8b307b4d1dd203f9f2d7826e003d218aaa6e186932d21b5d9ae505b1d7eb4bb5823ced62ab627f1abadbd06551891a325f4c15660169ab
|
|
7
|
+
data.tar.gz: 6b7b3a5c4406628f0befb4af2bdc82a4327626aede201645060dd992aaad98fb4b5598b79370d3fbfaa0d9d89b78d5dcfc59164c0a783d0da934d11b8928bcab
|
data/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,7 @@ module Kitchen
|
|
|
19
19
|
expand_path_for :itamae_root
|
|
20
20
|
|
|
21
21
|
default_config :node_json, nil
|
|
22
|
+
default_config :attributes, {}
|
|
22
23
|
default_config :with_ohai, false
|
|
23
24
|
default_config :itamae_option, nil
|
|
24
25
|
default_config :use_bundler do |provisioner|
|
|
@@ -29,6 +30,7 @@ module Kitchen
|
|
|
29
30
|
# (see Base#create_sandbox)
|
|
30
31
|
def create_sandbox
|
|
31
32
|
super
|
|
33
|
+
prepare_json
|
|
32
34
|
FileUtils.cp_r(Dir.glob("#{config[:itamae_root]}/*"), sandbox_path)
|
|
33
35
|
end
|
|
34
36
|
|
|
@@ -65,7 +67,7 @@ module Kitchen
|
|
|
65
67
|
cmd << 'local'
|
|
66
68
|
cmd << '--ohai' if config[:with_ohai]
|
|
67
69
|
cmd << config[:itamae_option]
|
|
68
|
-
cmd << "-j
|
|
70
|
+
cmd << "-j dna.json"
|
|
69
71
|
cmd << recipe
|
|
70
72
|
cmd.join(" ")
|
|
71
73
|
end
|
|
@@ -83,7 +85,6 @@ module Kitchen
|
|
|
83
85
|
|
|
84
86
|
private
|
|
85
87
|
# (see ChefBase private)
|
|
86
|
-
|
|
87
88
|
def download_helpers
|
|
88
89
|
IO.read(
|
|
89
90
|
Gem.find_files_from_load_path('../support/download_helpers.sh').first
|
|
@@ -127,6 +128,20 @@ EOL
|
|
|
127
128
|
#{sudo("sh")} /tmp/install_itamae.sh
|
|
128
129
|
INSTALL_ITAMAE
|
|
129
130
|
end
|
|
131
|
+
|
|
132
|
+
# (see ChefBase#prepare_json)
|
|
133
|
+
def prepare_json
|
|
134
|
+
dna = {}
|
|
135
|
+
dna.merge!(JSON.parse(File.read(File.join(config[:itamae_root], config[:node_json])))) if config[:node_json]
|
|
136
|
+
dna.rmerge!(config[:attributes])
|
|
137
|
+
|
|
138
|
+
info("Preparing dna.json")
|
|
139
|
+
debug("Creating dna.json from #{dna.inspect}")
|
|
140
|
+
|
|
141
|
+
File.open(File.join(sandbox_path, "dna.json"), "wb") do |file|
|
|
142
|
+
file.write(dna.to_json)
|
|
143
|
+
end
|
|
144
|
+
end
|
|
130
145
|
end
|
|
131
146
|
end
|
|
132
147
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-itamae
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sawanoboly
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-03-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|