knife 18.4.2 → 18.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/lib/chef/chef_fs/knife.rb +1 -1
- data/lib/chef/knife/core/subcommand_loader.rb +1 -1
- data/lib/chef/knife/version.rb +1 -1
- data/lib/chef/knife.rb +14 -10
- data/spec/unit/knife/core/hashed_command_loader_spec.rb +1 -1
- data/spec/unit/knife_spec.rb +3 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7dbcf835eedd6dece43282604cd9c7136ba0adf6375c856582860700d65031e
|
4
|
+
data.tar.gz: bc342db29c4bb913525ff031519efaa585a0067e1ae65bb2786403edef3934f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11a5c1d4e9449e7e566ba18ca38efda979c2341ecba1e07b607a90c7c18acc57af69115039757a3cdb48059c08468d38c75c65f5a28953863c5d8228337d3378
|
7
|
+
data.tar.gz: baa24762c6c61cc695ccd0f8fcba24284aab84502dbd2c74f26d436912d66ce7e2119edc401d5071c1577ce77d2b5c08da2eaa145738a4871f18a139d79da609
|
data/Gemfile
CHANGED
@@ -4,7 +4,8 @@ gem "knife", path: "."
|
|
4
4
|
|
5
5
|
group(:development, :test) do
|
6
6
|
gem "cheffish", ">= 14" # testing only , but why didn't this need to explicit in chef?
|
7
|
-
gem "webmock"
|
7
|
+
gem "webmock"
|
8
|
+
gem "crack", "< 0.4.6" # due to https://github.com/jnunemaker/crack/pull/75
|
8
9
|
gem "rake"
|
9
10
|
gem "rspec"
|
10
11
|
gem "chef-bin", path: "../chef-bin"
|
data/lib/chef/chef_fs/knife.rb
CHANGED
@@ -112,7 +112,7 @@ class Chef
|
|
112
112
|
end
|
113
113
|
# Use the original path because we can't be sure.
|
114
114
|
inferred_path = arg
|
115
|
-
elsif arg
|
115
|
+
elsif arg.start_with?("~")
|
116
116
|
# Let's be nice and fix it if possible - but warn the user.
|
117
117
|
ui.warn("A path relative to a user home directory has been provided: #{arg}")
|
118
118
|
ui.warn("Paths provided need to be rooted at the chef-repo being considered or be relative paths.")
|
@@ -160,7 +160,7 @@ class Chef
|
|
160
160
|
|
161
161
|
#
|
162
162
|
# Utility function for finding an element in a hash given an array
|
163
|
-
# of words and a separator. We find the
|
163
|
+
# of words and a separator. We find the longest key in the
|
164
164
|
# hash composed of the given words joined by the separator.
|
165
165
|
#
|
166
166
|
def find_longest_key(hash, words, sep = "_")
|
data/lib/chef/knife/version.rb
CHANGED
data/lib/chef/knife.rb
CHANGED
@@ -414,16 +414,20 @@ class Chef
|
|
414
414
|
def apply_computed_config
|
415
415
|
Chef::Config[:color] = config[:color]
|
416
416
|
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
417
|
+
# If the verbosity is not set, use what is already present on the log_level config.
|
418
|
+
Chef::Config[:log_level] = case Chef::Config[:verbosity]
|
419
|
+
when 0
|
420
|
+
:warn
|
421
|
+
when 1
|
422
|
+
:info
|
423
|
+
when 2
|
424
|
+
:debug
|
425
|
+
when nil
|
426
|
+
# The default log_level is auto and that is not a valid log_level.
|
427
|
+
Chef::Config[:log_level] == :auto ? :warn : Chef::Config[:log_level]
|
428
|
+
else
|
429
|
+
:trace
|
430
|
+
end
|
427
431
|
|
428
432
|
Chef::Config[:log_level] = :trace if ENV["KNIFE_DEBUG"]
|
429
433
|
|
@@ -105,7 +105,7 @@ describe Chef::Knife::SubcommandLoader::HashedCommandLoader do
|
|
105
105
|
expect(loader.subcommand_for_args(%w{cooler b})).to eq("cooler_b")
|
106
106
|
end
|
107
107
|
|
108
|
-
it "returns nil if the
|
108
|
+
it "returns nil if the subcommand isn't in our manifest" do
|
109
109
|
expect(loader.subcommand_for_args(["cooler c"])).to eq(nil)
|
110
110
|
end
|
111
111
|
end
|
data/spec/unit/knife_spec.rb
CHANGED
@@ -320,6 +320,9 @@ describe Chef::Knife do
|
|
320
320
|
end
|
321
321
|
|
322
322
|
it "sets the default log_level to warn so we can issue Chef::Log.warn" do
|
323
|
+
# Reset the log level to the default value
|
324
|
+
Chef::Config[:log_level] = :auto
|
325
|
+
|
323
326
|
knife_command = KnifeSpecs::TestYourself.new([])
|
324
327
|
knife_command.configure_chef
|
325
328
|
expect(Chef::Config[:log_level]).to eql(:warn)
|
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.
|
4
|
+
version: 18.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -1145,7 +1145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1145
1145
|
- !ruby/object:Gem::Version
|
1146
1146
|
version: '0'
|
1147
1147
|
requirements: []
|
1148
|
-
rubygems_version: 3.
|
1148
|
+
rubygems_version: 3.3.26
|
1149
1149
|
signing_key:
|
1150
1150
|
specification_version: 4
|
1151
1151
|
summary: The knife CLI for Chef Infra.
|