kitchen-environment 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de20e5ed057503c8096f074766bca0b3f5224a2e
4
- data.tar.gz: 261ceb0d7042b5232b16a79c5e1eb59720821245
3
+ metadata.gz: 6f89ec359097e43f99818ed5d0c40add63a51455
4
+ data.tar.gz: 2bc8a291666e7767fcb401989423d3034cd65898
5
5
  SHA512:
6
- metadata.gz: 45c3dd448703740b52e19a103e11111d038bb5857e3c106fa139931ed3e7049019fc49740e60c396f8786ddb1f4babec80803997fbb59daa07b4b9e756755aae
7
- data.tar.gz: aeb7c3fbc45731515293b32bf2bd0e391e21799a1005e0e86c134a97740bd95f65c92b7f766eb807845f70b744699f34dee12172043ebdbe211f4ee412c8ddc0
6
+ metadata.gz: 5049d92b21e95bfc42f9dc627f087402ed8c23b7d9ccc6b822ddcc69b510f3a38ae72a2e908d503904f8c7fe0b3a88b83b3b00ea0c3eac2ffb9abcca5f24c377
7
+ data.tar.gz: 7084a57eefaf247a627ebd803b81290340f29be528aceffaa252c91e782bf9a50f10cc4569a6621cc1902a96a4493a14b7083ae5d8e2458f16b215b86eb17b3c
@@ -9,10 +9,22 @@ module Kitchen
9
9
  def create_sandbox
10
10
  super
11
11
  prepare_environment_dependencies
12
+ create_node
12
13
  end
13
14
 
14
15
  private
15
16
 
17
+ def create_node
18
+ node_file = File.join(instance.busser[:test_base_path], "nodes/#{instance.suite.name}.json")
19
+ if File.exist?(node_file)
20
+ node = JSON.parse(File.read(node_file))
21
+ node[:run_list] = config[:run_list]
22
+ File.open(node_file, 'w') do |out|
23
+ out << JSON.pretty_generate(node)
24
+ end
25
+ end
26
+ end
27
+
16
28
  def prepare_environment_dependencies
17
29
  if !config.has_key?(:environment_cookbook)
18
30
  raise "You need to provide a environment_cookbook config setting with the name of the environment cookbook"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-environment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - CenturyLink Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-27 00:00:00.000000000 Z
11
+ date: 2014-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: berkshelf