test-kitchen 2.5.3 → 2.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -3
  3. data/bin/kitchen +1 -3
  4. data/lib/kitchen.rb +2 -5
  5. data/lib/kitchen/base64_stream.rb +0 -1
  6. data/lib/kitchen/cli.rb +2 -2
  7. data/lib/kitchen/collection.rb +0 -1
  8. data/lib/kitchen/color.rb +0 -1
  9. data/lib/kitchen/command.rb +0 -3
  10. data/lib/kitchen/command/action.rb +1 -2
  11. data/lib/kitchen/command/console.rb +0 -1
  12. data/lib/kitchen/command/diagnose.rb +3 -4
  13. data/lib/kitchen/command/doctor.rb +0 -1
  14. data/lib/kitchen/command/exec.rb +0 -1
  15. data/lib/kitchen/command/list.rb +1 -2
  16. data/lib/kitchen/command/login.rb +0 -1
  17. data/lib/kitchen/command/package.rb +0 -1
  18. data/lib/kitchen/command/sink.rb +0 -1
  19. data/lib/kitchen/command/test.rb +1 -2
  20. data/lib/kitchen/config.rb +1 -2
  21. data/lib/kitchen/configurable.rb +0 -1
  22. data/lib/kitchen/data_munger.rb +0 -1
  23. data/lib/kitchen/diagnostic.rb +0 -1
  24. data/lib/kitchen/driver.rb +0 -1
  25. data/lib/kitchen/driver/base.rb +2 -39
  26. data/lib/kitchen/driver/dummy.rb +0 -1
  27. data/lib/kitchen/driver/exec.rb +0 -1
  28. data/lib/kitchen/driver/proxy.rb +0 -1
  29. data/lib/kitchen/driver/ssh_base.rb +3 -40
  30. data/lib/kitchen/errors.rb +0 -1
  31. data/lib/kitchen/generator/init.rb +0 -1
  32. data/lib/kitchen/instance.rb +41 -15
  33. data/lib/kitchen/lazy_hash.rb +0 -1
  34. data/lib/kitchen/lifecycle_hooks.rb +0 -1
  35. data/lib/kitchen/loader/yaml.rb +2 -3
  36. data/lib/kitchen/logger.rb +1 -2
  37. data/lib/kitchen/logging.rb +0 -1
  38. data/lib/kitchen/login_command.rb +0 -1
  39. data/lib/kitchen/metadata_chopper.rb +0 -1
  40. data/lib/kitchen/platform.rb +0 -1
  41. data/lib/kitchen/plugin.rb +0 -1
  42. data/lib/kitchen/plugin_base.rb +60 -0
  43. data/lib/kitchen/provisioner.rb +0 -1
  44. data/lib/kitchen/provisioner/base.rb +2 -2
  45. data/lib/kitchen/provisioner/chef/berkshelf.rb +0 -1
  46. data/lib/kitchen/provisioner/chef/common_sandbox.rb +1 -2
  47. data/lib/kitchen/provisioner/chef/policyfile.rb +5 -6
  48. data/lib/kitchen/provisioner/chef_apply.rb +0 -1
  49. data/lib/kitchen/provisioner/chef_base.rb +16 -11
  50. data/lib/kitchen/provisioner/chef_solo.rb +4 -1
  51. data/lib/kitchen/provisioner/chef_zero.rb +0 -1
  52. data/lib/kitchen/provisioner/dummy.rb +0 -1
  53. data/lib/kitchen/provisioner/shell.rb +1 -2
  54. data/lib/kitchen/rake_tasks.rb +0 -1
  55. data/lib/kitchen/shell_out.rb +1 -2
  56. data/lib/kitchen/ssh.rb +6 -4
  57. data/lib/kitchen/state_file.rb +1 -2
  58. data/lib/kitchen/suite.rb +0 -1
  59. data/lib/kitchen/thor_tasks.rb +1 -2
  60. data/lib/kitchen/transport.rb +0 -1
  61. data/lib/kitchen/transport/base.rb +2 -2
  62. data/lib/kitchen/transport/dummy.rb +0 -1
  63. data/lib/kitchen/transport/exec.rb +1 -2
  64. data/lib/kitchen/transport/ssh.rb +4 -5
  65. data/lib/kitchen/transport/winrm.rb +3 -4
  66. data/lib/kitchen/util.rb +1 -2
  67. data/lib/kitchen/verifier.rb +0 -1
  68. data/lib/kitchen/verifier/base.rb +2 -2
  69. data/lib/kitchen/verifier/busser.rb +3 -4
  70. data/lib/kitchen/verifier/dummy.rb +0 -1
  71. data/lib/kitchen/verifier/shell.rb +1 -2
  72. data/lib/kitchen/version.rb +1 -2
  73. data/lib/vendor/hash_recursive_merge.rb +0 -1
  74. data/test-kitchen.gemspec +4 -5
  75. metadata +13 -12
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: Salim Afiune (<salim@afiunemaya.com.mx>)
4
3
  #
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Licensed under the Apache License, Version 2.0 (the "License");
4
3
  # you may not use this file except in compliance with the License.
@@ -12,7 +11,7 @@
12
11
  # See the License for the specific language governing permissions and
13
12
  # limitations under the License.
14
13
 
15
- require "fileutils"
14
+ require "fileutils" unless defined?(FileUtils)
16
15
 
17
16
  require_relative "../shell_out"
18
17
  require_relative "base"
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: Fletcher Nichol (<fnichol@nichol.ca>)
4
3
  #
@@ -18,13 +17,13 @@
18
17
 
19
18
  require_relative "../../kitchen"
20
19
 
21
- require "fileutils"
22
- require "net/ssh"
20
+ require "fileutils" unless defined?(FileUtils)
21
+ require "net/ssh" unless defined?(Net::SSH)
23
22
  require "net/ssh/gateway"
24
23
  require "net/ssh/proxy/http"
25
24
  require "net/scp"
26
- require "timeout"
27
- require "benchmark"
25
+ require "timeout" unless defined?(Timeout)
26
+ require "benchmark" unless defined?(Benchmark)
28
27
 
29
28
  module Kitchen
30
29
  module Transport
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: Salim Afiune (<salim@afiunemaya.com.mx>)
4
3
  # Author:: Matt Wrock (<matt@mattwrock.com>)
@@ -18,10 +17,10 @@
18
17
  # See the License for the specific language governing permissions and
19
18
  # limitations under the License.
20
19
 
21
- require "rbconfig"
22
- require "uri"
20
+ require "rbconfig" unless defined?(RbConfig)
21
+ require "uri" unless defined?(URI)
23
22
  require_relative "../../kitchen"
24
- require "winrm"
23
+ require "winrm" unless defined?(WinRM::Connection)
25
24
 
26
25
  module Kitchen
27
26
  module Transport
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: Fletcher Nichol (<fnichol@nichol.ca>)
4
3
  #
@@ -111,7 +110,7 @@ module Kitchen
111
110
  def self.wrap_command(cmd)
112
111
  cmd = "false" if cmd.nil?
113
112
  cmd = "true" if cmd.to_s.empty?
114
- cmd = cmd.sub(/\n\Z/, "") if cmd =~ /\n\Z/
113
+ cmd = cmd.sub(/\n\Z/, "") if /\n\Z/.match?(cmd)
115
114
 
116
115
  "sh -c '\n#{cmd}\n'"
117
116
  end
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: Fletcher Nichol (<fnichol@nichol.ca>)
4
3
  #
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: Fletcher Nichol (<fnichol@nichol.ca>)
4
3
  #
@@ -19,13 +18,14 @@
19
18
  require_relative "../errors"
20
19
  require_relative "../configurable"
21
20
  require_relative "../logging"
21
+ require_relative "../plugin_base"
22
22
 
23
23
  module Kitchen
24
24
  module Verifier
25
25
  # Base class for a verifier.
26
26
  #
27
27
  # @author Fletcher Nichol <fnichol@nichol.ca>
28
- class Base
28
+ class Base < Kitchen::Plugin::Base
29
29
  include Configurable
30
30
  include Logging
31
31
 
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: Fletcher Nichol (<fnichol@nichol.ca>)
4
3
  #
@@ -16,8 +15,8 @@
16
15
  # See the License for the specific language governing permissions and
17
16
  # limitations under the License.
18
17
 
19
- require "base64"
20
- require "digest"
18
+ require "base64" unless defined?(Base64)
19
+ require "digest" unless defined?(Digest)
21
20
 
22
21
  require_relative "base"
23
22
 
@@ -169,7 +168,7 @@ module Kitchen
169
168
  # @api private
170
169
  def gem_install_args
171
170
  gem, version = config[:version].split("@")
172
- if gem =~ /^\d+\.\d+\.\d+/
171
+ if /^\d+\.\d+\.\d+/.match?(gem)
173
172
  version = gem
174
173
  gem = "busser"
175
174
  end
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: Fletcher Nichol (<fnichol@nichol.ca>)
4
3
  #
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: SAWANOBORI Yukihiko (<sawanoboriyu@higanworks.com>)
4
3
  #
@@ -24,7 +23,7 @@ module Kitchen
24
23
  #
25
24
  # @author SAWANOBORI Yukihiko (<sawanoboriyu@higanworks.com>)
26
25
  class Shell < Kitchen::Verifier::Base
27
- require "mixlib/shellout"
26
+ require "mixlib/shellout" unless defined?(Mixlib::ShellOut)
28
27
 
29
28
  kitchen_verifier_api_version 1
30
29
 
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # Author:: Fletcher Nichol (<fnichol@nichol.ca>)
4
3
  #
@@ -17,5 +16,5 @@
17
16
  # limitations under the License.
18
17
 
19
18
  module Kitchen
20
- VERSION = "2.5.3".freeze
19
+ VERSION = "2.7.2".freeze
21
20
  end
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  #
3
2
  # = Hash Recursive Merge
4
3
  #
@@ -1,5 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("lib", __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require "kitchen/version"
5
4
  require "English"
@@ -16,12 +15,12 @@ Gem::Specification.new do |gem|
16
15
  gem.summary = gem.description
17
16
  gem.homepage = "https://kitchen.ci/"
18
17
 
19
- # The gemfile and gemspec are necessary for appbundler in Chef-DK / Workstation
18
+ # The gemfile and gemspec are necessary for appbundler in ChefDK / Workstation
20
19
  gem.files = %w{LICENSE test-kitchen.gemspec Gemfile Rakefile} + Dir.glob("{bin,lib,templates,support}/**/*")
21
20
  gem.executables = %w{kitchen}
22
21
  gem.require_paths = ["lib"]
23
22
 
24
- gem.required_ruby_version = ">= 2.3"
23
+ gem.required_ruby_version = ">= 2.4"
25
24
 
26
25
  gem.add_dependency "mixlib-shellout", ">= 1.2", "< 4.0"
27
26
  gem.add_dependency "net-scp", ">= 1.1", "< 4.0" # pinning until we can confirm 4+ works
@@ -36,7 +35,7 @@ Gem::Specification.new do |gem|
36
35
  gem.add_dependency "winrm-fs", "~> 1.1"
37
36
  # Required to run the Chef provisioner local license check for remote systems
38
37
  # TK is not under Chef EULA
39
- gem.add_dependency "license-acceptance", "~> 1.0", ">= 1.0.11"
38
+ gem.add_dependency "license-acceptance", ">= 1.0.11", "< 3.0" # pinning until we can confirm 3+ works
40
39
 
41
40
  gem.add_development_dependency "rb-readline"
42
41
  gem.add_development_dependency "bundler"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-kitchen
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.3
4
+ version: 2.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fletcher Nichol
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-10 00:00:00.000000000 Z
11
+ date: 2020-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-shellout
@@ -198,22 +198,22 @@ dependencies:
198
198
  name: license-acceptance
199
199
  requirement: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - "~>"
202
- - !ruby/object:Gem::Version
203
- version: '1.0'
204
201
  - - ">="
205
202
  - !ruby/object:Gem::Version
206
203
  version: 1.0.11
204
+ - - "<"
205
+ - !ruby/object:Gem::Version
206
+ version: '3.0'
207
207
  type: :runtime
208
208
  prerelease: false
209
209
  version_requirements: !ruby/object:Gem::Requirement
210
210
  requirements:
211
- - - "~>"
212
- - !ruby/object:Gem::Version
213
- version: '1.0'
214
211
  - - ">="
215
212
  - !ruby/object:Gem::Version
216
213
  version: 1.0.11
214
+ - - "<"
215
+ - !ruby/object:Gem::Version
216
+ version: '3.0'
217
217
  - !ruby/object:Gem::Dependency
218
218
  name: rb-readline
219
219
  requirement: !ruby/object:Gem::Requirement
@@ -423,6 +423,7 @@ files:
423
423
  - lib/kitchen/metadata_chopper.rb
424
424
  - lib/kitchen/platform.rb
425
425
  - lib/kitchen/plugin.rb
426
+ - lib/kitchen/plugin_base.rb
426
427
  - lib/kitchen/provisioner.rb
427
428
  - lib/kitchen/provisioner/base.rb
428
429
  - lib/kitchen/provisioner/chef/berkshelf.rb
@@ -484,7 +485,7 @@ homepage: https://kitchen.ci/
484
485
  licenses:
485
486
  - Apache-2.0
486
487
  metadata: {}
487
- post_install_message:
488
+ post_install_message:
488
489
  rdoc_options: []
489
490
  require_paths:
490
491
  - lib
@@ -492,7 +493,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
492
493
  requirements:
493
494
  - - ">="
494
495
  - !ruby/object:Gem::Version
495
- version: '2.3'
496
+ version: '2.4'
496
497
  required_rubygems_version: !ruby/object:Gem::Requirement
497
498
  requirements:
498
499
  - - ">="
@@ -500,7 +501,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
500
501
  version: '0'
501
502
  requirements: []
502
503
  rubygems_version: 3.1.2
503
- signing_key:
504
+ signing_key:
504
505
  specification_version: 4
505
506
  summary: Test Kitchen is an integration tool for developing and testing infrastructure
506
507
  code and software on isolated target platforms.