templates/Vagrantfile.erb in kitchen-vagrant-1.2.1 vs templates/Vagrantfile.erb in kitchen-vagrant-1.3.0

- old
+ new

@@ -66,11 +66,15 @@ <% config[:ssh].each do |key, value| %> c.ssh.<%= key %> = <%= [true, false].include?(value) ? value : value.inspect %> <% end %> <% if config[:winrm] %> <% config[:winrm].each do |key, value| %> - c.winrm.<%= key %> = "<%= value %>" + <% if value.is_a? String %> + c.winrm.<%= key %> = "<%= value%>" + <% else %> + c.winrm.<%= key %> = <%= value%> + <% end %> <% end %> <% end %> <% if config[:boot_timeout] %> c.vm.boot_timeout = <%= config[:boot_timeout] %> @@ -154,22 +158,22 @@ <% if key == :createhd %> <% value = [value] unless value.instance_of?(Array) %> <% value.each do |item| %> p.customize ["createhd", "--filename", "<%= item[:filename] %>", "--size", <%= item[:size] %>] <% end %> - <% elsif key == :storageattach %> + <% elsif key == :storageattach || key == :storagectl %> <% value = [value] unless value.instance_of?(Array) %> <% value.each do |item| %> <% options = [] %> - <% item.each do |storageattach_option_key, storageattach_option_value| - options << "\"--#{storageattach_option_key}\"" - if storageattach_option_value.instance_of? Fixnum - options << storageattach_option_value + <% item.each do |storage_option_key, storage_option_value| + options << "\"--#{storage_option_key}\"" + if storage_option_value.instance_of? Fixnum + options << storage_option_value else - options << "\"#{storageattach_option_value}\"" + options << "\"#{storage_option_value}\"" end end %> - p.customize ["storageattach", :id, <%= options.join(', ') %>] + p.customize ["<%= key.to_s %>", :id, <%= options.join(', ') %>] <% end %> <% elsif key == :cpuidset %> <% ids = [] %> <% value.each do | id | ids << "\"#{id}\""