knife 18.8.68 → 18.10.18

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/knife.gemspec +8 -8
  4. data/lib/chef/knife/bootstrap.rb +8 -8
  5. data/lib/chef/knife/config_get.rb +1 -1
  6. data/lib/chef/knife/config_get_profile.rb +1 -1
  7. data/lib/chef/knife/config_list_profiles.rb +1 -1
  8. data/lib/chef/knife/config_show.rb +1 -1
  9. data/lib/chef/knife/config_use_profile.rb +1 -1
  10. data/lib/chef/knife/cookbook_upload.rb +1 -1
  11. data/lib/chef/knife/core/cookbook_site_streaming_uploader.rb +1 -6
  12. data/lib/chef/knife/core/gem_glob_loader.rb +2 -2
  13. data/lib/chef/knife/core/status_presenter.rb +1 -1
  14. data/lib/chef/knife/core/subcommand_loader.rb +1 -1
  15. data/lib/chef/knife/core/windows_bootstrap_context.rb +3 -3
  16. data/lib/chef/knife/environment_compare.rb +2 -3
  17. data/lib/chef/knife/key_create.rb +1 -5
  18. data/lib/chef/knife/key_edit.rb +1 -5
  19. data/lib/chef/knife/search.rb +2 -2
  20. data/lib/chef/knife/ssh.rb +3 -3
  21. data/lib/chef/knife/user_list.rb +3 -3
  22. data/lib/chef/knife/version.rb +1 -3
  23. data/lib/chef/utils/licensing_config.rb +0 -1
  24. data/lib/chef/utils/licensing_handler.rb +2 -2
  25. data/spec/functional/cookbook_delete_spec.rb +3 -3
  26. data/spec/functional/version_spec.rb +0 -1
  27. data/spec/integration/config_use_spec.rb +8 -8
  28. data/spec/integration/node_environment_set_spec.rb +1 -1
  29. data/spec/integration/node_run_list_set_spec.rb +1 -1
  30. data/spec/unit/knife/bootstrap_spec.rb +2 -2
  31. data/spec/unit/knife/cookbook_list_spec.rb +1 -1
  32. data/spec/unit/knife/license_spec.rb +1 -1
  33. data/spec/unit/knife/search_spec.rb +1 -1
  34. data/spec/unit/knife/supermarket_install_spec.rb +2 -2
  35. metadata +20 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13bca26f312d5e068e005be12728ee58921e90fc573fe757d27ea8c4b5b812f6
4
- data.tar.gz: 0da54bfaa9b437f52dbbb203c570e6bbeda840ca5dd5d94d7d6947ead3a8a84f
3
+ metadata.gz: abdfe1bb496c7fa437783acf0e27820299b061899e019e83ffbc228d4b9e5649
4
+ data.tar.gz: 1ae95ba27f5975a6217b252f9c601ca884d3a1e51fe67c063a27058f616633bb
5
5
  SHA512:
6
- metadata.gz: 53c7412d0e45a4bc29aac831cb3852e88c7440dae8784ef7056e8c0f92c59e864a18a569b1a6e1f7517295ada533e61059e19aee59721114a63d9c1d3471cff8
7
- data.tar.gz: fc6a97ff8ef6205aa2f1c9693250a8373a29e3579f28bcfd90f627e09fafb101d20a8a4b03a9465168cc4ef0eb6fd87bdd45f4878703052f1de5a6a65ca828f3
6
+ metadata.gz: e1e8b4200263e2a7d750e5fa283f93a0b9d4ea226de9c50a70dd986b6aeec50de438577c48ced9054a3452b8887439c7d967f215848c847ecf935f6da197bb16
7
+ data.tar.gz: 55c5fdaa1af600bf2ca74702f0bd72f65958359f463a2e6bd550281a2fcd37e47d39894bb4138c42e5199d9535e111a971ff0ea8fdf7d44e77e1a9fbb3f39b06
data/Gemfile CHANGED
@@ -16,8 +16,8 @@ group(:omnibus_package, :pry) do
16
16
  gem "pry-stack_explorer"
17
17
  end
18
18
 
19
- group(:chefstyle) do
20
- gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "main"
19
+ group(:cookstyle) do
20
+ gem "cookstyle", git: "https://github.com/chef/cookstyle.git", branch: "main"
21
21
  end
22
22
 
23
23
  gem "ohai", git: "https://github.com/chef/ohai.git", branch: "18-stable"
data/knife.gemspec CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
19
19
  s.add_dependency "chef-utils", "~> 18.0"
20
20
  s.add_dependency "chef", "~> 18.0"
21
21
  s.add_dependency "chef-bin", "~> 18.0"
22
- s.add_dependency "train-core", "~> 3.10" # 3.2.28 fixes sudo prompts. See https://github.com/chef/chef/pull/9635
23
- s.add_dependency "train-winrm", "~> 0.2.17"
22
+ s.add_dependency "train-core", "~> 3.13", ">= 3.13.4"
23
+ s.add_dependency "train-winrm", "~> 0.4.0"
24
24
  s.add_dependency "license-acceptance", ">= 1.0.5", "< 3"
25
25
  s.add_dependency "mixlib-cli", ">= 2.1.1", "< 3.0"
26
26
  s.add_dependency "mixlib-archive", ">= 0.4", "< 2.0"
@@ -41,7 +41,7 @@ Gem::Specification.new do |s|
41
41
  s.add_dependency "erubis", "~> 2.7"
42
42
  s.add_dependency "chef-vault" # knife vault
43
43
 
44
- s.add_development_dependency "chefstyle"
44
+ s.add_development_dependency "cookstyle", "~> 8.6"
45
45
 
46
46
  s.add_dependency "proxifier2", "~> 1.1"
47
47
 
@@ -57,11 +57,11 @@ Gem::Specification.new do |s|
57
57
  Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
58
58
 
59
59
  s.metadata = {
60
- "bug_tracker_uri" => "https://github.com/chef/chef/issues",
61
- "changelog_uri" => "https://github.com/chef/chef/blob/main/CHANGELOG.md",
60
+ "bug_tracker_uri" => "https://github.com/chef/chef/issues",
61
+ "changelog_uri" => "https://github.com/chef/chef/blob/main/CHANGELOG.md",
62
62
  "documentation_uri" => "https://docs.chef.io/",
63
- "homepage_uri" => "https://www.chef.io",
64
- "mailing_list_uri" => "https://discourse.chef.io/",
65
- "source_code_uri" => "https://github.com/chef/chef/",
63
+ "homepage_uri" => "https://www.chef.io",
64
+ "mailing_list_uri" => "https://discourse.chef.io/",
65
+ "source_code_uri" => "https://github.com/chef/chef/",
66
66
  }
67
67
  end
@@ -1213,16 +1213,16 @@ class Chef
1213
1213
 
1214
1214
  ui.warn(<<~MSG
1215
1215
 
1216
- +---------------------------------------------------------------------------------------------------------------------+
1217
- To ensure uninterrupted downloads of Infra Client, Knife Bootstrap will soon require a license key.
1216
+ +---------------------------------------------------------------------------------------------------------------------+
1217
+ To ensure uninterrupted downloads of Infra Client, Knife Bootstrap will soon require a license key.
1218
1218
 
1219
- Here's what you need to know:
1220
- * Adding a License: Use the < knife license > command to easily add a license key.
1221
- * For Commercial Customers: Obtain your license key from the customer portal.
1222
- * For Free/Trial Users: Non-commercial users can generate a license key from https://www.chef.io/license-generation-free-trial
1219
+ Here's what you need to know:
1220
+ * Adding a License: Use the < knife license > command to easily add a license key.
1221
+ * For Commercial Customers: Obtain your license key from the customer portal.
1222
+ * For Free/Trial Users: Non-commercial users can generate a license key from https://www.chef.io/license-generation-free-trial
1223
1223
 
1224
- No action is require at this time, but please prepare for this change.
1225
- +---------------------------------------------------------------------------------------------------------------------+
1224
+ No action is require at this time, but please prepare for this change.
1225
+ +---------------------------------------------------------------------------------------------------------------------+
1226
1226
  MSG
1227
1227
  )
1228
1228
  end
@@ -18,7 +18,7 @@
18
18
  #
19
19
 
20
20
  require_relative "../knife"
21
- require_relative "./config_show"
21
+ require_relative "config_show"
22
22
 
23
23
  class Chef
24
24
  class Knife
@@ -16,7 +16,7 @@
16
16
  #
17
17
 
18
18
  require_relative "../knife"
19
- require_relative "./config_use"
19
+ require_relative "config_use"
20
20
 
21
21
  class Chef
22
22
  class Knife
@@ -16,7 +16,7 @@
16
16
  #
17
17
 
18
18
  require_relative "../knife"
19
- require_relative "./config_list"
19
+ require_relative "config_list"
20
20
 
21
21
  class Chef
22
22
  class Knife
@@ -75,7 +75,7 @@ class Chef
75
75
  # It's a regex.
76
76
  filter_re = Regexp.new($1, $2 ? Regexp::IGNORECASE : 0)
77
77
  config_data.each do |key, value|
78
- output_data[key] = value if key.to_s&.match?(filter_re)
78
+ output_data[key] = value if key.to_s.match?(filter_re)
79
79
  end
80
80
  else
81
81
  # It's a dotted path string.
@@ -16,7 +16,7 @@
16
16
  #
17
17
 
18
18
  require_relative "../knife"
19
- require_relative "./config_use"
19
+ require_relative "config_use"
20
20
 
21
21
  class Chef
22
22
  class Knife
@@ -58,7 +58,7 @@ class Chef
58
58
  long: "--concurrency NUMBER_OF_THREADS",
59
59
  description: "How many concurrent threads will be used.",
60
60
  default: 10,
61
- proc: lambda { |o| o.to_i }
61
+ proc: lambda(&:to_i)
62
62
 
63
63
  option :environment,
64
64
  short: "-E",
@@ -218,11 +218,7 @@ class Chef
218
218
 
219
219
  how_much_current_part = @parts[@part_no].size - @part_offset
220
220
 
221
- how_much_current_part = if how_much_current_part > how_much
222
- how_much
223
- else
224
- how_much_current_part
225
- end
221
+ how_much_current_part = [how_much_current_part, how_much].min
226
222
 
227
223
  how_much_next_part = how_much - how_much_current_part
228
224
 
@@ -246,4 +242,3 @@ class Chef
246
242
  end
247
243
  end
248
244
  end
249
-
@@ -47,11 +47,11 @@ class Chef
47
47
 
48
48
  def find_subcommands_via_rubygems
49
49
  files = find_files_latest_gems "chef/knife/*.rb"
50
- version_file_match = /#{Regexp.escape(File.join('chef', 'knife', 'version'))}$/
50
+ version_file_match = /#{Regexp.escape(File.join("chef", "knife", "version"))}$/
51
51
  subcommand_files = {}
52
52
  files.each do |file|
53
53
 
54
- rel_path = file[/(.*)(#{Regexp.escape File.join('chef', 'knife', '')}.*)\.rb/, 2]
54
+ rel_path = file[/(.*)(#{Regexp.escape File.join("chef", "knife", "")}.*)\.rb/, 2]
55
55
 
56
56
  # When not installed as a gem (ChefDK/appbundler in particular), AND
57
57
  # a different version of Chef is installed via gems, `files` will
@@ -135,7 +135,7 @@ class Chef
135
135
  now = Time.now.to_i
136
136
  difference = now - unix_time.to_i
137
137
  hours = (difference / 3600).to_i
138
- difference = difference % 3600
138
+ difference %= 3600
139
139
  minutes = (difference / 60).to_i
140
140
  seconds = (difference % 60)
141
141
  [hours, minutes, seconds]
@@ -145,7 +145,7 @@ class Chef
145
145
  def find_subcommands_via_dirglob
146
146
  # The "require paths" of the core knife subcommands bundled with chef
147
147
  files = Dir[File.join(ChefConfig::PathHelper.escape_glob_dir(File.expand_path("../../knife", __dir__)), "*.rb")]
148
- version_file_match = /#{Regexp.escape(File.join('chef', 'knife', 'version.rb'))}/
148
+ version_file_match = /#{Regexp.escape(File.join("chef", "knife", "version.rb"))}/
149
149
  subcommand_files = {}
150
150
  files.each do |knife_file|
151
151
  rel_path = knife_file[/#{KNIFE_ROOT}#{Regexp.escape(File::SEPARATOR)}(.*)\.rb/, 1]
@@ -175,7 +175,7 @@ class Chef
175
175
 
176
176
  bootstrap_environment_option = bootstrap_environment.nil? ? "" : " -E #{bootstrap_environment}"
177
177
 
178
- start_chef = "SET \"PATH=%SYSTEM32%;%SystemRoot%;%SYSTEM32%\\Wbem;%SYSTEM32%\\WindowsPowerShell\\v1.0\\;C:\\ruby\\bin;#{c_opscode_dir}\\bin;#{c_opscode_dir}\\embedded\\bin\;%PATH%\"\n"
178
+ start_chef = "SET \"PATH=%SYSTEM32%;%SystemRoot%;%SYSTEM32%\\Wbem;%SYSTEM32%\\WindowsPowerShell\\v1.0\\;C:\\ruby\\bin;#{c_opscode_dir}\\bin;#{c_opscode_dir}\\embedded\\bin;%PATH%\"\n"
179
179
  start_chef << "#{ChefUtils::Dist::Infra::CLIENT} -c #{client_rb} -j #{first_boot}#{bootstrap_environment_option}\n"
180
180
  end
181
181
 
@@ -187,7 +187,7 @@ class Chef
187
187
  path = WScript.Arguments.Named("path")
188
188
  proxy = null
189
189
  '* Vaguely attempt to handle file:// scheme urls by url unescaping and switching all
190
- '* / into \. Also assume that file:/// is a local absolute path and that file://<foo>
190
+ '* / into . Also assume that file:/// is a local absolute path and that file://<foo>
191
191
  '* is possibly a network file path.
192
192
  If InStr(url, "file://") = 1 Then
193
193
  url = Unescape(url)
@@ -409,7 +409,7 @@ class Chef
409
409
  @move "%CHEF_CLIENT_MSI_LOG_PATH%" "!OLDLOGLOCATION!" > NUL
410
410
  @echo WARNING: Saving installation log of failure at !OLDLOGLOCATION!
411
411
  @echo WARNING: Retrying installation with local context...
412
- @schtasks /create /f /sc once /st 00:00:00 /tn chefclientbootstraptask /ru SYSTEM /rl HIGHEST /tr \"cmd /c #{command} & sleep 2 & waitfor /s %computername% /si chefclientinstalldone\"
412
+ @schtasks /create /f /sc once /st 00:00:00 /tn chefclientbootstraptask /ru SYSTEM /rl HIGHEST /tr "cmd /c #{command} & sleep 2 & waitfor /s %computername% /si chefclientinstalldone"
413
413
 
414
414
  @if ERRORLEVEL 1 (
415
415
  @echo ERROR: Failed to create #{ChefUtils::Dist::Infra::PRODUCT} installation scheduled task with status code !ERRORLEVEL! > "&2"
@@ -105,9 +105,8 @@ class Chef
105
105
  columns = environments.count + 1
106
106
  environments.each { |env| rows << ui.color(env, :bold) }
107
107
  cookbooks.each_key do |c|
108
- total = []
109
- environments.each { |n| total << constraints[n][c] }
110
- if total.uniq.count == 1
108
+ total = environments.map { |n| constraints[n][c] }
109
+ if total.uniq.one?
111
110
  next if config[:mismatch]
112
111
 
113
112
  color = :white
@@ -89,11 +89,7 @@ class Chef
89
89
  key.name(@config[:key_name])
90
90
  end
91
91
 
92
- if @config[:expiration_date]
93
- key.expiration_date(@config[:expiration_date])
94
- else
95
- key.expiration_date("infinity")
96
- end
92
+ key.expiration_date(@config[:expiration_date] || "infinity")
97
93
 
98
94
  output = edit_hash(key)
99
95
  key = create_key_from_hash(output)
@@ -89,11 +89,7 @@ class Chef
89
89
  key.public_key(File.read(File.expand_path(@config[:public_key])))
90
90
  end
91
91
 
92
- if @config[:key_name]
93
- key.name(@config[:key_name])
94
- else
95
- key.name(@original_name)
96
- end
92
+ key.name(@config[:key_name] || @original_name)
97
93
 
98
94
  if @config[:expiration_date]
99
95
  key.expiration_date(@config[:expiration_date])
@@ -42,14 +42,14 @@ class Chef
42
42
  long: "--start ROW",
43
43
  description: "The row to start returning results at.",
44
44
  default: 0,
45
- proc: lambda { |i| i.to_i }
45
+ proc: lambda(&:to_i)
46
46
 
47
47
  option :rows,
48
48
  short: "-R INT",
49
49
  long: "--rows INT",
50
50
  description: "The number of rows to return.",
51
51
  default: nil,
52
- proc: lambda { |i| i.to_i }
52
+ proc: lambda(&:to_i)
53
53
 
54
54
  option :run_list,
55
55
  short: "-r",
@@ -43,7 +43,7 @@ class Chef
43
43
  long: "--concurrency NUM",
44
44
  description: "The number of concurrent connections.",
45
45
  default: nil,
46
- proc: lambda { |o| o.to_i }
46
+ proc: lambda(&:to_i)
47
47
 
48
48
  option :ssh_attribute,
49
49
  short: "-a ATTR",
@@ -79,7 +79,7 @@ class Chef
79
79
  short: "-p PORT",
80
80
  long: "--ssh-port PORT",
81
81
  description: "The ssh port.",
82
- proc: Proc.new { |key| key.strip }
82
+ proc: Proc.new(&:strip)
83
83
 
84
84
  option :ssh_timeout,
85
85
  short: "-t SECONDS",
@@ -92,7 +92,7 @@ class Chef
92
92
  short: "-G GATEWAY",
93
93
  long: "--ssh-gateway GATEWAY",
94
94
  description: "The ssh gateway.",
95
- proc: Proc.new { |key| key.strip }
95
+ proc: Proc.new(&:strip)
96
96
 
97
97
  option :ssh_gateway_identity,
98
98
  long: "--ssh-gateway-identity SSH_GATEWAY_IDENTITY",
@@ -35,9 +35,9 @@ class Chef
35
35
  description: "Show corresponding URIs."
36
36
 
37
37
  option :all_users,
38
- short: "-a",
39
- long: "--all-users",
40
- description: "Show all user details."
38
+ short: "-a",
39
+ long: "--all-users",
40
+ description: "Show all user details."
41
41
  def run
42
42
  users = Chef::UserV1.list(config[:all_users])
43
43
  if config[:all_users]
@@ -17,8 +17,6 @@
17
17
  class Chef
18
18
  class Knife
19
19
  KNIFE_ROOT = File.expand_path("../..", __dir__)
20
- VERSION = "18.8.68".freeze
20
+ VERSION = "18.10.18".freeze
21
21
  end
22
22
  end
23
-
24
-
@@ -6,4 +6,3 @@ ChefLicensing.configure do |config|
6
6
  config.chef_executable_name = "knife"
7
7
  config.license_server_url = "https://services.chef.io/licensing"
8
8
  end
9
-
@@ -23,8 +23,8 @@ class Chef
23
23
  LEGACY_OMNITRUCK_URL = "https://omnitruck.chef.io".freeze
24
24
 
25
25
  OMNITRUCK_URLS = {
26
- "free" => "https://chefdownload-trial.chef.io",
27
- "trial" => "https://chefdownload-trial.chef.io",
26
+ "free" => "https://chefdownload-trial.chef.io",
27
+ "trial" => "https://chefdownload-trial.chef.io",
28
28
  "commercial" => "https://chefdownload-commerical.chef.io",
29
29
  }.freeze
30
30
 
@@ -75,7 +75,7 @@ describe Chef::Knife::CookbookDelete do
75
75
 
76
76
  knife.run
77
77
 
78
- expect(stdout.string).to match(/#{Regexp.escape('Do you really want to delete obsolete-cookbook version 1.0.0? (Y/N)')}/)
78
+ expect(stdout.string).to match(/#{Regexp.escape("Do you really want to delete obsolete-cookbook version 1.0.0? (Y/N)")}/)
79
79
  expect(cb100_deleted).to be_truthy
80
80
  end
81
81
 
@@ -91,8 +91,8 @@ describe Chef::Knife::CookbookDelete do
91
91
 
92
92
  knife.run
93
93
 
94
- expect(stdout.string).to match(/#{Regexp.escape('Are you sure you want to purge files')}/)
95
- expect(stdout.string).to match(/#{Regexp.escape('Do you really want to delete obsolete-cookbook version 1.0.0? (Y/N)')}/)
94
+ expect(stdout.string).to match(/#{Regexp.escape("Are you sure you want to purge files")}/)
95
+ expect(stdout.string).to match(/#{Regexp.escape("Do you really want to delete obsolete-cookbook version 1.0.0? (Y/N)")}/)
96
96
  expect(cb100_deleted).to be_truthy
97
97
 
98
98
  end
@@ -23,4 +23,3 @@ describe "Knife Version", :executables do
23
23
  expect(shell_out!("bundle exec knife -v", cwd: knife_dir).stdout.chomp).to match(/.*: #{Chef::Knife::VERSION}/)
24
24
  end
25
25
  end
26
-
@@ -159,10 +159,10 @@ describe "knife config use", :workstation do
159
159
  before do
160
160
  ENV["CHEF_HOME"] = path_to("chefhome"); file("chefhome/tmp", "")
161
161
  file("chefhome/.chef/credentials", <<~EOH
162
- [staging]
163
- client_name = "testuser"
164
- client_key = "testkey.pem"
165
- chef_server_url = "https://example.com/organizations/testorg"
162
+ [staging]
163
+ client_name = "testuser"
164
+ client_key = "testkey.pem"
165
+ chef_server_url = "https://example.com/organizations/testorg"
166
166
  EOH
167
167
  )
168
168
  end
@@ -180,10 +180,10 @@ describe "knife config use", :workstation do
180
180
  before do
181
181
  ENV["KNIFE_HOME"] = path_to("knifehome"); file("knifehome/tmp", "")
182
182
  file("knifehome/.chef/credentials", <<~EOH
183
- [development]
184
- client_name = "testuser"
185
- client_key = "testkey.pem"
186
- chef_server_url = "https://example.com/organizations/testorg"
183
+ [development]
184
+ client_name = "testuser"
185
+ client_key = "testkey.pem"
186
+ chef_server_url = "https://example.com/organizations/testorg"
187
187
  EOH
188
188
  )
189
189
  end
@@ -40,7 +40,7 @@ describe "knife node environment set", :workstation do
40
40
 
41
41
  it "with no environment" do
42
42
  knife("node environment set adam").should_fail stderr: "FATAL: You must specify a node name and an environment.\n",
43
- stdout: /^USAGE: knife node environment set NODE ENVIRONMENT\n/
43
+ stdout: /^USAGE: knife node environment set NODE ENVIRONMENT\n/
44
44
  end
45
45
  end
46
46
  end
@@ -35,7 +35,7 @@ describe "knife node run list set", :workstation do
35
35
 
36
36
  it "with no role or recipe" do
37
37
  knife("node run list set cons").should_fail stderr: "FATAL: You must supply both a node name and a run list.\n",
38
- stdout: /^USAGE: knife node run_list set NODE ENTRIES \(options\)/m
38
+ stdout: /^USAGE: knife node run_list set NODE ENTRIES \(options\)/m
39
39
  end
40
40
  end
41
41
  end
@@ -586,7 +586,7 @@ describe Chef::Knife::Bootstrap do
586
586
  end
587
587
 
588
588
  it "creates /etc/chef/client.d" do
589
- expect(rendered_template).to match("mkdir -p /etc/chef/client\.d")
589
+ expect(rendered_template).to match("mkdir -p /etc/chef/client.d")
590
590
  end
591
591
 
592
592
  context "a flat directory structure" do
@@ -797,7 +797,7 @@ describe Chef::Knife::Bootstrap do
797
797
  context "validating use_sudo_password option" do
798
798
  it "use_sudo_password contains description and long params for help" do
799
799
  expect(knife.options).to(have_key(:use_sudo_password)) \
800
- && expect(knife.options[:use_sudo_password][:description].to_s).not_to(eq(""))\
800
+ && expect(knife.options[:use_sudo_password][:description].to_s).not_to(eq("")) \
801
801
  && expect(knife.options[:use_sudo_password][:long].to_s).not_to(eq(""))
802
802
  end
803
803
  end
@@ -59,7 +59,7 @@ describe Chef::Knife::CookbookList do
59
59
  allow(@rest_mock).to receive(:get).and_return(@cookbook_data)
60
60
  @knife.run
61
61
  @cookbook_names.each do |item|
62
- pattern = /#{Regexp.escape(@cookbook_data[item]['versions'].first['url'])}/
62
+ pattern = /#{Regexp.escape(@cookbook_data[item]["versions"].first["url"])}/
63
63
  expect(@stdout.string).to match pattern
64
64
  end
65
65
  end
@@ -92,4 +92,4 @@ describe Chef::Knife::License do
92
92
  end
93
93
  end
94
94
  end
95
- end
95
+ end
@@ -145,4 +145,4 @@ describe Chef::Knife::Search do
145
145
  end
146
146
  end
147
147
  end
148
- end
148
+ end
@@ -28,8 +28,8 @@ describe Chef::Knife::SupermarketInstall do
28
28
  let(:archive) { double(Mixlib::Archive, extract: true) }
29
29
  let(:repo) do
30
30
  double(sanity_check: true, reset_to_default_state: true,
31
- prepare_to_import: true, finalize_updates_to: true,
32
- merge_updates_from: true)
31
+ prepare_to_import: true, finalize_updates_to: true,
32
+ merge_updates_from: true)
33
33
  end
34
34
  let(:install_path) do
35
35
  if ChefUtils.windows?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.8.68
4
+ version: 18.10.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-10 00:00:00.000000000 Z
11
+ date: 2026-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -72,28 +72,34 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.10'
75
+ version: '3.13'
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 3.13.4
76
79
  type: :runtime
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
83
  - - "~>"
81
84
  - !ruby/object:Gem::Version
82
- version: '3.10'
85
+ version: '3.13'
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 3.13.4
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: train-winrm
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
93
  - - "~>"
88
94
  - !ruby/object:Gem::Version
89
- version: 0.2.17
95
+ version: 0.4.0
90
96
  type: :runtime
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
100
  - - "~>"
95
101
  - !ruby/object:Gem::Version
96
- version: 0.2.17
102
+ version: 0.4.0
97
103
  - !ruby/object:Gem::Dependency
98
104
  name: license-acceptance
99
105
  requirement: !ruby/object:Gem::Requirement
@@ -355,19 +361,19 @@ dependencies:
355
361
  - !ruby/object:Gem::Version
356
362
  version: '0'
357
363
  - !ruby/object:Gem::Dependency
358
- name: chefstyle
364
+ name: cookstyle
359
365
  requirement: !ruby/object:Gem::Requirement
360
366
  requirements:
361
- - - ">="
367
+ - - "~>"
362
368
  - !ruby/object:Gem::Version
363
- version: '0'
369
+ version: '8.6'
364
370
  type: :development
365
371
  prerelease: false
366
372
  version_requirements: !ruby/object:Gem::Requirement
367
373
  requirements:
368
- - - ">="
374
+ - - "~>"
369
375
  - !ruby/object:Gem::Version
370
- version: '0'
376
+ version: '8.6'
371
377
  - !ruby/object:Gem::Dependency
372
378
  name: proxifier2
373
379
  requirement: !ruby/object:Gem::Requirement
@@ -1177,7 +1183,7 @@ metadata:
1177
1183
  homepage_uri: https://www.chef.io
1178
1184
  mailing_list_uri: https://discourse.chef.io/
1179
1185
  source_code_uri: https://github.com/chef/chef/
1180
- post_install_message:
1186
+ post_install_message:
1181
1187
  rdoc_options: []
1182
1188
  require_paths:
1183
1189
  - lib
@@ -1193,7 +1199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1193
1199
  version: '0'
1194
1200
  requirements: []
1195
1201
  rubygems_version: 3.3.27
1196
- signing_key:
1202
+ signing_key:
1197
1203
  specification_version: 4
1198
1204
  summary: The knife CLI for Chef Infra.
1199
1205
  test_files: []