kitchen-vagrant 1.3.5 → 1.3.6

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
  SHA256:
3
- metadata.gz: 2fc68310e6aba9fcb3eb1b5afde0b19a1742f84304ce03e27a56a422743285de
4
- data.tar.gz: 8fcedc69d161384ccd9d758c2b2164058b7221ab5ccb08ce9a2f78d5a54f9e26
3
+ metadata.gz: ee92d49f3d5e73344418c1cb8d3540785af402102e83a92736420b81d7fdc0de
4
+ data.tar.gz: 325004bfa3ad692a57a54cc26643898cb969291d650d1688e9d1761e3df8a4b0
5
5
  SHA512:
6
- metadata.gz: 48680298fa28e965b62094e838a8b90aa15302003ea1f03b6b0b77976e8ead91b151b8c6a7207863cae90b4c658827549417f303f1e81cfd10fc8db873bf4cdf
7
- data.tar.gz: bd4a465ec423af44508c81d4dabc05c46e6654dc09cb32b518a27e0dd7dd016152ffbf40de4ed6747d6e5ce5e5e70329748d684d10e9473782e67f29dd2d1348
6
+ metadata.gz: 74609777bd6d7c36d5d682ea82831affc691ed4e9b87ba1a63ef5a08c09e9a2f71228e0914fcf8e2b47e8af9ab9dfb68e87fd8c130edc3e9cfee1251fb461cfc
7
+ data.tar.gz: 3086d110f043047f9e50ebae55317f4d1ce3c9f4dca9b2902c8053ba16a3339a4b2cc3bf410d796b5eeef3d8e836719a9f287f468f4a911bb67324c5bd03c06a
@@ -298,16 +298,16 @@ module Kitchen
298
298
  def finalize_pre_create_command!
299
299
  return if config[:pre_create_command].nil?
300
300
 
301
- config[:pre_create_command] = config[:pre_create_command].
302
- gsub("{{vagrant_root}}", vagrant_root)
301
+ config[:pre_create_command] = config[:pre_create_command]
302
+ .gsub("{{vagrant_root}}", vagrant_root)
303
303
  end
304
304
 
305
305
  # Replaces an `%{instance_name}` tokens in the synced folder items.
306
306
  #
307
307
  # @api private
308
308
  def finalize_synced_folders!
309
- config[:synced_folders] = config[:synced_folders].
310
- map do |source, destination, options|
309
+ config[:synced_folders] = config[:synced_folders]
310
+ .map do |source, destination, options|
311
311
  [
312
312
  File.expand_path(
313
313
  source.gsub("%{instance_name}", instance.name),
@@ -396,7 +396,7 @@ module Kitchen
396
396
  # @api private
397
397
  def run(cmd, options = {})
398
398
  cmd = "echo #{cmd}" if config[:dry_run]
399
- run_command(cmd, { :cwd => vagrant_root }.merge(options))
399
+ run_command(cmd, { cwd: vagrant_root }.merge(options))
400
400
  end
401
401
 
402
402
  # Delegates to Kitchen::ShellOut.run_command, overriding some default
@@ -415,9 +415,9 @@ module Kitchen
415
415
  # rubocop:disable Metrics/CyclomaticComplexity
416
416
  def run_command(cmd, options = {})
417
417
  merged = {
418
- :use_sudo => config[:use_sudo],
419
- :log_subject => name,
420
- :environment => {},
418
+ use_sudo: config[:use_sudo],
419
+ log_subject: name,
420
+ environment: {},
421
421
  }.merge(options)
422
422
 
423
423
  # Attempt to extract bundler and associated GEM related values.
@@ -458,7 +458,7 @@ module Kitchen
458
458
  # @api private
459
459
  def run_pre_create_command
460
460
  if config[:pre_create_command]
461
- run(config[:pre_create_command], :cwd => config[:kitchen_root])
461
+ run(config[:pre_create_command], cwd: config[:kitchen_root])
462
462
  end
463
463
  end
464
464
 
@@ -468,7 +468,7 @@ module Kitchen
468
468
  # @api private
469
469
  def run_silently(cmd, options = {})
470
470
  merged = {
471
- :live_stream => nil, :quiet => (logger.debug? ? false : true)
471
+ live_stream: nil, quiet: (logger.debug? ? false : true)
472
472
  }.merge(options)
473
473
  run(cmd, merged)
474
474
  end
@@ -524,8 +524,8 @@ module Kitchen
524
524
  # invocation
525
525
  # @api private
526
526
  def vagrant_config(type)
527
- lines = run_silently("#{config[:vagrant_binary]} #{type}-config").
528
- split("\n").map do |line|
527
+ lines = run_silently("#{config[:vagrant_binary]} #{type}-config")
528
+ .split("\n").map do |line|
529
529
  tokens = line.strip.partition(" ")
530
530
  [tokens.first, tokens.last.delete('"')]
531
531
  end
@@ -537,8 +537,8 @@ module Kitchen
537
537
  # @api private
538
538
  def vagrant_version
539
539
  self.class.vagrant_version ||= run_silently(
540
- "#{config[:vagrant_binary]} --version", :cwd => Dir.pwd).
541
- chomp.split(" ").last
540
+ "#{config[:vagrant_binary]} --version", cwd: Dir.pwd)
541
+ .chomp.split(" ").last
542
542
  rescue Errno::ENOENT
543
543
  raise UserError, "Vagrant #{MIN_VER} or higher is not installed." \
544
544
  " Please download a package from #{WEBSITE}."
@@ -556,11 +556,13 @@ module Kitchen
556
556
  " Please upgrade to version 1.6 or higher from #{WEBSITE}."
557
557
  end
558
558
 
559
- if !winrm_plugin_installed?
560
- raise UserError, "WinRM Transport requires the vagrant-winrm " \
561
- "Vagrant plugin to properly communicate with this Vagrant VM. " \
562
- "Please install this plugin with: " \
563
- "`vagrant plugin install vagrant-winrm' and try again."
559
+ if Gem::Version.new(vagrant_version) < Gem::Version.new("2.2.0") && !winrm_plugin_installed?
560
+ raise UserError, "Vagrant version #{vagrant_version} requires the " \
561
+ "vagrant-winrm plugin to properly communicate with this Vagrant VM " \
562
+ "over WinRM Transport. Please install this plugin with: " \
563
+ "`vagrant plugin install vagrant-winrm' and try again." \
564
+ "Alternatively upgrade to Vagrant >= 2.2.0 which does not " \
565
+ "require the vagrant-winrm plugin."
564
566
  end
565
567
  end
566
568
 
@@ -578,8 +580,8 @@ module Kitchen
578
580
  return true if self.class.winrm_plugin_passed
579
581
 
580
582
  self.class.winrm_plugin_passed = run_silently(
581
- "#{config[:vagrant_binary]} plugin list", :cwd => Dir.pwd).
582
- split("\n").find { |line| line =~ /vagrant-winrm\s+/ }
583
+ "#{config[:vagrant_binary]} plugin list", cwd: Dir.pwd)
584
+ .split("\n").find { |line| line =~ /vagrant-winrm\s+/ }
583
585
  end
584
586
  end
585
587
  end
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for Vagrant Kitchen driver
24
- VAGRANT_VERSION = "1.3.5"
24
+ VAGRANT_VERSION = "1.3.6".freeze
25
25
  end
26
26
  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: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-23 00:00:00.000000000 Z
11
+ date: 2018-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  requirements: []
129
129
  rubyforge_project:
130
- rubygems_version: 2.7.6
130
+ rubygems_version: 2.7.7
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Kitchen::Driver::Vagrant - A Vagrant Driver for Test Kitchen.