knife 17.2.18 → 17.2.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/knife.gemspec +1 -0
- data/lib/chef/knife/version.rb +1 -1
- data/spec/integration/commands_spec.rb +55 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c59d8d9f4d2b9c07749f19f302a444f81c8e4f18c1a9d975664339f491ab6a10
|
4
|
+
data.tar.gz: b66856e635b5af7e45ba80af0d2f9f6e13736ba8000dd82d1953864f20be9640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5825020630a1925537d2bf81c504f46e2370f4c6895668ff4b482fe8d16f6b0970bf8b4e93cd560f11d2a14ff68ddd5c125fcd232a8d7e312f5de05327722105
|
7
|
+
data.tar.gz: 4655fd4e97b9bfcf06609063a6f58cbe2fac3c8f1f73d61c7890e74dfe15480f4fd9f01a9543776f8019087f55afa52433347283239001bc20ef18a4da7d331a
|
data/knife.gemspec
CHANGED
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
s.add_dependency "net-ssh-multi", "~> 1.2", ">= 1.2.1"
|
31
31
|
s.add_dependency "ed25519", "~> 1.2" # ed25519 ssh key support
|
32
32
|
s.add_dependency "bcrypt_pbkdf", "~> 1.1" # ed25519 ssh key support
|
33
|
+
s.add_dependency "x25519" # ed25519 KEX module
|
33
34
|
s.add_dependency "highline", ">= 1.6.9", "< 3" # Used in UI to present a list, no other usage.
|
34
35
|
|
35
36
|
s.add_dependency "tty-prompt", "~> 0.21" # knife ui.ask prompt
|
data/lib/chef/knife/version.rb
CHANGED
@@ -0,0 +1,55 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Marc Pardise (<marc@chef.io>)
|
3
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
4
|
+
# License:: Apache License, Version 2.0
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
|
18
|
+
require "chef/knife"
|
19
|
+
|
20
|
+
Chef::Knife.subcommand_loader.load_commands
|
21
|
+
commands = Chef::Knife::SubcommandLoader.generate_hash["_autogenerated_command_paths"]["plugins_paths"].keys
|
22
|
+
|
23
|
+
# Directly execute each support knife command
|
24
|
+
context "Command Sanity Check: executing ", :workstation do
|
25
|
+
describe "bundle exec knife" do
|
26
|
+
commands.each do |command|
|
27
|
+
command_name = command.gsub("_", " ")
|
28
|
+
modified_command, expected_result = case command_name
|
29
|
+
when /knife/
|
30
|
+
# because rspec is the actual executable running, the option parser error message
|
31
|
+
# is invalid from within the test.
|
32
|
+
next
|
33
|
+
when /config (use|get|list) profile.*/
|
34
|
+
# hyphenated special cases
|
35
|
+
[command_name, /^USAGE: knife config #{$1}-profile.*/]
|
36
|
+
when /(role|node|env) (env )?run list(.*)/
|
37
|
+
# underscored special cases...
|
38
|
+
env_part = $2.nil? ? "" : "env_"
|
39
|
+
["#{$1} #{$2}run_list#{$3}", /^USAGE: knife #{$1} #{env_part}run_list#{$3}.*/]
|
40
|
+
else
|
41
|
+
[ command_name, /^USAGE: knife #{command_name}.*/]
|
42
|
+
end
|
43
|
+
|
44
|
+
# By using bundle exec knife instead of directly loading the command class or using the knife() helper,
|
45
|
+
# we ensure that this is a valid end-to-end test. This operates on the assumption
|
46
|
+
# that we continue to require the command class to be fully loaded so that it can handle the parsing of
|
47
|
+
# its own options.
|
48
|
+
full_command = "#{modified_command} --invalid-option outputs usage for '#{modified_command}' to stdout"
|
49
|
+
it full_command do
|
50
|
+
result = `bundle exec knife #{full_command}`
|
51
|
+
expect(result).to match(expected_result)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
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: 17.2.
|
4
|
+
version: 17.2.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -256,6 +256,20 @@ dependencies:
|
|
256
256
|
- - "~>"
|
257
257
|
- !ruby/object:Gem::Version
|
258
258
|
version: '1.1'
|
259
|
+
- !ruby/object:Gem::Dependency
|
260
|
+
name: x25519
|
261
|
+
requirement: !ruby/object:Gem::Requirement
|
262
|
+
requirements:
|
263
|
+
- - ">="
|
264
|
+
- !ruby/object:Gem::Version
|
265
|
+
version: '0'
|
266
|
+
type: :runtime
|
267
|
+
prerelease: false
|
268
|
+
version_requirements: !ruby/object:Gem::Requirement
|
269
|
+
requirements:
|
270
|
+
- - ">="
|
271
|
+
- !ruby/object:Gem::Version
|
272
|
+
version: '0'
|
259
273
|
- !ruby/object:Gem::Dependency
|
260
274
|
name: highline
|
261
275
|
requirement: !ruby/object:Gem::Requirement
|
@@ -950,6 +964,7 @@ files:
|
|
950
964
|
- spec/integration/client_key_show_spec.rb
|
951
965
|
- spec/integration/client_list_spec.rb
|
952
966
|
- spec/integration/client_show_spec.rb
|
967
|
+
- spec/integration/commands_spec.rb
|
953
968
|
- spec/integration/common_options_spec.rb
|
954
969
|
- spec/integration/config_list_spec.rb
|
955
970
|
- spec/integration/config_show_spec.rb
|