kitchen-vagrant 0.20.0 → 0.21.0

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
  SHA1:
3
- metadata.gz: f0dc4619e60934c3bee08b3a56a3f443d1507e81
4
- data.tar.gz: 1b12e75c49a66943965fbfcffef1dd57f91d84fd
3
+ metadata.gz: 8aa643733a8bf6bd645efc9fa0194c06011c74ee
4
+ data.tar.gz: 6c27247da25efbeacdddc37a185e578ec92d3d06
5
5
  SHA512:
6
- metadata.gz: 4bfd34c4956cda9d30fa4537e63b21a0b42e2133cae2e8bae9abe43da8627df4c0144a37734dd8b38daeed871c1ecb2115d0bb49a3aa91ad2dc72ac948c1e6f1
7
- data.tar.gz: c306ce6aafdcfd0f303d0a681da0857c07f6e847b09ba0df643faee89763098cc97ad386117c7df1bc760154a92dbbe9880511eb1678cbd0023a81ddc3c817cc
6
+ metadata.gz: 2d941b21d57414cae57419b423c5ff5032d4320a7cd28bb81c1f0bf4047fcfdaf464dde79925d9ccbe24c7d1390977a8ffc61ce3fcae143b363edb54387f4968
7
+ data.tar.gz: 48ee12e85af4eeb36976ad354a6ef9f1771fee7e3072e67899a8efffb0b97a9e0a8a1672611047fb6e88d6f4277b7ac52ef160c12f08bb193a7f67fb514edb60
@@ -1,9 +1,8 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.2
5
- - 2.1
6
- - 2.0.0
4
+ - 2.3.1
5
+ - 2.2.5
7
6
  - ruby-head
8
7
 
9
8
  bundler_args: --without guard
@@ -14,6 +13,10 @@ matrix:
14
13
  allow_failures:
15
14
  - rvm: ruby-head
16
15
 
16
+ branches:
17
+ only:
18
+ - master
19
+
17
20
  notifications:
18
21
  irc: "chat.freenode.net#kitchenci"
19
22
 
@@ -1,3 +1,19 @@
1
+ ## [0.21.0](https://github.com/test-kitchen/kitchen-vagrant/tree/0.21.0) (2016-11-29)
2
+ [Full Changelog](https://github.com/test-kitchen/kitchen-vagrant/compare/v0.20.0...0.21.0)
3
+
4
+ **Fixed bugs:**
5
+
6
+ - Generated Vagrantfile has type issues [\#236](https://github.com/test-kitchen/kitchen-vagrant/issues/236)
7
+ - Fix ssh boolean values in Vagrantfile template [\#231](https://github.com/test-kitchen/kitchen-vagrant/pull/231) ([zuazo](https://github.com/zuazo))
8
+
9
+ **Merged pull requests:**
10
+
11
+ - Add a synced folder to persist chef omnibus packages [\#248](https://github.com/test-kitchen/kitchen-vagrant/pull/248) ([afiune](https://github.com/afiune))
12
+ - Fix generated Vagrantfile type issues [\#243](https://github.com/test-kitchen/kitchen-vagrant/pull/243) ([OBrienCommaJosh](https://github.com/OBrienCommaJosh))
13
+ - Bump travis rubies to the modern age [\#242](https://github.com/test-kitchen/kitchen-vagrant/pull/242) ([mwrock](https://github.com/mwrock))
14
+ - Fix the name of "Parallels Desktop for Mac" [\#233](https://github.com/test-kitchen/kitchen-vagrant/pull/233) ([legal90](https://github.com/legal90))
15
+ - Add support for ovirt3 vagrant provider [\#223](https://github.com/test-kitchen/kitchen-vagrant/pull/223) ([xiboy](https://github.com/xiboy))
16
+
1
17
  ## [0.20.0](https://github.com/test-kitchen/kitchen-vagrant/tree/v0.20.0) (2016-04-07)
2
18
  [Full Changelog](https://github.com/test-kitchen/kitchen-vagrant/compare/v0.19.0...v0.20.0)
3
19
 
data/README.md CHANGED
@@ -49,10 +49,10 @@ software from VMware and then must also purchase the Vagrant VMware plugin.
49
49
 
50
50
  [VMware Workstation][workstation_dl]
51
51
 
52
- If you would like to use Parallels you must also purchase the software but the
52
+ If you would like to use Parallels Desktop you must also purchase the software but the
53
53
  `vagrant-parallels` plugin is freely available.
54
54
 
55
- [Parllels][parallels_dl]
55
+ [Parallels Desktop for Mac][parallels_dl]
56
56
 
57
57
  [Vagrant Parallels Provider][vagrant_parallels]
58
58
 
@@ -169,6 +169,13 @@ module Kitchen
169
169
  instance.transport.name.downcase =~ /win_?rm/
170
170
  end
171
171
 
172
+ # Setting up the `cache_directory` to store omnibus packages in cache
173
+ # and share a local folder to that directory so that we don't pull them
174
+ # down every single time
175
+ def cache_directory
176
+ windows_os? ? "$env:TEMP\\omnibus\\cache" : "/tmp/omnibus/cache"
177
+ end
178
+
172
179
  protected
173
180
 
174
181
  WEBSITE = "http://www.vagrantup.com/downloads.html".freeze
@@ -248,6 +255,21 @@ module Kitchen
248
255
  options || "nil"
249
256
  ]
250
257
  end
258
+ add_extra_synced_folders!
259
+ end
260
+
261
+ # We would like to sync a local folder to the instance so we can
262
+ # take advantage of the packages that we might have in cache,
263
+ # therefore we wont download a package we already have
264
+ def add_extra_synced_folders!
265
+ if cache_directory
266
+ FileUtils.mkdir_p(local_kitchen_cache)
267
+ config[:synced_folders].push([
268
+ local_kitchen_cache,
269
+ cache_directory,
270
+ "create: true"
271
+ ])
272
+ end
251
273
  end
252
274
 
253
275
  # Truncates the length of `:vm_hostname` to 12 characters for
@@ -389,6 +411,12 @@ module Kitchen
389
411
  state[:rdp_port] = hash["RDPPort"] if hash["RDPPort"]
390
412
  end
391
413
 
414
+ # @return [String] full absolute path to the kitchen cache directory
415
+ # @api private
416
+ def local_kitchen_cache
417
+ @local_kitchen_cache ||= File.expand_path("~/.kitchen/cache")
418
+ end
419
+
392
420
  # @return [String] full local path to the directory containing the
393
421
  # instance's Vagrantfile
394
422
  # @api private
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for Vagrant Kitchen driver
24
- VAGRANT_VERSION = "0.20.0"
24
+ VAGRANT_VERSION = "0.21.0"
25
25
  end
26
26
  end
@@ -147,6 +147,14 @@ describe Kitchen::Driver::Vagrant do
147
147
 
148
148
  describe "configuration" do
149
149
 
150
+ let(:cache_directory_array) do
151
+ [
152
+ File.expand_path("~/.kitchen/cache"),
153
+ "/tmp/omnibus/cache",
154
+ "create: true"
155
+ ]
156
+ end
157
+
150
158
  %W[centos debian fedora opensuse ubuntu].each do |name|
151
159
 
152
160
  context "for known bento platform names starting with #{name}" do
@@ -316,8 +324,8 @@ describe Kitchen::Driver::Vagrant do
316
324
  expect(driver[:ssh]).to eq(:a => "b", :c => { :d => "e" })
317
325
  end
318
326
 
319
- it "sets :synced_folders to an empty array by default" do
320
- expect(driver[:synced_folders]).to eq([])
327
+ it "sets :synced_folders with the cache_directory by default" do
328
+ expect(driver[:synced_folders]).to eq([cache_directory_array])
321
329
  end
322
330
 
323
331
  it "sets :synced_folders to a custom value" do
@@ -326,7 +334,11 @@ describe Kitchen::Driver::Vagrant do
326
334
  ]
327
335
 
328
336
  expect(driver[:synced_folders]).to eq([
329
- [File.expand_path("/host_path"), "/vm_path", "create: true, type: :nfs"]
337
+ [
338
+ File.expand_path("/host_path"),
339
+ "/vm_path", "create: true, type: :nfs"
340
+ ],
341
+ cache_directory_array
330
342
  ])
331
343
  end
332
344
 
@@ -336,7 +348,8 @@ describe Kitchen::Driver::Vagrant do
336
348
  ]
337
349
 
338
350
  expect(driver[:synced_folders]).to eq([
339
- [File.expand_path("/root/suitey-fooos-99"), "/vm_path", "stuff"]
351
+ [File.expand_path("/root/suitey-fooos-99"), "/vm_path", "stuff"],
352
+ cache_directory_array
340
353
  ])
341
354
  end
342
355
 
@@ -346,7 +359,8 @@ describe Kitchen::Driver::Vagrant do
346
359
  ]
347
360
 
348
361
  expect(driver[:synced_folders]).to eq([
349
- [File.expand_path("/kroot/a"), "/vm_path", "stuff"]
362
+ [File.expand_path("/kroot/a"), "/vm_path", "stuff"],
363
+ cache_directory_array
350
364
  ])
351
365
  end
352
366
 
@@ -356,7 +370,8 @@ describe Kitchen::Driver::Vagrant do
356
370
  ]
357
371
 
358
372
  expect(driver[:synced_folders]).to eq([
359
- [File.expand_path("/host_path"), "/vm_path", "nil"]
373
+ [File.expand_path("/host_path"), "/vm_path", "nil"],
374
+ cache_directory_array
360
375
  ])
361
376
  end
362
377
 
@@ -418,6 +433,14 @@ describe Kitchen::Driver::Vagrant do
418
433
 
419
434
  context "for windows os_types" do
420
435
 
436
+ let(:win_cache_directory_array) do
437
+ [
438
+ File.expand_path("~/.kitchen/cache"),
439
+ "$env:TEMP\\omnibus\\cache",
440
+ "create: true"
441
+ ]
442
+ end
443
+
421
444
  before { allow(platform).to receive(:os_type).and_return("windows") }
422
445
 
423
446
  it "sets :vm_hostname to nil by default" do
@@ -429,6 +452,21 @@ describe Kitchen::Driver::Vagrant do
429
452
 
430
453
  expect(driver[:vm_hostname]).to eq("this-is-a--k")
431
454
  end
455
+
456
+ it "sets :synced_folders with the cache_directory by default" do
457
+ expect(driver[:synced_folders]).to eq([win_cache_directory_array])
458
+ end
459
+
460
+ it "replaces %{instance_name} with instance name in :synced_folders" do
461
+ config[:synced_folders] = [
462
+ ["/root/%{instance_name}", "/vm_path", "stuff"]
463
+ ]
464
+
465
+ expect(driver[:synced_folders]).to eq([
466
+ [File.expand_path("/root/suitey-fooos-99"), "/vm_path", "stuff"],
467
+ win_cache_directory_array
468
+ ])
469
+ end
432
470
  end
433
471
  end
434
472
 
@@ -1111,7 +1149,8 @@ describe Kitchen::Driver::Vagrant do
1111
1149
  config[:ssh] = {
1112
1150
  :username => %{jdoe},
1113
1151
  :password => %{secret},
1114
- :private_key_path => %{/key}
1152
+ :private_key_path => %{/key},
1153
+ :insert_key => false
1115
1154
  }
1116
1155
  cmd
1117
1156
 
@@ -1119,6 +1158,7 @@ describe Kitchen::Driver::Vagrant do
1119
1158
  c.ssh.username = "jdoe"
1120
1159
  c.ssh.password = "secret"
1121
1160
  c.ssh.private_key_path = "/key"
1161
+ c.ssh.insert_key = false
1122
1162
  RUBY
1123
1163
  end
1124
1164
 
@@ -54,7 +54,7 @@ Vagrant.configure("2") do |c|
54
54
  c.ssh.private_key_path = "<%= config[:ssh_key] %>"
55
55
  <% end %>
56
56
  <% config[:ssh].each do |key, value| %>
57
- c.ssh.<%= key %> = "<%= value %>"
57
+ c.ssh.<%= key %> = <%= [true, false].include?(value) ? value : value.inspect %>
58
58
  <% end %>
59
59
  <% if config[:winrm] %>
60
60
  <% config[:winrm].each do |key, value| %>
@@ -142,7 +142,7 @@ Vagrant.configure("2") do |c|
142
142
  <% else %>
143
143
  p.vmx["<%= key %>"] = "<%= value %>"
144
144
  <% end %>
145
- <% when "openstack", "cloudstack", "hyperv" %>
145
+ <% when "openstack", "cloudstack", "hyperv", "ovirt3" %>
146
146
  <% if value.is_a? String %>
147
147
  p.<%= key %> = "<%= value%>"
148
148
  <% else %>
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: 0.20.0
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-07 00:00:00.000000000 Z
11
+ date: 2016-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -164,11 +164,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  requirements: []
166
166
  rubyforge_project:
167
- rubygems_version: 2.5.2
167
+ rubygems_version: 2.6.7
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: Kitchen::Driver::Vagrant - A Vagrant Driver for Test Kitchen.
171
171
  test_files:
172
172
  - spec/kitchen/driver/vagrant_spec.rb
173
173
  - spec/spec_helper.rb
174
- has_rdoc: