chef 15.12.22-universal-mingw32 → 15.13.8-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -4
  3. data/chef-universal-mingw32.gemspec +2 -2
  4. data/lib/chef/chef_fs/file_system/repository/base_file.rb +1 -0
  5. data/lib/chef/deprecated.rb +4 -0
  6. data/lib/chef/exceptions.rb +3 -0
  7. data/lib/chef/knife/bootstrap.rb +1 -1
  8. data/lib/chef/knife/bootstrap/train_connector.rb +1 -0
  9. data/lib/chef/knife/core/gem_glob_loader.rb +1 -1
  10. data/lib/chef/knife/core/hashed_command_loader.rb +1 -0
  11. data/lib/chef/knife/core/subcommand_loader.rb +1 -1
  12. data/lib/chef/knife/ssh.rb +4 -0
  13. data/lib/chef/log.rb +1 -1
  14. data/lib/chef/mixin/openssl_helper.rb +26 -3
  15. data/lib/chef/mixin/template.rb +1 -0
  16. data/lib/chef/node_map.rb +5 -2
  17. data/lib/chef/provider/mount/solaris.rb +0 -1
  18. data/lib/chef/provider/package/zypper.rb +0 -1
  19. data/lib/chef/provider/yum_repository.rb +1 -1
  20. data/lib/chef/provider/zypper_repository.rb +1 -1
  21. data/lib/chef/resource.rb +2 -0
  22. data/lib/chef/resource/cron_access.rb +2 -2
  23. data/lib/chef/resource/cron_d.rb +1 -1
  24. data/lib/chef/resource/lwrp_base.rb +7 -0
  25. data/lib/chef/resource/ssh_known_hosts_entry.rb +1 -1
  26. data/lib/chef/resource/sudo.rb +1 -1
  27. data/lib/chef/shell/shell_session.rb +2 -0
  28. data/lib/chef/version.rb +2 -2
  29. data/spec/functional/knife/ssh_spec.rb +4 -4
  30. data/spec/functional/resource/aix_service_spec.rb +0 -1
  31. data/spec/functional/resource/aixinit_service_spec.rb +0 -1
  32. data/spec/functional/resource/apt_package_spec.rb +0 -1
  33. data/spec/functional/resource/cron_spec.rb +0 -1
  34. data/spec/functional/resource/insserv_spec.rb +0 -1
  35. data/spec/functional/run_lock_spec.rb +2 -1
  36. data/spec/functional/util/powershell/cmdlet_spec.rb +1 -1
  37. data/spec/functional/version_spec.rb +1 -1
  38. data/spec/integration/recipes/accumulator_spec.rb +1 -1
  39. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +1 -1
  40. data/spec/integration/recipes/lwrp_spec.rb +1 -1
  41. data/spec/integration/recipes/notifies_spec.rb +1 -1
  42. data/spec/integration/recipes/notifying_block_spec.rb +1 -1
  43. data/spec/integration/recipes/recipe_dsl_spec.rb +1 -1
  44. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +2 -0
  45. data/spec/integration/recipes/resource_load_spec.rb +1 -0
  46. data/spec/integration/recipes/unified_mode_spec.rb +1 -1
  47. data/spec/scripts/ssl-serve.rb +1 -1
  48. data/spec/spec_helper.rb +5 -4
  49. data/spec/support/shared/integration/knife_support.rb +2 -5
  50. data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +2 -4
  51. data/spec/unit/cookbook/gem_installer_spec.rb +2 -1
  52. data/spec/unit/dsl/platform_introspection_spec.rb +1 -0
  53. data/spec/unit/event_dispatch/dispatcher_spec.rb +3 -0
  54. data/spec/unit/knife/cookbook_upload_spec.rb +5 -6
  55. data/spec/unit/lwrp_spec.rb +4 -4
  56. data/spec/unit/mixin/securable_spec.rb +0 -1
  57. data/spec/unit/property_spec.rb +5 -5
  58. data/spec/unit/provider/package/dnf/python_helper_spec.rb +1 -1
  59. data/spec/unit/provider/package/rubygems_spec.rb +5 -10
  60. data/spec/unit/provider/package/windows_spec.rb +30 -53
  61. data/spec/unit/provider/service/windows_spec.rb +2 -6
  62. data/spec/unit/provider/systemd_unit_spec.rb +28 -24
  63. data/spec/unit/provider_spec.rb +1 -0
  64. data/spec/unit/resource/windows_package_spec.rb +1 -0
  65. data/spec/unit/run_context/cookbook_compiler_spec.rb +1 -1
  66. data/spec/unit/win32/security_spec.rb +4 -3
  67. metadata +14 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7d10dc56cf8158118e798321235a2e20cd396d0c271c1d8da451394f99cd5dc
4
- data.tar.gz: d8d9d42fdfd9afe9bff18bf6cee3774518ae3633544d7b40dc8179b4bd6aaed7
3
+ metadata.gz: fc9053028d3cccbdba43dc5be7b25a0fd5a060e98508ca8d30a081dea3c3a427
4
+ data.tar.gz: c7286fd82ecedab382a685fd24bfc97f80682b8351300254d1aee414c8910db6
5
5
  SHA512:
6
- metadata.gz: e7dda48107577e29a021c120368b4683a7049660d79df8a2ae45912b198d89ed0c568f80c51cd341dc35aa3801b4319ed568e66f09454f2c903bfc5d4e4100d9
7
- data.tar.gz: ecb3de98f0e4a7c8d765a9f3bf2eebe192377120447f467ea541d9c936e284768a2f96d3ccf6fe6e3459ddcd4c66703e1f188647b02723806f3b9e0b6ef977dc
6
+ metadata.gz: 5260139892c3516289eab07b899dfd949d420811d832fd49c856b4615f59c3fe4e3928e7d26fa26bdb9fb4667556b2145ddd25b43ac2508031389457dcc1f1e9
7
+ data.tar.gz: 5f934310d3867313ef3fb9d3f35b29a2960fab407e856c574cfc10062a2a1bbc55f991c3a555e661b79dd81e98e0ce0771aa6b7bd14f3e1638266dcae4d5774f
data/Gemfile CHANGED
@@ -9,12 +9,12 @@ gem "chef", path: "."
9
9
 
10
10
  gem "ohai", git: "https://github.com/chef/ohai.git", branch: "15-stable"
11
11
 
12
- gem "chef-utils", path: File.expand_path("../chef-utils", __FILE__) if File.exist?(File.expand_path("../chef-utils", __FILE__))
13
- gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))
12
+ gem "chef-utils", path: File.expand_path("chef-utils", __dir__) if File.exist?(File.expand_path("chef-utils", __dir__))
13
+ gem "chef-config", path: File.expand_path("chef-config", __dir__) if File.exist?(File.expand_path("chef-config", __dir__))
14
14
 
15
- if File.exist?(File.expand_path("../chef-bin", __FILE__))
15
+ if File.exist?(File.expand_path("chef-bin", __dir__))
16
16
  # bundling in a git checkout
17
- gem "chef-bin", path: File.expand_path("../chef-bin", __FILE__)
17
+ gem "chef-bin", path: File.expand_path("chef-bin", __dir__)
18
18
  else
19
19
  # bundling in omnibus
20
20
  gem "chef-bin" # rubocop:disable Bundler/DuplicatedGem
@@ -1,4 +1,4 @@
1
- gemspec = eval(IO.read(File.expand_path("../chef.gemspec", __FILE__)))
1
+ gemspec = eval(IO.read(File.expand_path("chef.gemspec", __dir__)))
2
2
 
3
3
  gemspec.platform = Gem::Platform.new(%w{universal mingw32})
4
4
 
@@ -14,7 +14,7 @@ gemspec.add_dependency "win32-process", "~> 0.8.2"
14
14
  gemspec.add_dependency "win32-service", ">= 2.1.5", "< 3.0"
15
15
  gemspec.add_dependency "wmi-lite", "~> 1.0"
16
16
  gemspec.add_dependency "win32-taskscheduler", "~> 2.0"
17
- gemspec.add_dependency "iso8601", "~> 0.12.1"
17
+ gemspec.add_dependency "iso8601", ">= 0.12.1", "< 0.14" # validate 0.14 when it comes out
18
18
  gemspec.add_dependency "win32-certstore", "~> 0.3"
19
19
  gemspec.extensions << "ext/win32-eventlog/Rakefile"
20
20
  gemspec.files += Dir.glob("{distro,ext}/**/*")
@@ -92,6 +92,7 @@ class Chef
92
92
  end
93
93
 
94
94
  attr_writer :write_pretty_json
95
+
95
96
  def write_pretty_json
96
97
  @write_pretty_json.nil? ? root.write_pretty_json : @write_pretty_json
97
98
  end
@@ -241,6 +241,10 @@ class Chef
241
241
  target 30
242
242
  end
