kitchen-salt 0.0.16 → 0.0.17

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTY3N2RkMmU0ZTBlODEwNTVlNzdkYjQ0NDc5ZDJmYjUwODIxZGE5Mg==
4
+ ZWQxMDZhMzQ4YmZiZjZkYzU5ZDUxZGFkODc2ZDBkMmNiMTY5MjRlYQ==
5
5
  data.tar.gz: !binary |-
6
- ZjA2NjQzMDkyNmUzOTU4Mzc2OGFlYzRiNTg1ZjI2NDE3OGIwMDEwYw==
6
+ ZTY2ODFjOTQ5ODAwNDdjMmY1ZjA1MGUyZDYzYTgzNWY5MzlkMGQ0NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTU1OTVjMGM0NjE3OWVhNjk1YjZhNGI1ODFjOGFiYmQ3NmI1ODQ0Y2FlZTYz
10
- ODQ3ZDFmNmNiNjU2MDY0Yjc1OTE5N2QzYTdmMGQ1YWUxYWQ2YzI4ZjgxZWQ0
11
- MTc4NzEyNTk5ODhmZTgxZDA1NjE3NWU2ZDhkNDRlNDA5YTUyNTQ=
9
+ YTJlOWJjMmY0YjIzZjJmNzQ2ZDY1ODMxZTI3NTZkMWM5YzMyNjczYWM4OTc0
10
+ N2I0ZGUyMzZkNWQxYTNmMGNlMDRmNTczM2ZmZWQ3NzM4ZDNiY2E3YTQ3MzE4
11
+ ZGI5NjZjZDk4YTJmYmZmMzk1MDBjYWMzZmVhMzYyYWNkYzBlYTY=
12
12
  data.tar.gz: !binary |-
13
- YjE5YTJiOGRhNWJlNTI1NzI2MTMxMDQ3MzVkNWY1NzZjZTk4YzRkNjg1YWJj
14
- ODAwZWUxZmQ2ODI0OTdkMGU3YWY2Nzg5ZTVlNWEzZTJhMjA0ZWMyM2NhMjQ4
15
- MDM0OWRjODY5YTFkNGFkMjZmNjU5NDY0MmZkYTZiODZiOTc0MjE=
13
+ OWQzNzZlYzk1ODA3YTVmNjQ5NGYxY2U0MWU1N2NmMmJjOWU2OWI0YmM2OGQx
14
+ ZDI2ODlhOWU5OTQxZTY4NmRhYWU2OGQzNWU4YmZkOGQ3YjYwMzIwYjZkZmE0
15
+ ZDAxNGU3MDIyYWI1MmU5ODEyZGY0ZmRlZWM0M2I5ZWM2NDJlN2M=
@@ -49,6 +49,7 @@ module Kitchen
49
49
  default_config :salt_state_top, "/srv/salt/top.sls"
50
50
  default_config :state_collection, false
51
51
  default_config :state_top, {}
52
+ default_config :state_top_from_file, false
52
53
  default_config :salt_run_highstate, true
53
54
 
54
55
  # salt-call version that supports the undocumented --retcode-passthrough command
@@ -243,13 +244,21 @@ module Kitchen
243
244
  def prepare_state_top
244
245
  info("Preparing state_top")
245
246
 
246
- # we get a hash with all the keys converted to symbols, salt doesn't like this
247
- # to convert all the keys back to strings again
248
- state_top_content = unsymbolize(config[:state_top]).to_yaml
249
- # .to_yaml will produce ! '*' for a key, Salt doesn't like this either
250
- state_top_content.gsub!(/(!\s'\*')/, "'*'")
251
247
  sandbox_state_top_path = File.join(sandbox_path, config[:salt_state_top])
252
248
 
249
+ if (config[:state_top_from_file] == false)
250
+ # use the top.sls embedded in .kitchen.yml
251
+
252
+ # we get a hash with all the keys converted to symbols, salt doesn't like this
253
+ # to convert all the keys back to strings again
254
+ state_top_content = unsymbolize(config[:state_top]).to_yaml
255
+ # .to_yaml will produce ! '*' for a key, Salt doesn't like this either
256
+ state_top_content.gsub!(/(!\s'\*')/, "'*'")
257
+ else
258
+ # load a top.sls from disk
259
+ state_top_content = File.read("top.sls")
260
+ end
261
+
253
262
  # create the directory & drop the file in
254
263
  FileUtils.mkdir_p(File.dirname(sandbox_state_top_path))
255
264
  File.open(sandbox_state_top_path, "wb") do |file|
@@ -1,5 +1,5 @@
1
1
  module Kitchen
2
2
  module Salt
3
- VERSION = "0.0.16"
3
+ VERSION = "0.0.17"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-salt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon McCartney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-20 00:00:00.000000000 Z
11
+ date: 2014-05-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: salt provisioner for test-kitchen
14
14
  email: