summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2016-03-23 16:32:22 -0700
committerTim Smith <tsmith@chef.io>2016-03-23 16:32:22 -0700
commit331eaae1f549b34f2e0f106a1516384821806d9a (patch)
treea9fb760caea0cde950ea00d35f01415eff0bec82
parenta421cf39a76a80da8154c93f26d3c665afa8f768 (diff)
parentbe22d615639c8667f4b29c8f352812fff348620f (diff)
downloadchef-331eaae1f549b34f2e0f106a1516384821806d9a.tar.gz
Merge pull request #4670 from tas50/knife_wording-3
Improve wording in Knife
-rw-r--r--lib/chef/knife/bootstrap.rb2
-rw-r--r--lib/chef/knife/bootstrap/chef_vault_handler.rb2
-rw-r--r--lib/chef/knife/client_bulk_delete.rb2
-rw-r--r--lib/chef/knife/client_create.rb4
-rw-r--r--lib/chef/knife/configure.rb4
-rw-r--r--lib/chef/knife/cookbook_site_share.rb2
-rw-r--r--lib/chef/knife/core/hashed_command_loader.rb2
-rw-r--r--lib/chef/knife/core/subcommand_loader.rb2
-rw-r--r--lib/chef/knife/data_bag_edit.rb4
-rw-r--r--lib/chef/knife/data_bag_secret_options.rb4
-rw-r--r--lib/chef/knife/data_bag_show.rb2
-rw-r--r--lib/chef/knife/delete.rb2
-rw-r--r--lib/chef/knife/deps.rb4
-rw-r--r--lib/chef/knife/download.rb2
-rw-r--r--lib/chef/knife/edit.rb4
-rw-r--r--lib/chef/knife/index_rebuild.rb4
-rw-r--r--lib/chef/knife/key_delete.rb2
-rw-r--r--lib/chef/knife/node_from_file.rb2
-rw-r--r--lib/chef/knife/osc_user_create.rb2
-rw-r--r--lib/chef/knife/osc_user_edit.rb2
-rw-r--r--lib/chef/knife/raw.rb8
-rw-r--r--lib/chef/knife/role_from_file.rb2
-rw-r--r--lib/chef/knife/search.rb2
-rw-r--r--lib/chef/knife/serve.rb2
-rw-r--r--lib/chef/knife/ssh.rb2
-rw-r--r--lib/chef/knife/upload.rb4
-rw-r--r--lib/chef/knife/user_create.rb2
-rw-r--r--lib/chef/knife/xargs.rb8
-rw-r--r--spec/integration/knife/delete_spec.rb4
-rw-r--r--spec/integration/knife/download_spec.rb8
-rw-r--r--spec/integration/knife/upload_spec.rb8
-rw-r--r--spec/unit/knife/client_bulk_delete_spec.rb4
-rw-r--r--spec/unit/knife/data_bag_show_spec.rb2
33 files changed, 55 insertions, 55 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index 52fa177159..f5dc29371f 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -189,7 +189,7 @@ class Chef
option :hint,
:long => "--hint HINT_NAME[=HINT_FILE]",
- :description => "Specify Ohai Hint to be set on the bootstrap target. Use multiple --hint options to specify multiple hints.",
+ :description => "Specify Ohai Hint to be set on the bootstrap target. Use multiple --hint options to specify multiple hints.",
:proc => Proc.new { |h|
Chef::Config[:knife][:hints] ||= Hash.new
name, path = h.split("=")
diff --git a/lib/chef/knife/bootstrap/chef_vault_handler.rb b/lib/chef/knife/bootstrap/chef_vault_handler.rb
index 86eed6a8a6..9990565856 100644
--- a/lib/chef/knife/bootstrap/chef_vault_handler.rb
+++ b/lib/chef/knife/bootstrap/chef_vault_handler.rb
@@ -142,7 +142,7 @@ class Chef
def require_chef_vault!
@require_chef_vault ||=
begin
- error_message = "Knife bootstrap needs version 2.6.0 or higher of the chef-vault gem to configure chef vault items"
+ error_message = "Knife bootstrap requires version 2.6.0 or higher of the chef-vault gem to configure chef vault items"
require "chef-vault"
if Gem::Version.new(ChefVault::VERSION) < Gem::Version.new("2.6.0")
raise error_message
diff --git a/lib/chef/knife/client_bulk_delete.rb b/lib/chef/knife/client_bulk_delete.rb
index af3e862a18..a7fa7142c8 100644
--- a/lib/chef/knife/client_bulk_delete.rb
+++ b/lib/chef/knife/client_bulk_delete.rb
@@ -65,7 +65,7 @@ class Chef
def check_and_delete_validators(validators)
unless validators.empty?
unless config[:delete_validators]
- ui.msg("Following clients are validators and will not be deleted.")
+ ui.msg("The following clients are validators and will not be deleted:")
print_clients(validators)
ui.msg("You must specify --delete-validators to delete the validator clients")
else
diff --git a/lib/chef/knife/client_create.rb b/lib/chef/knife/client_create.rb
index e296e416ce..e28378cd4a 100644
--- a/lib/chef/knife/client_create.rb
+++ b/lib/chef/knife/client_create.rb
@@ -35,7 +35,7 @@ class Chef
option :admin,
:short => "-a",
:long => "--admin",
- :description => "Open Source Chef 11 only. Create the client as an admin.",
+ :description => "Open Source Chef Server 11 only. Create the client as an admin.",
:boolean => true
option :validator,
@@ -51,7 +51,7 @@ class Chef
option :prevent_keygen,
:short => "-k",
:long => "--prevent-keygen",
- :description => "API V1 only. Prevent server from generating a default key pair for you. Cannot be passed with --public-key.",
+ :description => "API V1 (Chef Server 12.1+) only. Prevent server from generating a default key pair for you. Cannot be passed with --public-key.",
:boolean => true
banner "knife client create CLIENTNAME (options)"
diff --git a/lib/chef/knife/configure.rb b/lib/chef/knife/configure.rb
index df41aa7265..e726e32684 100644
--- a/lib/chef/knife/configure.rb
+++ b/lib/chef/knife/configure.rb
@@ -108,13 +108,13 @@ EOH
ui.msg("")
ui.msg("You must place your client key in:")
ui.msg(" #{new_client_key}")
- ui.msg("Before running commands with Knife!")
+ ui.msg("Before running commands with Knife")
ui.msg("")
ui.msg("*****")
ui.msg("")
ui.msg("You must place your validation key in:")
ui.msg(" #{validation_key}")
- ui.msg("Before generating instance data with Knife!")
+ ui.msg("Before generating instance data with Knife")
ui.msg("")
ui.msg("*****")
end
diff --git a/lib/chef/knife/cookbook_site_share.rb b/lib/chef/knife/cookbook_site_share.rb
index fc5517cebc..6f37568f5f 100644
--- a/lib/chef/knife/cookbook_site_share.rb
+++ b/lib/chef/knife/cookbook_site_share.rb
@@ -90,7 +90,7 @@ class Chef
begin
do_upload("#{tmp_cookbook_dir}/#{cookbook_name}.tgz", category, Chef::Config[:node_name], Chef::Config[:client_key])
- ui.info("Upload complete!")
+ ui.info("Upload complete")
Chef::Log.debug("Removing local staging directory at #{tmp_cookbook_dir}")
FileUtils.rm_rf tmp_cookbook_dir
rescue => e
diff --git a/lib/chef/knife/core/hashed_command_loader.rb b/lib/chef/knife/core/hashed_command_loader.rb
index 1165af6eb2..8423c01812 100644
--- a/lib/chef/knife/core/hashed_command_loader.rb
+++ b/lib/chef/knife/core/hashed_command_loader.rb
@@ -60,7 +60,7 @@ class Chef
if errors.empty?
commands
else
- Chef::Log.error "There are files specified in the manifest that are missing. Please rehash to update the subcommands cache. If you see this error after rehashing delete the cache at #{Chef::Knife::SubcommandLoader.plugin_manifest_path}"
+ Chef::Log.error "There are files specified in the manifest that are missing. Please rehash to update the subcommands cache. If you see this error after rehashing delete the cache at #{Chef::Knife::SubcommandLoader.plugin_manifest_path}"
Chef::Log.error "Missing files:\n\t#{errors.values.flatten.join("\n\t")}"
{}
end
diff --git a/lib/chef/knife/core/subcommand_loader.rb b/lib/chef/knife/core/subcommand_loader.rb
index 0dcb54fc0d..e617b39ded 100644
--- a/lib/chef/knife/core/subcommand_loader.rb
+++ b/lib/chef/knife/core/subcommand_loader.rb
@@ -51,7 +51,7 @@ class Chef
Chef::Log.debug("Using autogenerated hashed command manifest #{plugin_manifest_path}")
Knife::SubcommandLoader::HashedCommandLoader.new(chef_config_dir, plugin_manifest)
elsif custom_manifest?
- Chef.log_deprecation("Using custom manifest #{plugin_manifest_path} is deprecated. Please use a `knife rehash` autogenerated manifest instead.")
+ Chef.log_deprecation("Using custom manifest #{plugin_manifest_path} is deprecated. Please use a `knife rehash` autogenerated manifest instead.")
Knife::SubcommandLoader::CustomManifestLoader.new(chef_config_dir, plugin_manifest)
else
Knife::SubcommandLoader::GemGlobLoader.new(chef_config_dir)
diff --git a/lib/chef/knife/data_bag_edit.rb b/lib/chef/knife/data_bag_edit.rb
index e059df5828..5d76762058 100644
--- a/lib/chef/knife/data_bag_edit.rb
+++ b/lib/chef/knife/data_bag_edit.rb
@@ -49,7 +49,7 @@ class Chef
def run
if @name_args.length != 2
- stdout.puts "You must supply the data bag and an item to edit!"
+ stdout.puts "You must supply the data bag and an item to edit"
stdout.puts opt_parser
exit 1
end
@@ -61,7 +61,7 @@ class Chef
ui.info("Encrypting data bag using provided secret.")
item_to_save = Chef::EncryptedDataBagItem.encrypt_data_bag_item(edited_item, read_secret)
else
- ui.info("Saving data bag unencrypted. To encrypt it, provide an appropriate secret.")
+ ui.info("Saving data bag unencrypted. To encrypt it, provide an appropriate secret.")
item_to_save = edited_item
end
diff --git a/lib/chef/knife/data_bag_secret_options.rb b/lib/chef/knife/data_bag_secret_options.rb
index 7e458007f0..b426cd442c 100644
--- a/lib/chef/knife/data_bag_secret_options.rb
+++ b/lib/chef/knife/data_bag_secret_options.rb
@@ -37,14 +37,14 @@ class Chef
base.option :secret,
:short => "-s SECRET",
:long => "--secret ",
- :description => "The secret key to use to encrypt data bag item values. Can also be defaulted in your config with the key 'secret'",
+ :description => "The secret key to use to encrypt data bag item values. Can also be defaulted in your config with the key 'secret'",
# Need to store value from command line in separate variable - knife#merge_configs populates same keys
# on config object from
:proc => Proc.new { |s| set_cl_secret(s) }
base.option :secret_file,
:long => "--secret-file SECRET_FILE",
- :description => "A file containing the secret key to use to encrypt data bag item values. Can also be defaulted in your config with the key 'secret_file'",
+ :description => "A file containing the secret key to use to encrypt data bag item values. Can also be defaulted in your config with the key 'secret_file'",
:proc => Proc.new { |sf| set_cl_secret_file(sf) }
base.option :encrypt,
diff --git a/lib/chef/knife/data_bag_show.rb b/lib/chef/knife/data_bag_show.rb
index 82978db5cf..ea9c390f19 100644
--- a/lib/chef/knife/data_bag_show.rb
+++ b/lib/chef/knife/data_bag_show.rb
@@ -48,7 +48,7 @@ class Chef
secret)
format_for_display(raw.to_hash)
elsif encrypted && !secret
- ui.warn("Encrypted data bag detected, but no secret provided for decoding. Displaying encrypted data.")
+ ui.warn("Encrypted data bag detected, but no secret provided for decoding. Displaying encrypted data.")
format_for_display(raw_data)
else
ui.warn("Unencrypted data bag detected, ignoring any provided secret options.")
diff --git a/lib/chef/knife/delete.rb b/lib/chef/knife/delete.rb
index d5d4a4c4bd..cf6ca09878 100644
--- a/lib/chef/knife/delete.rb
+++ b/lib/chef/knife/delete.rb
@@ -31,7 +31,7 @@ class Chef
def run
if name_args.length == 0
show_usage
- ui.fatal("Must specify at least one argument. If you want to delete everything in this directory, type \"knife delete --recurse .\"")
+ ui.fatal("You must specify at least one argument. If you want to delete everything in this directory, run \"knife delete --recurse .\"")
exit 1
end
diff --git a/lib/chef/knife/deps.rb b/lib/chef/knife/deps.rb
index 99a24e405b..e773f65106 100644
--- a/lib/chef/knife/deps.rb
+++ b/lib/chef/knife/deps.rb
@@ -15,11 +15,11 @@ class Chef
option :recurse,
:long => "--[no-]recurse",
:boolean => true,
- :description => "List dependencies recursively (default: true). Only works with --tree."
+ :description => "List dependencies recursively (default: true). Only works with --tree."
option :tree,
:long => "--tree",
:boolean => true,
- :description => "Show dependencies in a visual tree. May show duplicates."
+ :description => "Show dependencies in a visual tree. May show duplicates."
option :remote,
:long => "--remote",
:boolean => true,
diff --git a/lib/chef/knife/download.rb b/lib/chef/knife/download.rb
index c609760509..ac8420d468 100644
--- a/lib/chef/knife/download.rb
+++ b/lib/chef/knife/download.rb
@@ -49,7 +49,7 @@ class Chef
def run
if name_args.length == 0
show_usage
- ui.fatal("Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"")
+ ui.fatal("You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"")
exit 1
end
diff --git a/lib/chef/knife/edit.rb b/lib/chef/knife/edit.rb
index cd2c1c741b..8489e4e179 100644
--- a/lib/chef/knife/edit.rb
+++ b/lib/chef/knife/edit.rb
@@ -32,7 +32,7 @@ class Chef
result.write(new_value)
output "Updated #{format_path(result)}"
else
- output "#{format_path(result)} unchanged!"
+ output "#{format_path(result)} unchanged"
end
rescue Chef::ChefFS::FileSystem::OperationNotAllowedError => e
ui.error "#{format_path(e.entry)}: #{e.reason}."
@@ -58,7 +58,7 @@ class Chef
# Let the user edit the temporary file
if !system("#{config[:editor]} #{file.path}")
- raise "Please set EDITOR environment variable"
+ raise "Please set EDITOR environment variable. See https://docs.chef.io/knife_using.html for details."
end
result_text = IO.read(file.path)
diff --git a/lib/chef/knife/index_rebuild.rb b/lib/chef/knife/index_rebuild.rb
index eb85b8d7be..206b7b0fbf 100644
--- a/lib/chef/knife/index_rebuild.rb
+++ b/lib/chef/knife/index_rebuild.rb
@@ -68,11 +68,11 @@ class Chef
end
def deprecated_server_message
- ui.warn("'knife index rebuild' has been removed for Chef 11+ servers. It will continue to work for prior versions, however.")
+ ui.warn("'knife index rebuild' has been removed for Chef 11+ servers. It will continue to work for prior versions, however.")
end
def nag
- ui.info("This operation is destructive. Rebuilding the index may take some time.")
+ ui.info("This operation is destructive. Rebuilding the index may take some time.")
ui.confirm("Continue")
end
diff --git a/lib/chef/knife/key_delete.rb b/lib/chef/knife/key_delete.rb
index b97d70db7a..a798e06475 100644
--- a/lib/chef/knife/key_delete.rb
+++ b/lib/chef/knife/key_delete.rb
@@ -39,7 +39,7 @@ class Chef
end
def print_destroyed
- @ui.info("Destroyed key named #{@name} for the #{@actor_field_name} named #{@actor}")
+ @ui.info("Deleted key named #{@name} for the #{@actor_field_name} named #{@actor}")
end
def run
diff --git a/lib/chef/knife/node_from_file.rb b/lib/chef/knife/node_from_file.rb
index 8e05e2798a..61b83edd92 100644
--- a/lib/chef/knife/node_from_file.rb
+++ b/lib/chef/knife/node_from_file.rb
@@ -42,7 +42,7 @@ class Chef
output(format_for_display(updated)) if config[:print_after]
- ui.info("Updated Node #{updated.name}!")
+ ui.info("Updated Node #{updated.name}")
end
end
diff --git a/lib/chef/knife/osc_user_create.rb b/lib/chef/knife/osc_user_create.rb
index 2e971365ec..74b50a4ef4 100644
--- a/lib/chef/knife/osc_user_create.rb
+++ b/lib/chef/knife/osc_user_create.rb
@@ -50,7 +50,7 @@ class Chef
option :user_key,
:long => "--user-key FILENAME",
- :description => "Public key for newly created user. By default a key will be created for you."
+ :description => "Public key for newly created user. By default a key will be created for you."
banner "knife osc_user create USER (options)"
diff --git a/lib/chef/knife/osc_user_edit.rb b/lib/chef/knife/osc_user_edit.rb
index c73a80917c..89986c6f04 100644
--- a/lib/chef/knife/osc_user_edit.rb
+++ b/lib/chef/knife/osc_user_edit.rb
@@ -50,7 +50,7 @@ class Chef
user.update
ui.msg("Saved #{user}.")
else
- ui.msg("User unchaged, not saving.")
+ ui.msg("User unchanged, not saving.")
end
end
end
diff --git a/lib/chef/knife/raw.rb b/lib/chef/knife/raw.rb
index 56527a00f2..76b83d2212 100644
--- a/lib/chef/knife/raw.rb
+++ b/lib/chef/knife/raw.rb
@@ -20,13 +20,13 @@ class Chef
:long => "--method METHOD",
:short => "-m METHOD",
:default => "GET",
- :description => "Request method (GET, POST, PUT or DELETE). Default: GET"
+ :description => "Request method (GET, POST, PUT or DELETE). Default: GET"
option :pretty,
:long => "--[no-]pretty",
:boolean => true,
:default => true,
- :description => "Pretty-print JSON output. Default: true"
+ :description => "Pretty-print JSON output. Default: true"
option :input,
:long => "--input FILE",
@@ -37,7 +37,7 @@ class Chef
:long => "--proxy-auth",
:boolean => true,
:default => false,
- :description => "Use webui proxy authentication. Client key must be the webui key."
+ :description => "Use webui proxy authentication. Client key must be the webui key."
class RawInputServerAPI < Chef::HTTP
def initialize(options = {})
@@ -59,7 +59,7 @@ class Chef
exit(1)
elsif name_args.length > 1
show_usage
- ui.fatal("Only one path accepted for knife raw")
+ ui.fatal("You must specify only a single path")
exit(1)
end
diff --git a/lib/chef/knife/role_from_file.rb b/lib/chef/knife/role_from_file.rb
index e1f4737ab9..bf21a38fd7 100644
--- a/lib/chef/knife/role_from_file.rb
+++ b/lib/chef/knife/role_from_file.rb
@@ -42,7 +42,7 @@ class Chef
output(format_for_display(updated)) if config[:print_after]
- ui.info("Updated Role #{updated.name}!")
+ ui.info("Updated Role #{updated.name}")
end
end
diff --git a/lib/chef/knife/search.rb b/lib/chef/knife/search.rb
index 520c9273af..38d1ab3f42 100644
--- a/lib/chef/knife/search.rb
+++ b/lib/chef/knife/search.rb
@@ -74,7 +74,7 @@ class Chef
option :filter_result,
:short => "-f FILTER",
:long => "--filter-result FILTER",
- :description => "Only bring back specific attributes of the matching objects; for example: \"ServerName=name, Kernel=kernel.version\""
+ :description => "Only return specific attributes of the matching objects; for example: \"ServerName=name, Kernel=kernel.version\""
def run
read_cli_args
diff --git a/lib/chef/knife/serve.rb b/lib/chef/knife/serve.rb
index f74a5c1d1d..95996e6d1e 100644
--- a/lib/chef/knife/serve.rb
+++ b/lib/chef/knife/serve.rb
@@ -9,7 +9,7 @@ class Chef
option :repo_mode,
:long => "--repo-mode MODE",
- :description => "Specifies the local repository layout. Values: static (only environments/roles/data_bags/cookbooks), everything (includes nodes/clients/users), hosted_everything (includes acls/groups/etc. for Enterprise/Hosted Chef). Default: everything/hosted_everything"
+ :description => "Specifies the local repository layout. Values: static (only environments/roles/data_bags/cookbooks), everything (includes nodes/clients/users), hosted_everything (includes acls/groups/etc. for Enterprise/Hosted Chef). Default: everything/hosted_everything"
option :chef_repo_path,
:long => "--chef-repo-path PATH",
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index 9c0f8936f0..4ccc300036 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -162,7 +162,7 @@ class Chef
search_nodes
if list.length == 0
if @action_nodes.length == 0
- ui.fatal("No nodes returned from search!")
+ ui.fatal("No nodes returned from search")
else
ui.fatal("#{@action_nodes.length} #{@action_nodes.length > 1 ? "nodes" : "node"} found, " +
"but does not have the required attribute to establish the connection. " +
diff --git a/lib/chef/knife/upload.rb b/lib/chef/knife/upload.rb
index d0bf89fa7f..f0ecaaae47 100644
--- a/lib/chef/knife/upload.rb
+++ b/lib/chef/knife/upload.rb
@@ -27,7 +27,7 @@ class Chef
:long => "--[no-]force",
:boolean => true,
:default => false,
- :description => "Force upload of files even if they match (quicker for many files). Will overwrite frozen cookbooks."
+ :description => "Force upload of files even if they match (quicker for many files). Will overwrite frozen cookbooks."
option :freeze,
:long => "--[no-]freeze",
@@ -51,7 +51,7 @@ class Chef
def run
if name_args.length == 0
show_usage
- ui.fatal("Must specify at least one argument. If you want to upload everything in this directory, type \"knife upload .\"")
+ ui.fatal("You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"")
exit 1
end
diff --git a/lib/chef/knife/user_create.rb b/lib/chef/knife/user_create.rb
index ac81f29e82..d21afb1059 100644
--- a/lib/chef/knife/user_create.rb
+++ b/lib/chef/knife/user_create.rb
@@ -43,7 +43,7 @@ class Chef
option :prevent_keygen,
:short => "-k",
:long => "--prevent-keygen",
- :description => "API V1 only. Prevent server from generating a default key pair for you. Cannot be passed with --user-key.",
+ :description => "API V1 (Chef Server 12.1+) only. Prevent server from generating a default key pair for you. Cannot be passed with --user-key.",
:boolean => true
option :admin,
diff --git a/lib/chef/knife/xargs.rb b/lib/chef/knife/xargs.rb
index 10e15a4257..6559ca2e74 100644
--- a/lib/chef/knife/xargs.rb
+++ b/lib/chef/knife/xargs.rb
@@ -21,7 +21,7 @@ class Chef
option :patterns,
:long => "--pattern [PATTERN]",
:short => "-p [PATTERN]",
- :description => "Pattern on command line (if these are not specified, a list of patterns is expected on standard input). Multiple patterns may be passed in this way.",
+ :description => "Pattern on command line (if these are not specified, a list of patterns is expected on standard input). Multiple patterns may be passed in this way.",
:arg_arity => [1, -1]
option :diff,
@@ -44,12 +44,12 @@ class Chef
option :replace_first,
:long => "--replace-first REPLACESTR",
:short => "-J REPLACESTR",
- :description => "String to replace with filenames. -J will only replace the FIRST occurrence of the replacement string."
+ :description => "String to replace with filenames. -J will only replace the FIRST occurrence of the replacement string."
option :replace_all,
:long => "--replace REPLACESTR",
:short => "-I REPLACESTR",
- :description => "String to replace with filenames. -I will replace ALL occurrence of the replacement string."
+ :description => "String to replace with filenames. -I will replace ALL occurrence of the replacement string."
option :max_arguments_per_command,
:long => "--max-args MAXARGS",
@@ -78,7 +78,7 @@ class Chef
Chef::ChefFS::FileSystem.list(config[:local] ? local_fs : chef_fs, pattern).each do |result|
if result.dir?
# TODO option to include directories
- ui.warn "#{format_path(result)}: is a directory. Will not run #{command} on it."
+ ui.warn "#{format_path(result)}: is a directory. Will not run #{command} on it."
else
files << result
ran = false
diff --git a/spec/integration/knife/delete_spec.rb b/spec/integration/knife/delete_spec.rb
index d8cb8d950f..1c69fbf9c9 100644
--- a/spec/integration/knife/delete_spec.rb
+++ b/spec/integration/knife/delete_spec.rb
@@ -643,7 +643,7 @@ EOM
context "and cwd is at the top level" do
before { cwd "." }
it "knife delete fails" do
- knife("delete").should_fail "FATAL: Must specify at least one argument. If you want to delete everything in this directory, type \"knife delete --recurse .\"\n", :stdout => /USAGE/
+ knife("delete").should_fail "FATAL: You must specify at least one argument. If you want to delete everything in this directory, run \"knife delete --recurse .\"\n", :stdout => /USAGE/
knife("list -Rf /").should_succeed <<EOM
clients
clients/chef-validator.json
@@ -856,7 +856,7 @@ EOM
context "and cwd is at the top level" do
before { cwd "." }
it "knife delete fails" do
- knife("delete").should_fail "FATAL: Must specify at least one argument. If you want to delete everything in this directory, type \"knife delete --recurse .\"\n", :stdout => /USAGE/
+ knife("delete").should_fail "FATAL: You must specify at least one argument. If you want to delete everything in this directory, run \"knife delete --recurse .\"\n", :stdout => /USAGE/
knife("list -Rf /").should_succeed <<EOM
clients
clients/chef-validator.json
diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb
index d9a3f4fe87..39bf8d1c42 100644
--- a/spec/integration/knife/download_spec.rb
+++ b/spec/integration/knife/download_spec.rb
@@ -255,7 +255,7 @@ EOM
end
it "knife download with no parameters reports an error" do
- knife("download").should_fail "FATAL: Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"\n", :stdout => /USAGE/
+ knife("download").should_fail "FATAL: You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"\n", :stdout => /USAGE/
end
end
end
@@ -383,7 +383,7 @@ EOM
cwd "data_bags"
end
it "knife download fails" do
- knife("download").should_fail "FATAL: Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"\n", :stdout => /USAGE/
+ knife("download").should_fail "FATAL: You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"\n", :stdout => /USAGE/
end
it "knife download --purge . downloads everything" do
knife("download --purge .").should_succeed <<EOM
@@ -760,7 +760,7 @@ EOM
cwd "."
end
it "knife download with no parameters reports an error" do
- knife("download").should_fail "FATAL: Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"\n", :stdout => /USAGE/
+ knife("download").should_fail "FATAL: You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"\n", :stdout => /USAGE/
end
end
end
@@ -879,7 +879,7 @@ EOM
cwd "data_bags"
end
it "knife download fails" do
- knife("download").should_fail "FATAL: Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"\n", :stdout => /USAGE/
+ knife("download").should_fail "FATAL: You must specify at least one argument. If you want to download everything in this directory, run \"knife download .\"\n", :stdout => /USAGE/
end
it "knife download --purge . downloads everything" do
knife("download --purge .").should_succeed <<EOM
diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb
index 9a1717b2d9..038bbad216 100644
--- a/spec/integration/knife/upload_spec.rb
+++ b/spec/integration/knife/upload_spec.rb
@@ -260,7 +260,7 @@ EOM
end
it "knife upload with no parameters reports an error" do
- knife("upload").should_fail "FATAL: Must specify at least one argument. If you want to upload everything in this directory, type \"knife upload .\"\n", :stdout => /USAGE/
+ knife("upload").should_fail "FATAL: You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"\n", :stdout => /USAGE/
end
end
end
@@ -408,7 +408,7 @@ EOM
end
it "knife upload fails" do
- knife("upload").should_fail "FATAL: Must specify at least one argument. If you want to upload everything in this directory, type \"knife upload .\"\n", :stdout => /USAGE/
+ knife("upload").should_fail "FATAL: You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"\n", :stdout => /USAGE/
end
it "knife upload --purge . uploads everything" do
@@ -911,7 +911,7 @@ EOM
cwd "."
end
it "knife upload with no parameters reports an error" do
- knife("upload").should_fail "FATAL: Must specify at least one argument. If you want to upload everything in this directory, type \"knife upload .\"\n", :stdout => /USAGE/
+ knife("upload").should_fail "FATAL: You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"\n", :stdout => /USAGE/
end
end
end
@@ -1013,7 +1013,7 @@ EOM
cwd "data_bags"
end
it "knife upload fails" do
- knife("upload").should_fail "FATAL: Must specify at least one argument. If you want to upload everything in this directory, type \"knife upload .\"\n", :stdout => /USAGE/
+ knife("upload").should_fail "FATAL: You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"\n", :stdout => /USAGE/
end
it "knife upload --purge . uploads everything" do
knife("upload --purge .").should_succeed <<EOM
diff --git a/spec/unit/knife/client_bulk_delete_spec.rb b/spec/unit/knife/client_bulk_delete_spec.rb
index 096fba632a..a9b18c9086 100644
--- a/spec/unit/knife/client_bulk_delete_spec.rb
+++ b/spec/unit/knife/client_bulk_delete_spec.rb
@@ -108,8 +108,8 @@ describe Chef::Knife::ClientBulkDelete do
describe "without --delete-validators" do
it "should mention that validator clients wont be deleted" do
knife.run
- expect(stdout).to include("Following clients are validators and will not be deleted.")
- info = stdout.index "Following clients are validators and will not be deleted."
+ expect(stdout).to include("The following clients are validators and will not be deleted:")
+ info = stdout.index "The following clients are validators and will not be deleted:"
val = stdout.index "myorg-validator"
expect(val > info).to be_truthy
end
diff --git a/spec/unit/knife/data_bag_show_spec.rb b/spec/unit/knife/data_bag_show_spec.rb
index 18768ca476..0672b8bb33 100644
--- a/spec/unit/knife/data_bag_show_spec.rb
+++ b/spec/unit/knife/data_bag_show_spec.rb
@@ -80,7 +80,7 @@ qux: http://localhost:4000/data/bag_o_data/qux}
it "displays the encrypted data bag when the secret is not provided" do
expect(knife).to receive(:encryption_secret_provided_ignore_encrypt_flag?).and_return(false)
expect(Chef::DataBagItem).to receive(:load).with(bag_name, item_name).and_return(data_bag_with_encoded_hash)
- expect(knife.ui).to receive(:warn).with("Encrypted data bag detected, but no secret provided for decoding. Displaying encrypted data.")
+ expect(knife.ui).to receive(:warn).with("Encrypted data bag detected, but no secret provided for decoding. Displaying encrypted data.")
knife.run
expect(stdout.string.strip).to include("baz", "qux", "cipher")