243
243
 
244
+ class ResourceNameWithoutProvides < Base
245
+ target 31
246
+ end
247
+
244
248
  class Generic < Base
245
249
  def url
246
250
  "https://docs.chef.io/chef_deprecations_client/"
@@ -198,6 +198,7 @@ class Chef
198
198
  class MetadataNotFound < StandardError
199
199
  attr_reader :install_path
200
200
  attr_reader :cookbook_name
201
+
201
202
  def initialize(install_path, cookbook_name)
202
203
  @install_path = install_path
203
204
  @cookbook_name = cookbook_name
@@ -448,6 +449,7 @@ class Chef
448
449
  # to correctly populate the backtrace with the wrapped backtraces.
449
450
  class RunFailedWrappingError < RuntimeError
450
451
  attr_reader :wrapped_errors
452
+
451
453
  def initialize(*errors)
452
454
  errors = errors.select { |e| !e.nil? }
453
455
  output = "Found #{errors.size} errors, they are stored in the backtrace"
@@ -488,6 +490,7 @@ class Chef
488
490
 
489
491
  class MultipleDscResourcesFound < RuntimeError
490
492
  attr_reader :resources_found
493
+
491
494
  def initialize(resources_found)
492
495
  @resources_found = resources_found
493
496
  matches_info = @resources_found.each do |r|
@@ -555,7 +555,7 @@ class Chef
555
555
  end
556
556
 
557
557
  def run
558
- check_license
558
+ check_license if ChefConfig::Dist::ENFORCE_LICENSE
559
559
 
560
560
  plugin_setup!
561
561
  validate_name_args!
@@ -322,6 +322,7 @@ class Chef
322
322
 
323
323
  class RemoteExecutionFailed < StandardError
324
324
  attr_reader :exit_status, :command, :hostname, :stdout, :stderr
325
+
325
326
  def initialize(hostname, command, result)
326
327
  @hostname = hostname
327
328
  @exit_status = result.exit_status
@@ -47,7 +47,7 @@ class Chef
47
47
 
48
48
  def find_subcommands_via_dirglob
49
49
  # The "require paths" of the core knife subcommands bundled with chef
50
- files = Dir[File.join(Chef::Util::PathHelper.escape_glob_dir(File.expand_path("../../../knife", __FILE__)), "*.rb")]
50
+ files = Dir[File.join(Chef::Util::PathHelper.escape_glob_dir(File.expand_path("../../knife", __dir__)), "*.rb")]
51
51
  subcommand_files = {}
52
52
  files.each do |knife_file|
53
53
  rel_path = knife_file[/#{CHEF_ROOT}#{Regexp.escape(File::SEPARATOR)}(.*)\.rb/, 1]
@@ -27,6 +27,7 @@ class Chef
27
27
  KEY = "_autogenerated_command_paths".freeze
28
28
 
29
29
  attr_accessor :manifest
30
+
30
31
  def initialize(chef_config_dir, plugin_manifest)
31
32
  super(chef_config_dir)
32
33
  @manifest = plugin_manifest
@@ -125,7 +125,7 @@ class Chef
125
125
  #
126
126
  def find_subcommands_via_dirglob
127
127
  # The "require paths" of the core knife subcommands bundled with chef
128
- files = Dir[File.join(Chef::Util::PathHelper.escape_glob_dir(File.expand_path("../../../knife", __FILE__)), "*.rb")]
128
+ files = Dir[File.join(Chef::Util::PathHelper.escape_glob_dir(File.expand_path("../../knife", __dir__)), "*.rb")]
129
129
  subcommand_files = {}
130
130
  files.each do |knife_file|
131
131
  rel_path = knife_file[/#{CHEF_ROOT}#{Regexp.escape(File::SEPARATOR)}(.*)\.rb/, 1]
@@ -298,6 +298,10 @@ class Chef
298
298
  opts[:keepalive] = true
299
299
  opts[:keepalive_interval] = ssh_config[:keepalive_interval]
300
300
  end
301
+ # maintain support for legacy key types / ciphers / key exchange algorithms.
302
+ # most importantly this adds back support for DSS host keys
303
+ # See https://github.com/net-ssh/net-ssh/pull/709
304
+ opts[:append_all_supported_algorithms] = true
301
305
  end
302
306
  end
303
307
 
@@ -47,7 +47,7 @@ class Chef
47
47
  def self.caller_location
48
48
  # Pick the first caller that is *not* part of the Chef gem, that's the
49
49
  # thing the user wrote. Or failing that, the most recent caller.
50
- chef_gem_path = File.expand_path("../..", __FILE__)
50
+ chef_gem_path = File.expand_path("..", __dir__)
51
51
  caller(0..20).find { |c| !c.start_with?(chef_gem_path) } || caller(0..1)[0]
52
52
  end
53
53
 
@@ -282,7 +282,9 @@ class Chef
282
282
  ef.issuer_certificate = info["issuer"]
283
283
  end
284
284
  ef.subject_certificate = cert
285
- ef.config = ::OpenSSL::Config.load(::OpenSSL::Config::DEFAULT_CONFIG_FILE)
285
+ if openssl_config = __openssl_config
286
+ ef.config = openssl_config
287
+ end
286
288
 
287
289
  cert.extensions = extension
288
290
  cert.add_extension ef.create_extension("subjectKeyIdentifier", "hash")
@@ -313,7 +315,9 @@ class Chef
313
315
  crl.last_update = Time.now
314
316
  crl.next_update = Time.now + 3600 * 24 * info["validity"]
315
317
 
316
- ef.config = ::OpenSSL::Config.load(::OpenSSL::Config::DEFAULT_CONFIG_FILE)
318
+ if openssl_config = __openssl_config
319
+ ef.config = openssl_config
320
+ end
317
321
  ef.issuer_certificate = info["issuer"]
318
322
 
319
323
  crl.add_extension ::OpenSSL::X509::Extension.new("crlNumber", ::OpenSSL::ASN1::Integer(1))
@@ -391,7 +395,9 @@ class Chef
391
395
  crl.next_update = crl.last_update + 3600 * 24 * info["validity"]
392
396
 
393
397
  ef = ::OpenSSL::X509::ExtensionFactory.new
394
- ef.config = ::OpenSSL::Config.load(::OpenSSL::Config::DEFAULT_CONFIG_FILE)
398
+ if openssl_config = __openssl_config
399
+ ef.config = openssl_config
400
+ end
395
401
  ef.issuer_certificate = info["issuer"]
396
402
 
397
403
  crl.extensions = [ ::OpenSSL::X509::Extension.new("crlNumber",
@@ -422,6 +428,23 @@ class Chef
422
428
 
423
429
  resp
424
430
  end
431
+
432
+ private
433
+
434
+ def __openssl_config
435
+ path = if File.exist?(::OpenSSL::Config::DEFAULT_CONFIG_FILE)
436
+ OpenSSL::Config::DEFAULT_CONFIG_FILE
437
+ else
438
+ Dir[File.join(RbConfig::CONFIG["prefix"], "**", "openssl.cnf")].first
439
+ end
440
+
441
+ if File.exist?(path)
442
+ ::OpenSSL::Config.load(path)
443
+ else
444
+ Chef::Log.warn("Couldn't find OpenSSL config file")
445
+ nil
446
+ end
447
+ end
425
448
  end
426
449
  end
427
450
  end
@@ -213,6 +213,7 @@ class Chef
213
213
 
214
214
  class TemplateError < RuntimeError
215
215
  attr_reader :original_exception, :context, :options
216
+
216
217
  SOURCE_CONTEXT_WINDOW = 2
217
218
 
218
219
  def initialize(original_exception, template, context, options)
@@ -35,10 +35,13 @@
35
35
  #
36
36
  # XXX: confusingly, in the *_priority_map the :klass may be an array of Strings of class names
37
37
  #
38
+
39
+ require_relative "dist"
40
+
38
41
  class Chef
39
42
  class NodeMap
40
43
  COLLISION_WARNING = <<~EOH.gsub(/\s+/, " ").strip
41
- %{type_caps} %{key} from the client is overriding the %{type} from a cookbook. Please upgrade your cookbook
44
+ %{type_caps} %{key} built into %{client_name} is being overridden by the %{type} from a cookbook. Please upgrade your cookbook
42
45
  or remove the cookbook from your run_list.
43
46
  EOH
44
47
 
@@ -84,7 +87,7 @@ class Chef
84
87
  else
85
88
  klass.superclass.to_s
86
89
  end
87
- Chef::Log.warn( COLLISION_WARNING % { type: type_of_thing, key: key, type_caps: type_of_thing.capitalize } )
90
+ Chef::Log.warn( COLLISION_WARNING % { type: type_of_thing, key: key, type_caps: type_of_thing.capitalize, client_name: Chef::Dist::PRODUCT } )
88
91
  end
89
92
 
90
93
  # The map is sorted in order of preference already; we just need to find
@@ -1,4 +1,3 @@
1
- # Encoding: utf-8
2
1
  # Author:: Hugo Fichter
3
2
  # Author:: Lamont Granquist (<lamont@chef.io>)
4
3
  # Author:: Joshua Timberman (<joshua@chef.io>)
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  #
3
2
  # Authors:: Adam Jacob (<adam@chef.io>)
4
3
  # Ionuț Arțăriși (<iartarisi@suse.cz>)
@@ -37,7 +37,7 @@ class Chef
37
37
  if template_available?(new_resource.source)
38
38
  source new_resource.source
39
39
  else
40
- source ::File.expand_path("../support/yum_repo.erb", __FILE__)
40
+ source ::File.expand_path("support/yum_repo.erb", __dir__)
41
41
  local true
42
42
  end
43
43
  sensitive new_resource.sensitive
@@ -41,7 +41,7 @@ class Chef
41
41
  if template_available?(new_resource.source)
42
42
  source new_resource.source
43
43
  else
44
- source ::File.expand_path("../support/zypper_repo.erb", __FILE__)
44
+ source ::File.expand_path("support/zypper_repo.erb", __dir__)
45
45
  local true
46
46
  end
47
47
  sensitive new_resource.sensitive
@@ -613,6 +613,7 @@ class Chef
613
613
  # Do NOT use this. It may be removed. It is for internal purposes only.
614
614
  # @api private
615
615
  attr_reader :resource_initializing
616
+
616
617
  def resource_initializing=(value)
617
618
  if value
618
619
  @resource_initializing = true
@@ -863,6 +864,7 @@ class Chef
863
864
  # have.
864
865
  #
865
866
  attr_writer :allowed_actions
867
+
866
868
  def allowed_actions(value = NOT_PASSED)
867
869
  if value != NOT_PASSED
868
870
  self.allowed_actions = value
@@ -66,7 +66,7 @@ class Chef
66
66
 
67
67
  with_run_context :root do
68
68
  edit_resource(:template, allow_path) do |new_resource|
69
- source ::File.expand_path("../support/cron_access.erb", __FILE__)
69
+ source ::File.expand_path("support/cron_access.erb", __dir__)
70
70
  local true
71
71
  mode "0600"
72
72
  variables["users"] ||= []
@@ -83,7 +83,7 @@ class Chef
83
83
 
84
84
  with_run_context :root do
85
85
  edit_resource(:template, deny_path) do |new_resource|
86
- source ::File.expand_path("../support/cron_access.erb", __FILE__)
86
+ source ::File.expand_path("support/cron_access.erb", __dir__)
87
87
  local true
88
88
  mode "0600"
89
89
  variables["users"] ||= []
@@ -289,7 +289,7 @@ class Chef
289
289
 
290
290
  # @todo this is Chef 12 era cleanup. Someday we should remove it all
291
291
  template "/etc/cron.d/#{sanitized_name}" do
292
- source ::File.expand_path("../support/cron.d.erb", __FILE__)
292
+ source ::File.expand_path("support/cron.d.erb", __dir__)
293
293
  local true
294
294
  mode new_resource.mode
295
295
  variables(
@@ -65,6 +65,12 @@ class Chef
65
65
 
66
66
  LWRPBase.loaded_lwrps[filename] = true
67
67
 
68
+ unless resource_class.resource_name.nil?
69
+ if Chef.resource_handler_map.get(node, resource_class.resource_name, canonical: true) == resource_class
70
+ Chef.deprecated(:resource_name_without_provides, "Resource #{resource_class.resource_name} needs `provides :#{resource_class.resource_name}` in addition to `resource_name :#{resource_class.resource_name}` declaration")
71
+ end
72
+ end
73
+
68
74
  # wire up the default resource name after the class is parsed only if we haven't declared one.
69
75
  # (this ordering is important for MapCollision deprecation warnings)
70
76
  resource_class.resource_name resource_name.to_sym if resource_class.resource_name.nil?
@@ -103,6 +109,7 @@ class Chef
103
109
  protected
104
110
 
105
111
  attr_writer :loaded_lwrps
112
+
106
113
  def loaded_lwrps
107
114
  @loaded_lwrps ||= {}
108
115
  end
@@ -88,7 +88,7 @@ class Chef
88
88
 
89
89
  r = with_run_context :root do
90
90
  find_resource(:template, "update ssh known hosts file #{new_resource.file_location}") do
91
- source ::File.expand_path("../support/ssh_known_hosts.erb", __FILE__)
91
+ source ::File.expand_path("support/ssh_known_hosts.erb", __dir__)
92
92
  local true
93
93
  path new_resource.file_location
94
94
  owner new_resource.owner
@@ -172,7 +172,7 @@ class Chef
172
172
  end
173
173
  else
174
174
  declare_resource(:template, file_path) do
175
- source ::File.expand_path("../support/sudoer.erb", __FILE__)
175
+ source ::File.expand_path("support/sudoer.erb", __dir__)
176
176
  local true
177
177
  mode "0440"
178
178
  variables sudoer: (new_resource.groups + new_resource.users).join(","),
@@ -41,6 +41,7 @@ module Shell
41
41
 
42
42
  attr_accessor :node, :compile, :recipe, :json_configuration
43
43
  attr_reader :node_attributes, :client
44
+
44
45
  def initialize
45
46
  @node_built = false
46
47
  formatter = Chef::Formatters.new(Chef::Config.formatter, STDOUT, STDERR)
@@ -75,6 +76,7 @@ module Shell
75
76
  end
76
77
 
77
78
  attr_writer :run_context
79
+
78
80
  def run_context
79
81
  @run_context ||= rebuild_context
80
82
  end
@@ -22,8 +22,8 @@
22
22
  require_relative "version_string"
23
23
 
24
24
  class Chef
25
- CHEF_ROOT = File.expand_path("../..", __FILE__)
26
- VERSION = Chef::VersionString.new("15.12.22")
25
+ CHEF_ROOT = File.expand_path("..", __dir__)
26
+ VERSION = Chef::VersionString.new("15.13.8")
27
27
  end
28
28
 
29
29
  #
@@ -274,7 +274,7 @@ describe Chef::Knife::Ssh do
274
274
  end
275
275
 
276
276
  it "uses the ssh_gateway" do
277
- expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", {})
277
+ expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { append_all_supported_algorithms: true })
278
278
  @knife.run
279
279
  expect(@knife.config[:ssh_gateway]).to eq("user@ec2.public_hostname")
280
280
  end
@@ -287,7 +287,7 @@ describe Chef::Knife::Ssh do
287
287
  end
288
288
 
289
289
  it "uses the ssh_gateway" do
290
- expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", {})
290
+ expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { append_all_supported_algorithms: true })
291
291
  @knife.run
292
292
  expect(@knife.config[:ssh_gateway]).to eq("user@ec2.public_hostname")
293
293
  end
@@ -301,7 +301,7 @@ describe Chef::Knife::Ssh do
301
301
  end
302
302
 
303
303
  it "uses the ssh_gateway_identity file" do
304
- expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { keys: File.expand_path("#{ENV["HOME"]}/.ssh/aws-gateway.rsa").squeeze("/"), keys_only: true })
304
+ expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { append_all_supported_algorithms: true, keys: File.expand_path("#{ENV["HOME"]}/.ssh/aws-gateway.rsa").squeeze("/"), keys_only: true })
305
305
  @knife.run
306
306
  expect(@knife.config[:ssh_gateway_identity]).to eq("~/.ssh/aws-gateway.rsa")
307
307
  end
@@ -315,7 +315,7 @@ describe Chef::Knife::Ssh do
315
315
  end
316
316
 
317
317
  it "uses the ssh_gateway_identity file" do
318
- expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { keys: File.expand_path("#{ENV["HOME"]}/.ssh/aws-gateway.rsa").squeeze("/"), keys_only: true })
318
+ expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { append_all_supported_algorithms: true, keys: File.expand_path("#{ENV["HOME"]}/.ssh/aws-gateway.rsa").squeeze("/"), keys_only: true })
319
319
  @knife.run
320
320
  expect(@knife.config[:ssh_gateway_identity]).to eq("~/.ssh/aws-gateway.rsa")
321
321
  end
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  #
3
2
  # Author:: Kaustubh Deorukhkar (<kaustubh@clogeny.com>)
4
3
  # Copyright:: Copyright (c) Chef Software Inc.
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  #
3
2
  # Author:: Kaustubh Deorukhkar (<kaustubh@clogeny.com>)
4
3
  # Copyright:: Copyright (c) Chef Software Inc.
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  #
3
2
  # Author:: Daniel DeLeo (<dan@chef.io>)
4
3
  # Copyright:: Copyright (c) Chef Software Inc.