kitchen-salt 0.0.15 → 0.0.16

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
- OWY5MDg5ZjQ0MzIyNzZlZmYxYzgyYWQxZjMxYTAyZmJkZTYzZGEyMw==
4
+ MTY3N2RkMmU0ZTBlODEwNTVlNzdkYjQ0NDc5ZDJmYjUwODIxZGE5Mg==
5
5
  data.tar.gz: !binary |-
6
- YmM2NzNkNTgwZTM0ODAwYzBkMDYyODg3MTQ3ZDQzMGYyZjVmOGQ4YQ==
6
+ ZjA2NjQzMDkyNmUzOTU4Mzc2OGFlYzRiNTg1ZjI2NDE3OGIwMDEwYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MmZmZjFiMTIwZWY1YWFkNzc2ZGFiYWRhMDZhZDhjZmE0MjIyM2VjNDFiMzQx
10
- YzdmODIwNjc5YWQ5MzY3MzNjMTBiYWZkYWNhNDdjYjJlNzE1MTdiODc0NzM3
11
- NWY2MDViOGZiMjhlMzJlMTYwYzdmZjNkNjNkZGQ4NjMwNmYzNzg=
9
+ ZTU1OTVjMGM0NjE3OWVhNjk1YjZhNGI1ODFjOGFiYmQ3NmI1ODQ0Y2FlZTYz
10
+ ODQ3ZDFmNmNiNjU2MDY0Yjc1OTE5N2QzYTdmMGQ1YWUxYWQ2YzI4ZjgxZWQ0
11
+ MTc4NzEyNTk5ODhmZTgxZDA1NjE3NWU2ZDhkNDRlNDA5YTUyNTQ=
12
12
  data.tar.gz: !binary |-
13
- NjcwYTA4ZmYzMmUzYTBiZmFhMjk3MDg2MjJkYmE3ZDIwNTllODc5MDllYTll
14
- MzlmNzVjNGM0MjQ4YTg5Nzg4Y2ZlZTg2YjUxNmQ3NThmODgzMWQ4MmRiODc3
15
- MDNmYTg3Y2ExYTc4MmYwMzdiNjk5NzU1NWVjODM4YWYyOWY4YWY=
13
+ YjE5YTJiOGRhNWJlNTI1NzI2MTMxMDQ3MzVkNWY1NzZjZTk4YzRkNjg1YWJj
14
+ ODAwZWUxZmQ2ODI0OTdkMGU3YWY2Nzg5ZTVlNWEzZTJhMjA0ZWMyM2NhMjQ4
15
+ MDM0OWRjODY5YTFkNGFkMjZmNjU5NDY0MmZkYTZiODZiOTc0MjE=
@@ -1,5 +1,5 @@
1
1
  module Kitchen
2
2
  module Salt
3
- VERSION = "0.0.15"
3
+ VERSION = "0.0.16"
4
4
  end
5
5
  end
@@ -350,13 +350,25 @@ module Kitchen
350
350
  end
351
351
 
352
352
  def prepare_state_collection
353
- info("Preparing state collection (get with it! this should be a formula already!)")
353
+ info("Preparing state collection")
354
354
  debug("Using config #{config}")
355
355
 
356
- file_root = File.join(sandbox_path, config[:salt_file_root])
357
- formula_dir = File.join(sandbox_path, config[:salt_file_root], config[:formula])
358
- FileUtils.mkdir_p(formula_dir)
359
- FileUtils.cp_r(Dir.glob(File.join(config[:kitchen_root], "*")), formula_dir)
356
+ if config[:collection_name].nil? and config[:formula].nil?
357
+ error("neither collection_name or formula have been set!")
358
+ exit(2)
359
+ else
360
+ if config[:collection_name].nil?
361
+ debug("collection_name not set, using #{config[:formula]}")
362
+ config[:collection_name] = config[:formula]
363
+ end
364
+ end
365
+
366
+ debug("sandbox_path = #{sandbox_path}")
367
+ debug("salt_file_root = #{config[:salt_file_root]}")
368
+ debug("collection_name = #{config[:collection_name]}")
369
+ collection_dir = File.join(sandbox_path, config[:salt_file_root], config[:collection_name])
370
+ FileUtils.mkdir_p(collection_dir)
371
+ FileUtils.cp_r(Dir.glob(File.join(config[:kitchen_root], "*")), collection_dir)
360
372
 
361
373
  end
362
374
  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.15
4
+ version: 0.0.16
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-19 00:00:00.000000000 Z
11
+ date: 2014-05-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: salt provisioner for test-kitchen
14
14
  email: