kitchen-vagrant 2.1.0 → 2.1.1

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f711ef88157bce873f807ccf089a554997036bcc627728732658390bfbacf7c
4
- data.tar.gz: 1493151a4742bc3452a1f965ac08d069934829fc0d5e35df1b9afa1a93be61bd
3
+ metadata.gz: 9e21d001d3824264c43945102d52433b37fc2be32357c5f976529526afc64938
4
+ data.tar.gz: 78c99703644f6a6da9367714001e96126a674f78006aff376112c9585c68b7e5
5
5
  SHA512:
6
- metadata.gz: 8321ae32b3c1adfe84adad6dce058145f23207f09e8874c9efaf693e36722518b48e1683a5e887e0b2a19868c362b18b1b69983cd2fc7151306257b8e485cf18
7
- data.tar.gz: 674f6a43d1f5bbc620870dd7b42c11d0a8aa4bd3ccf282510ce678f93c86aaa94266eb0e49969d285e6b4250f38f34fc6b5bd9ce792e5d2c774dd3b9f6cd6425
6
+ metadata.gz: 72b1c8987832a3f5f23fad987e47786dc723c27f083daaef9915a93ff78884717043192175033d620a44744173d38b8135f00fa1f175340dae299fedc028cbc1
7
+ data.tar.gz: 0eb24d27bc73f59680e37d0cca9bcb0f5f68cd2bc0bc61aa2d946509326d8c39fb1a6af6a56e42df827989ef03e8c77494a6eaec03937a70af9382bc6df81803
@@ -20,6 +20,6 @@ module Kitchen
20
20
  module Driver
21
21
 
22
22
  # Version string for Vagrant Kitchen driver
23
- VAGRANT_VERSION = "2.1.0".freeze
23
+ VAGRANT_VERSION = "2.1.1".freeze
24
24
  end
25
25
  end
@@ -85,7 +85,7 @@ Vagrant.configure("2") do |c|
85
85
  <% end %>
86
86
 
87
87
  <% Array(config[:network]).each do |opts| %>
88
- c.vm.network(:<%= opts[0] %>, <%= opts[1].to_s.delete_prefix('{').delete_suffix('}') %>)
88
+ c.vm.network(:<%= opts[0] %>, <%= opts[1].map { |k, v| "#{k}: #{v.inspect}" }.join(', ') %>)
89
89
  <% end %>
90
90
 
91
91
  c.vm.synced_folder ".", "/vagrant", disabled: true
@@ -169,7 +169,11 @@ Vagrant.configure("2") do |c|
169
169
  <% end %>
170
170
  <% when "softlayer" %>
171
171
  <% if key == :disk_capacity %>
172
+ <% if value.is_a? Hash %>
173
+ p.<%= key %> = {<%= value.map { |k, v| "\"#{k}\": #{v}" }.join(', ') %>}
174
+ <% else %>
172
175
  p.<%= key %> = <%= value %>
176
+ <% end %>
173
177
  <% else %>
174
178
  p.<%= key %> = "<%= value %>"
175
179
  <% end %>
@@ -204,7 +208,7 @@ Vagrant.configure("2") do |c|
204
208
  <% elsif key == :setextradata %>
205
209
  <% value.each do | data_key, data_value | %>
206
210
  <% data_value = "\"#{data_value}\"" if data_value.is_a? String %>
207
- p.customize ["setextradata", :id, "<%= data_key %>", <%= data_value %>]
211
+ p.customize ["setextradata", :id, "<%= data_key %>", <%= data_value %>]
208
212
  <% end %>
209
213
  <% else %>
210
214
  p.customize ["modifyvm", :id, "--<%= key %>", "<%= value %>"]
@@ -224,11 +228,29 @@ Vagrant.configure("2") do |c|
224
228
  <% else %>
225
229
  <% if value.is_a? String %>
226
230
  p.<%= key %> = "<%= value%>"
231
+ <% elsif value.is_a? Array %>
232
+ <% if value.all? { |item| item.is_a? Hash } %>
233
+ <%
234
+ def format_hash_recursively(hash)
235
+ hash.map do |k, v|
236
+ if v.is_a?(Array) && v.all? { |item| item.is_a? Hash }
237
+ # Handle nested array of hashes
238
+ formatted_array = v.map { |nested_hash| "{" + format_hash_recursively(nested_hash) + "}" }.join(", ")
239
+ "#{k}: [#{formatted_array}]"
240
+ else
241
+ "#{k}: #{v.inspect}"
242
+ end
243
+ end.join(", ")
244
+ end
245
+ %>
246
+ p.<%= key %> = [<%= value.map { |hash| "{" + format_hash_recursively(hash) + "}" }.join(", ") %>]
247
+ <% else %>
248
+ p.<%= key %> = <%= value%>
249
+ <% end %>
227
250
  <% else %>
228
251
  p.<%= key %> = <%= value%>
229
252
  <% end %>
230
253
  <% end %>
231
254
  <% end %>
232
255
  end
233
-
234
256
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-vagrant
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-02 00:00:00.000000000 Z
11
+ date: 2025-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen