test-kitchen 3.7.0 → 3.7.2

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.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -3
  3. data/LICENSE +1 -1
  4. data/Rakefile +2 -2
  5. data/lib/kitchen/base64_stream.rb +5 -5
  6. data/lib/kitchen/chef_utils_wiring.rb +2 -2
  7. data/lib/kitchen/cli.rb +1 -1
  8. data/lib/kitchen/collection.rb +1 -1
  9. data/lib/kitchen/color.rb +2 -2
  10. data/lib/kitchen/command/action.rb +1 -1
  11. data/lib/kitchen/command/console.rb +1 -1
  12. data/lib/kitchen/command/diagnose.rb +1 -1
  13. data/lib/kitchen/command/doctor.rb +1 -1
  14. data/lib/kitchen/command/exec.rb +1 -1
  15. data/lib/kitchen/command/list.rb +3 -3
  16. data/lib/kitchen/command/login.rb +1 -1
  17. data/lib/kitchen/command/package.rb +1 -1
  18. data/lib/kitchen/command/sink.rb +1 -1
  19. data/lib/kitchen/command/test.rb +1 -1
  20. data/lib/kitchen/command.rb +6 -6
  21. data/lib/kitchen/config.rb +2 -2
  22. data/lib/kitchen/configurable.rb +3 -3
  23. data/lib/kitchen/data_munger.rb +3 -3
  24. data/lib/kitchen/diagnostic.rb +2 -2
  25. data/lib/kitchen/driver/base.rb +1 -1
  26. data/lib/kitchen/driver/dummy.rb +1 -1
  27. data/lib/kitchen/driver/exec.rb +1 -1
  28. data/lib/kitchen/driver/proxy.rb +1 -1
  29. data/lib/kitchen/driver/ssh_base.rb +1 -1
  30. data/lib/kitchen/driver.rb +1 -1
  31. data/lib/kitchen/errors.rb +1 -1
  32. data/lib/kitchen/generator/init.rb +2 -2
  33. data/lib/kitchen/instance.rb +9 -9
  34. data/lib/kitchen/lazy_hash.rb +1 -1
  35. data/lib/kitchen/lifecycle_hooks.rb +1 -1
  36. data/lib/kitchen/loader/yaml.rb +5 -5
  37. data/lib/kitchen/logger.rb +1 -1
  38. data/lib/kitchen/logging.rb +1 -1
  39. data/lib/kitchen/login_command.rb +2 -2
  40. data/lib/kitchen/metadata_chopper.rb +1 -1
  41. data/lib/kitchen/platform.rb +1 -1
  42. data/lib/kitchen/platform_filter.rb +4 -2
  43. data/lib/kitchen/plugin.rb +1 -1
  44. data/lib/kitchen/plugin_base.rb +1 -1
  45. data/lib/kitchen/provisioner/base.rb +1 -1
  46. data/lib/kitchen/provisioner/chef/berkshelf.rb +2 -2
  47. data/lib/kitchen/provisioner/chef/common_sandbox.rb +2 -2
  48. data/lib/kitchen/provisioner/chef/policyfile.rb +11 -5
  49. data/lib/kitchen/provisioner/chef_apply.rb +3 -3
  50. data/lib/kitchen/provisioner/chef_base.rb +6 -6
  51. data/lib/kitchen/provisioner/chef_infra.rb +2 -2
  52. data/lib/kitchen/provisioner/chef_solo.rb +1 -1
  53. data/lib/kitchen/provisioner/chef_target.rb +4 -4
  54. data/lib/kitchen/provisioner/dummy.rb +1 -1
  55. data/lib/kitchen/provisioner/shell.rb +1 -1
  56. data/lib/kitchen/provisioner.rb +1 -1
  57. data/lib/kitchen/rake_tasks.rb +1 -1
  58. data/lib/kitchen/shell_out.rb +2 -2
  59. data/lib/kitchen/ssh.rb +3 -3
  60. data/lib/kitchen/state_file.rb +2 -2
  61. data/lib/kitchen/suite.rb +1 -1
  62. data/lib/kitchen/thor_tasks.rb +1 -1
  63. data/lib/kitchen/transport/base.rb +1 -1
  64. data/lib/kitchen/transport/dummy.rb +1 -1
  65. data/lib/kitchen/transport/exec.rb +2 -2
  66. data/lib/kitchen/transport/ssh.rb +2 -2
  67. data/lib/kitchen/transport/winrm.rb +2 -2
  68. data/lib/kitchen/transport.rb +2 -2
  69. data/lib/kitchen/util.rb +2 -2
  70. data/lib/kitchen/verifier/base.rb +2 -2
  71. data/lib/kitchen/verifier/busser.rb +1 -1
  72. data/lib/kitchen/verifier/dummy.rb +1 -1
  73. data/lib/kitchen/verifier/shell.rb +1 -1
  74. data/lib/kitchen/verifier.rb +1 -1
  75. data/lib/kitchen/version.rb +2 -2
  76. data/lib/kitchen/which.rb +1 -1
  77. data/lib/kitchen.rb +1 -1
  78. data/lib/vendor/hash_recursive_merge.rb +1 -1
  79. data/templates/driver/license_apachev2.erb +1 -1
  80. data/templates/driver/license_lgplv3.erb +1 -1
  81. data/templates/init/kitchen.yml.erb +2 -2
  82. data/test-kitchen.gemspec +1 -1
  83. metadata +5 -5
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -35,7 +35,7 @@ module Kitchen
35
35
  # @param command [String] command
36
36
  # @param arguments [Array] array of arguments to the command
37
37
  # @param options [Hash] options hash, passed to `Kernel#exec`
38
- # @see http://www.ruby-doc.org/core-2.1.2/Kernel.html#method-i-exec
38
+ # @see https://ruby-doc.org/core-2.1.2/Kernel.html#method-i-exec
39
39
  def initialize(command, arguments, options = {})
40
40
  @command = command
41
41
  @arguments = Array(arguments)
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -50,7 +50,9 @@ module Kitchen
50
50
  #
51
51
  # @param [Regexp,String] value of the filter
52
52
  def initialize(value)
53
- raise ::ArgumentError, "PlatformFilter#new requires value to be a String or a Regexp" unless value.is_a?(::Regexp) || value.is_a?(::String)
53
+ unless value.is_a?(::Regexp) || value.is_a?(::String)
54
+ raise ::ArgumentError, "PlatformFilter#new requires value to be a String or a Regexp"
55
+ end
54
56
 
55
57
  @value = value
56
58
  end
@@ -8,7 +8,7 @@
8
8
  # you may not use this file except in compliance with the License.
9
9
  # You may obtain a copy of the License at
10
10
  #
11
- # http://www.apache.org/licenses/LICENSE-2.0
11
+ # https://www.apache.org/licenses/LICENSE-2.0
12
12
  #
13
13
  # Unless required by applicable law or agreed to in writing, software
14
14
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -87,7 +87,7 @@ module Kitchen
87
87
  class << self
88
88
  private
89
89
 
90
- # Load the Berkshelf-specific libary code.
90
+ # Load the Berkshelf-specific library code.
91
91
  #
92
92
  # @param logger [Kitchen::Logger] the logger to use
93
93
  # @raise [UserError] if the library couldn't be loaded
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -162,7 +162,7 @@ module Kitchen
162
162
  info("Removing non-cookbook files before transfer")
163
163
  FileUtils.rm(all_files_in_cookbooks - only_cookbook_files)
164
164
  Util.list_directory(tmpbooks_dir, recurse: true)
165
- .reverse_each { |fn| FileUtils.rmdir(fn) if File.directory?(fn) && Dir.entries(fn).size == 2 }
165
+ .reverse_each { |fn| FileUtils.rmdir(fn) if File.directory?(fn) && Dir.empty?(fn) }
166
166
  end
167
167
 
168
168
  # @return [Logger] the instance's logger or Test Kitchen's common
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -63,10 +63,10 @@ module Kitchen
63
63
  def resolve
64
64
  if policy_group
65
65
  info("Exporting cookbook dependencies from Policyfile #{path} with policy_group #{policy_group} using `#{cli_path} export`...")
66
- run_command("#{cli_path} export #{escape_path(policyfile)} #{escape_path(path)} --policy_group #{policy_group} --force --chef-license #{license}")
66
+ run_command("#{cli_path} export #{escape_path(policyfile)} #{escape_path(path)} --policy_group #{policy_group} --force #{chef_license(license)}")
67
67
  else
68
68
  info("Exporting cookbook dependencies from Policyfile #{path} using `#{cli_path} export`...")
69
- run_command("#{cli_path} export #{escape_path(policyfile)} #{escape_path(path)} --force --chef-license #{license}")
69
+ run_command("#{cli_path} export #{escape_path(policyfile)} #{escape_path(path)} --force #{chef_license(license)}")
70
70
  end
71
71
  end
72
72
 
@@ -78,11 +78,11 @@ module Kitchen
78
78
  else
79
79
  info("Policy lock file doesn't exist, running `#{cli_path} install` for Policyfile #{policyfile}...")
80
80
  end
81
- run_command("#{cli_path} install #{escape_path(policyfile)} --chef-license #{license}")
81
+ run_command("#{cli_path} install #{escape_path(policyfile)} #{chef_license(license)}")
82
82
 
83
83
  if always_update
84
84
  info("Updating policy lock using `#{cli_path} update`")
85
- run_command("#{cli_path} update #{escape_path(policyfile)} --chef-license #{license}")
85
+ run_command("#{cli_path} update #{escape_path(policyfile)} #{chef_license(license)}")
86
86
  end
87
87
  end
88
88
 
@@ -161,6 +161,12 @@ module Kitchen
161
161
  "setting includes the path to the `chef` or `chef-cli` commands.")
162
162
  raise UserError, "Could not find the chef or chef-cli executables in your PATH."
163
163
  end
164
+
165
+ # Return `"--chef-license #{license}"` when `license` is not nil or empty and the empty string otherwise.
166
+ def chef_license(license)
167
+ (license.nil? || license.empty?) ? "" : "--chef-license #{license}"
168
+ end
169
+
164
170
  end
165
171
  end
166
172
  end
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -29,8 +29,8 @@
29
29
  # name: chef_apply
30
30
  #
31
31
  # platforms:
32
- # - name: ubuntu-20.04
33
- # - name: centos-8
32
+ # - name: ubuntu-24.04
33
+ # - name: almalinux-10
34
34
  #
35
35
  # suites:
36
36
  # - name: default
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -273,7 +273,7 @@ module Kitchen
273
273
  # @return [String] license id to prompt for acceptance
274
274
  def license_acceptance_id
275
275
  case
276
- when File.exist?(policyfile)
276
+ when File.exist?(policyfile) && (config[:product_name].nil? || config[:product_name].start_with?("chef"))
277
277
  "chef-workstation"
278
278
  when config[:product_name]
279
279
  config[:product_name]
@@ -392,7 +392,7 @@ module Kitchen
392
392
  # @return [Hash] a configuration hash
393
393
  # @api private
394
394
  def default_config_rb # rubocop:disable Metrics/MethodLength
395
- root = config[:root_path].gsub("$env:TEMP", "\#{ENV['TEMP']\}")
395
+ root = config[:root_path].gsub("$env:TEMP", "\#{ENV['TEMP']}")
396
396
 
397
397
  config_rb = {
398
398
  node_name: instance.name,
@@ -443,7 +443,7 @@ module Kitchen
443
443
  if obj.is_a?(String) && obj =~ /^:/
444
444
  obj
445
445
  elsif obj.is_a?(String)
446
- %{"#{obj.gsub(/\\/, "\\\\\\\\")}"}
446
+ %{"#{obj.gsub("\\", "\\\\\\\\")}"}
447
447
  elsif obj.is_a?(Array)
448
448
  %{[#{obj.map { |i| format_value(i) }.join(", ")}]}
449
449
  else
@@ -601,12 +601,12 @@ module Kitchen
601
601
  # @api private
602
602
  def sanity_check_sandbox_options!
603
603
  if (config[:policyfile_path] || config[:policyfile]) && !File.exist?(policyfile)
604
- raise UserError, "policyfile_path set in config "\
604
+ raise UserError, "policyfile_path set in config " \
605
605
  "(#{config[:policyfile_path]} could not be found. " \
606
606
  "Expected to find it at full path #{policyfile}."
607
607
  end
608
608
  if config[:berksfile_path] && !File.exist?(berksfile)
609
- raise UserError, "berksfile_path set in config "\
609
+ raise UserError, "berksfile_path set in config " \
610
610
  "(#{config[:berksfile_path]} could not be found. " \
611
611
  "Expected to find it at full path #{berksfile}."
612
612
  end
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -138,7 +138,7 @@ module Kitchen
138
138
  debug("Using a dummy validation.pem")
139
139
 
140
140
  source = File.join(File.dirname(__FILE__),
141
- %w{.. .. .. support dummy-validation.pem})
141
+ %w{.. .. .. support dummy-validation.pem})
142
142
  FileUtils.cp(source, File.join(sandbox_path, "validation.pem"))
143
143
  end
144
144
 
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -46,10 +46,10 @@ module Kitchen
46
46
  credentials_file = File.join(kitchen_basepath, ".kitchen", instance_name + ".ini")
47
47
  File.write(credentials_file, connection.credentials_file)
48
48
 
49
- super.concat([
49
+ super.push(
50
50
  "--target #{instance_name}",
51
- "--credentials #{credentials_file}",
52
- ])
51
+ "--credentials #{credentials_file}"
52
+ )
53
53
  end
54
54
 
55
55
  def check_transport(connection)
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -8,7 +8,7 @@
8
8
  # you may not use this file except in compliance with the License.
9
9
  # You may obtain a copy of the License at
10
10
  #
11
- # http://www.apache.org/licenses/LICENSE-2.0
11
+ # https://www.apache.org/licenses/LICENSE-2.0
12
12
  #
13
13
  # Unless required by applicable law or agreed to in writing, software
14
14
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -78,7 +78,7 @@ module Kitchen
78
78
  # Returns a hash of MixLib::ShellOut options for the command.
79
79
  #
80
80
  # @param options [Hash] a Hash of options
81
- # @return [Hash] a new Hash of options, filterd and merged with defaults
81
+ # @return [Hash] a new Hash of options, filtered and merged with defaults
82
82
  # @api private
83
83
  def shell_opts(options)
84
84
  filtered_opts = options.reject do |key, _value|
data/lib/kitchen/ssh.rb CHANGED
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -92,7 +92,7 @@ module Kitchen
92
92
  # @param remote [String] path to remote file destination
93
93
  # @param options [Hash] configuration options that are passed to
94
94
  # `Net::SCP.upload`
95
- # @see http://net-ssh.github.io/net-scp/classes/Net/SCP.html#method-i-upload
95
+ # @see https://net-ssh.github.io/net-scp/classes/Net/SCP.html#method-i-upload
96
96
  def upload!(local, remote, options = {}, &progress)
97
97
  require "net/scp" unless defined?(Net::SCP)
98
98
  if progress.nil?
@@ -124,7 +124,7 @@ module Kitchen
124
124
  # @param options [Hash] configuration options that are passed to
125
125
  # `Net::SCP.upload`
126
126
  # @option options [true,false] :recursive recursive copy (default: `true`)
127
- # @see http://net-ssh.github.io/net-scp/classes/Net/SCP.html#method-i-upload
127
+ # @see https://net-ssh.github.io/net-scp/classes/Net/SCP.html#method-i-upload
128
128
  def upload_path!(local, remote, options = {}, &progress)
129
129
  options = { recursive: true }.merge(options)
130
130
 
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -43,7 +43,7 @@ module Kitchen
43
43
  # @raise [StateFileLoadError] if there is a problem loading the state file
44
44
  # from disk and loading it into a Hash
45
45
  def read
46
- if File.exist?(file_name) && !File.zero?(file_name)
46
+ if File.exist?(file_name) && !File.empty?(file_name)
47
47
  Util.symbolized_hash(deserialize_string(read_file))
48
48
  else
49
49
  {}
data/lib/kitchen/suite.rb CHANGED
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -8,7 +8,7 @@
8
8
  # you may not use this file except in compliance with the License.
9
9
  # You may obtain a copy of the License at
10
10
  #
11
- # http://www.apache.org/licenses/LICENSE-2.0
11
+ # https://www.apache.org/licenses/LICENSE-2.0
12
12
  #
13
13
  # Unless required by applicable law or agreed to in writing, software
14
14
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -3,7 +3,7 @@
3
3
  # you may not use this file except in compliance with the License.
4
4
  # You may obtain a copy of the License at
5
5
  #
6
- # http://www.apache.org/licenses/LICENSE-2.0
6
+ # https://www.apache.org/licenses/LICENSE-2.0
7
7
  #
8
8
  # Unless required by applicable law or agreed to in writing, software
9
9
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -59,7 +59,7 @@ module Kitchen
59
59
  # @see Base#upload
60
60
  def upload(locals, remote)
61
61
  # evaluate $env:temp on Windows
62
- real_remote = remote.to_s == "\$env:TEMP\\kitchen" ? kitchen_temp : remote
62
+ real_remote = remote.to_s == "$env:TEMP\\kitchen" ? kitchen_temp : remote
63
63
  FileUtils.mkdir_p(real_remote)
64
64
  Array(locals).each do |local|
65
65
  FileUtils.cp_r(local, real_remote)
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -78,7 +78,7 @@ module Kitchen
78
78
  super
79
79
 
80
80
  # zlib was never a valid value and breaks in net-ssh >= 2.10
81
- # TODO: remove these backwards compatiable casts in 2.0
81
+ # TODO: remove these backwards compatible casts in 2.0
82
82
  case config[:compression]
83
83
  when "zlib"
84
84
  config[:compression] = "zlib@openssh.com"
@@ -9,7 +9,7 @@
9
9
  # you may not use this file except in compliance with the License.
10
10
  # You may obtain a copy of the License at
11
11
  #
12
- # http://www.apache.org/licenses/LICENSE-2.0
12
+ # https://www.apache.org/licenses/LICENSE-2.0
13
13
  #
14
14
  # Unless required by applicable law or agreed to in writing, software
15
15
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -339,7 +339,7 @@ module Kitchen
339
339
  args = %W{/u:#{options[:user]}}
340
340
  args += %W{/p:#{options[:password]}} if options.key?(:password)
341
341
  args += %W{/v:#{URI.parse(options[:endpoint]).host}:#{rdp_port}}
342
- args += %W{/cert-tofu} # always accept certificate
342
+ args += %w{/cert-tofu} # always accept certificate
343
343
 
344
344
  LoginCommand.new(xfreerdp, args)
345
345
  end
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,7 +19,7 @@ require_relative "plugin"
19
19
 
20
20
  module Kitchen
21
21
  # A transport is responsible for the communication with an instance,
22
- # that is remote comands and other actions such as file transfer,
22
+ # that is remote commands and other actions such as file transfer,
23
23
  # login, etc.
24
24
  #
25
25
  # @author Salim Afiune <salim@afiunemaya.com.mx>
data/lib/kitchen/util.rb CHANGED
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -37,7 +37,7 @@ module Kitchen
37
37
  Logger.const_get(symbol.to_s.upcase)
38
38
  end
39
39
 
40
- # Returns the symbol represenation of a logging levels for a given
40
+ # Returns the symbol representation of a logging levels for a given
41
41
  # standard library Logger::Severity constant.
42
42
  #
43
43
  # @param const [Integer] Logger::Severity constant value for a logging
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -229,7 +229,7 @@ module Kitchen
229
229
  # Conditionally prefixes a command with a sudo command.
230
230
  #
231
231
  # @param command [String] command to be prefixed
232
- # @return [String] the command, conditionaly prefixed with sudo
232
+ # @return [String] the command, conditionally prefixed with sudo
233
233
  # @api private
234
234
  def sudo(script)
235
235
  config[:sudo] ? "#{config[:sudo_command]} #{script}" : script
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -7,7 +7,7 @@
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
9
  #
10
- # http://www.apache.org/licenses/LICENSE-2.0
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
11
  #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,5 +16,5 @@
16
16
  # limitations under the License.
17
17
 
18
18
  module Kitchen
19
- VERSION = "3.7.0".freeze
19
+ VERSION = "3.7.2".freeze
20
20
  end