kitchen-dsc 0.9.2 → 0.9.3

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: 0043ea70755d3de429c6744f3103a484c9841cec
4
- data.tar.gz: 005604228f4f2424e72fb41dc9e5a09c1ca9d42e
3
+ metadata.gz: e8d011597dabb910868fee620b3b2c6488265f6c
4
+ data.tar.gz: 0b2eb214b05039e0cea4b250a5dedb8e11a9be44
5
5
  SHA512:
6
- metadata.gz: 65587a52d7f8d0a40d014cc5f28b8c18a32a69512bd22cf1776a545878c638526559f4ccdabe07db6b95ffc33c92e0a90d75b1d3fa376cf29f5dc19a1e49f1e0
7
- data.tar.gz: 8fb1f84cb6d84cfa0b949e45e2b4bf0aba3dcfd653dcf4ce688f685e1ab501f7e8c1f20d35dda377017199b5417cc947deb70f537e61e0931dfe81727c7aa5d2
6
+ metadata.gz: c0ac80911ab9efe991c35b094449d13fdbff8f73a5d3db7ae797e89c882abadf29851398695eb182679a980b567970541f567d0d09ae8011726b3593936d0722
7
+ data.tar.gz: a27349e57585778c8a3aac8758f1049e3c41c4b0a478675a9130533eb27ad98fe1d4e956ca50fb92c3bab7a166e5f3f250ea8ede530a6bdbd5a9c4acd664134e
@@ -139,17 +139,19 @@ module Kitchen
139
139
  "mkdir (split-path (join-path #{config[:root_path]} #{sandboxed_configuration_script})) -force | out-null"
140
140
  end
141
141
 
142
+ def powershell_module_params(module_specification_hash)
143
+ keys = module_specification_hash.keys.reject { |k| k.to_s.casecmp('force') == 0 }
144
+ unless keys.any? { |k| k.to_s.downcase == 'repository' }
145
+ keys.push(:repository)
146
+ module_specification_hash[:repository] = psmodule_repository_name
147
+ end
148
+ keys.map { |key| "-#{key} #{module_specification_hash[key]}" }.join(' ')
149
+ end
150
+
142
151
  def powershell_modules
143
152
  Array(config[:modules_from_gallery]).map do |powershell_module|
144
153
  params = if powershell_module.is_a? Hash
145
- keys = powershell_module.keys.reject { |k| k.to_s.downcase! == 'force' }
146
- unless keys.any? { |k| k.to_s.downcase! == 'repository' }
147
- keys.push(:repository)
148
- powershell_module[:repository] = psmodule_repository_name
149
- end
150
- keys.map do |key|
151
- "-#{key} #{powershell_module[key]}"
152
- end.join(' ')
154
+ powershell_module_params(powershell_module)
153
155
  else
154
156
  "-name '#{powershell_module}' -Repository #{psmodule_repository_name}"
155
157
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kitchen
4
4
  module Dsc
5
- VERSION = '0.9.2'.freeze
5
+ VERSION = '0.9.3'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-dsc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Murawski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-20 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen