summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-05-02 22:43:14 -0700
committerTim Smith <tsmith@chef.io>2019-05-02 22:43:14 -0700
commite914d191b7c979149fd3aa59fe621e79db435da3 (patch)
treec18d3c3a82fbf1d893bfd060d936e192f178d700
parenta6bcf09092f9ad10f6f474f9c2892108f61ea5eb (diff)
downloadchef-e914d191b7c979149fd3aa59fe621e79db435da3.tar.gz
More periods and product constantsbranding
A few formatting fixes as well Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/knife/bootstrap.rb78
-rw-r--r--lib/chef/knife/client_bulk_delete.rb2
-rw-r--r--lib/chef/knife/client_create.rb3
-rw-r--r--lib/chef/knife/client_delete.rb2
-rw-r--r--lib/chef/knife/client_list.rb2
-rw-r--r--lib/chef/knife/client_reregister.rb2
-rw-r--r--lib/chef/knife/cookbook_download.rb6
-rw-r--r--lib/chef/knife/cookbook_list.rb2
-rw-r--r--lib/chef/knife/cookbook_metadata.rb4
-rw-r--r--lib/chef/knife/cookbook_show.rb8
-rw-r--r--lib/chef/knife/deps.rb4
-rw-r--r--lib/chef/knife/diff.rb5
-rw-r--r--lib/chef/knife/exec.rb4
-rw-r--r--lib/chef/knife/list.rb12
-rw-r--r--lib/chef/knife/node_edit.rb2
-rw-r--r--lib/chef/knife/node_list.rb2
-rw-r--r--lib/chef/knife/node_run_list_add.rb8
-rw-r--r--lib/chef/knife/user_create.rb3
-rw-r--r--lib/chef/knife/user_reregister.rb2
-rw-r--r--lib/chef/knife/xargs.rb2
20 files changed, 78 insertions, 75 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index bbd51d01bd..69d9ffb8c0 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -41,12 +41,12 @@ class Chef
option :connection_user,
short: "-U USERNAME",
long: "--connection-user USERNAME",
- description: "Authenticate to the target host with this user account"
+ description: "Authenticate to the target host with this user account."
option :connection_password,
short: "-P PASSWORD",
long: "--connection-password PASSWORD",
- description: "Authenticate to the target host with this password"
+ description: "Authenticate to the target host with this password."
option :connection_port,
short: "-p PORT",
@@ -71,7 +71,7 @@ class Chef
option :ca_trust_file,
short: "-f CA_TRUST_PATH",
long: "--ca-trust-file CA_TRUST_PATH",
- description: "The Certificate Authority (CA) trust file used for SSL transport"
+ description: "The Certificate Authority (CA) trust file used for SSL transport."
option :winrm_no_verify_cert,
long: "--winrm-no-verify-cert",
@@ -80,7 +80,7 @@ class Chef
option :winrm_ssl,
long: "--winrm-ssl",
- description: "Connect to WinRM using SSL"
+ description: "Use SSL in the WinRM connection."
option :winrm_auth_method,
short: "-w AUTH-METHOD",
@@ -90,7 +90,7 @@ class Chef
option :winrm_basic_auth_only,
long: "--winrm-basic-auth-only",
- description: "For WinRM basic authentication when using the 'ssl' auth method",
+ description: "For WinRM basic authentication when using the 'ssl' auth method.",
boolean: true
# This option was provided in knife bootstrap windows winrm,
@@ -104,42 +104,42 @@ class Chef
option :kerberos_realm,
short: "-R KERBEROS_REALM",
long: "--kerberos-realm KERBEROS_REALM",
- description: "The Kerberos realm used for authentication",
+ description: "The Kerberos realm used for authentication.",
proc: Proc.new { |protocol| Chef::Config[:knife][:kerberos_realm] = protocol }
option :kerberos_service,
short: "-S KERBEROS_SERVICE",
long: "--kerberos-service KERBEROS_SERVICE",
- description: "The Kerberos service used for authentication",
+ description: "The Kerberos service used for authentication.",
proc: Proc.new { |protocol| Chef::Config[:knife][:kerberos_service] = protocol }
option :winrm_session_timeout,
long: "--winrm-session-timeout SECONDS",
- description: "The number of seconds to wait for each WinRM operation to be acknowledged while running bootstrap",
+ description: "The number of seconds to wait for each WinRM operation to be acknowledged while running bootstrap.",
proc: Proc.new { |protocol| Chef::Config[:knife][:winrm_session_timeout] = protocol }
## SSH Authentication
option :ssh_gateway,
short: "-G GATEWAY",
long: "--ssh-gateway GATEWAY",
- description: "The ssh gateway",
+ description: "The SSH gateway.",
proc: Proc.new { |key| Chef::Config[:knife][:ssh_gateway] = key }
option :ssh_gateway_identity,
long: "--ssh-gateway-identity SSH_GATEWAY_IDENTITY",
- description: "The SSH identity file used for gateway authentication",
+ description: "The SSH identity file used for gateway authentication.",
proc: Proc.new { |key| Chef::Config[:knife][:ssh_gateway_identity] = key }
option :ssh_forward_agent,
short: "-A",
long: "--ssh-forward-agent",
- description: "Enable SSH agent forwarding",
+ description: "Enable SSH agent forwarding.",
boolean: true
option :ssh_identity_file,
short: "-i IDENTITY_FILE",
long: "--ssh-identity-file IDENTITY_FILE",
- description: "The SSH identity file used for authentication"
+ description: "The SSH identity file used for authentication."
option :ssh_verify_host_key,
long: "--[no-]ssh-verify-host-key",
@@ -153,36 +153,36 @@ class Chef
# client.rb content via chef-full/bootstrap_context
option :bootstrap_version,
long: "--bootstrap-version VERSION",
- description: "The version of Chef to install",
+ description: "The version of #{Chef::Dist::PRODUCT} to install.",
proc: lambda { |v| Chef::Config[:knife][:bootstrap_version] = v }
# client.rb content via chef-full/bootstrap_context
option :bootstrap_proxy,
long: "--bootstrap-proxy PROXY_URL",
- description: "The proxy server for the node being bootstrapped",
+ description: "The proxy server for the node being bootstrapped.",
proc: Proc.new { |p| Chef::Config[:knife][:bootstrap_proxy] = p }
# client.rb content via bootstrap_context
option :bootstrap_proxy_user,
long: "--bootstrap-proxy-user PROXY_USER",
- description: "The proxy authentication username for the node being bootstrapped"
+ description: "The proxy authentication username for the node being bootstrapped."
# client.rb content via bootstrap_context
option :bootstrap_proxy_pass,
long: "--bootstrap-proxy-pass PROXY_PASS",
- description: "The proxy authentication password for the node being bootstrapped"
+ description: "The proxy authentication password for the node being bootstrapped."
# client.rb content via bootstrap_context
option :bootstrap_no_proxy,
long: "--bootstrap-no-proxy [NO_PROXY_URL|NO_PROXY_IP]",
- description: "Do not proxy locations for the node being bootstrapped; this option is used internally by Chef",
+ description: "Do not proxy locations for the node being bootstrapped; this option is used internally by Chef.",
proc: Proc.new { |np| Chef::Config[:knife][:bootstrap_no_proxy] = np }
# client.rb content via bootstrap_context
option :bootstrap_template,
short: "-t TEMPLATE",
long: "--bootstrap-template TEMPLATE",
- description: "Bootstrap Chef using a built-in or custom template. Set to the full path of an erb template or use one of the built-in templates."
+ description: "Bootstrap #{Chef::Dist::PRODUCT} using a built-in or custom template. Set to the full path of an erb template or use one of the built-in templates."
# client.rb content via bootstrap_context
option :node_ssl_verify_mode,
@@ -199,57 +199,57 @@ class Chef
# bootstrap_context - client.rb
option :node_verify_api_cert,
long: "--[no-]node-verify-api-cert",
- description: "Verify the SSL cert for HTTPS requests to the Chef server API.",
+ description: "Verify the SSL cert for HTTPS requests to the #{Chef::Dist::SERVER_PRODUCT} API.",
boolean: true
# runtime - sudo settings (train handles sudo)
option :use_sudo,
long: "--sudo",
- description: "Execute the bootstrap via sudo",
+ description: "Execute the bootstrap via sudo.",
boolean: true
# runtime - sudo settings (train handles sudo)
option :preserve_home,
long: "--sudo-preserve-home",
- description: "Preserve non-root user HOME environment variable with sudo",
+ description: "Preserve non-root user HOME environment variable with sudo.",
boolean: true
# runtime - sudo settings (train handles sudo)
option :use_sudo_password,
long: "--use-sudo-password",
- description: "Execute the bootstrap via sudo with password",
+ description: "Execute the bootstrap via sudo with password.",
boolean: false
# runtime - client_builder
option :chef_node_name,
short: "-N NAME",
long: "--node-name NAME",
- description: "The Chef node name for your new node"
+ description: "The node name for your new node."
# runtime - client_builder - set runlist when creating node
option :run_list,
short: "-r RUN_LIST",
long: "--run-list RUN_LIST",
- description: "Comma separated list of roles/recipes to apply",
+ description: "Comma separated list of roles/recipes to apply.",
proc: lambda { |o| o.split(/[\s,]+/) },
default: []
# runtime - client_builder - set policy name when creating node
option :policy_name,
long: "--policy-name POLICY_NAME",
- description: "Policyfile name to use (--policy-group must also be given)",
+ description: "Policyfile name to use (--policy-group must also be given).",
default: nil
# runtime - client_builder - set policy group when creating node
option :policy_group,
long: "--policy-group POLICY_GROUP",
- description: "Policy group name to use (--policy-name must also be given)",
+ description: "Policy group name to use (--policy-name must also be given).",
default: nil
# runtime - client_builder - node tags
option :tags,
long: "--tags TAGS",
- description: "Comma separated list of tags to apply to the node",
+ description: "Comma separated list of tags to apply to the node.",
proc: lambda { |o| o.split(/[\s,]+/) },
default: []
@@ -257,14 +257,14 @@ class Chef
option :first_boot_attributes,
short: "-j JSON_ATTRIBS",
long: "--json-attributes",
- description: "A JSON string to be added to the first run of #{Chef::Dist::CLIENT}",
+ description: "A JSON string to be added to the first run of #{Chef::Dist::CLIENT}.",
proc: lambda { |o| Chef::JSONCompat.parse(o) },
default: nil
# bootstrap template
option :first_boot_attributes_from_file,
long: "--json-attribute-file FILE",
- description: "A JSON file to be used to the first run of #{Chef::Dist::CLIENT}",
+ description: "A JSON file to be used to the first run of #{Chef::Dist::CLIENT}.",
proc: lambda { |o| Chef::JSONCompat.parse(File.read(o)) },
default: nil
@@ -278,7 +278,7 @@ class Chef
# Create ohai hints in /etc/chef/ohai/hints, fname=hintname, content=value
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 an 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("=")
@@ -290,53 +290,53 @@ class Chef
# the provided options to knife bootstrap, so we set the Chef::Config option here.
option :bootstrap_url,
long: "--bootstrap-url URL",
- description: "URL to a custom installation script",
+ description: "URL to a custom installation script.",
proc: Proc.new { |u| Chef::Config[:knife][:bootstrap_url] = u }
option :msi_url, # Windows target only
short: "-m URL",
long: "--msi-url URL",
- description: "Location of the #{Chef::Dist::PRODUCT} MSI. The default templates will prefer to download from this location. The MSI will be downloaded from chef.io if not provided (windows).",
+ description: "Location of the #{Chef::Dist::PRODUCT} MSI. The default templates will prefer to download from this location. The MSI will be downloaded from #{Chef::Dist::WEBSITE} if not provided (Windows).",
default: ""
# bootstrap override: Do this instead of our own setup.sh from omnitruck. Causes bootstrap_url to be ignored.
option :bootstrap_install_command,
long: "--bootstrap-install-command COMMANDS",
- description: "Custom command to install #{Chef::Dist::CLIENT}",
+ description: "Custom command to install #{Chef::Dist::PRODUCT}.",
proc: Proc.new { |ic| Chef::Config[:knife][:bootstrap_install_command] = ic }
# bootstrap template: Run this command first in the bootstrap script
option :bootstrap_preinstall_command,
long: "--bootstrap-preinstall-command COMMANDS",
- description: "Custom commands to run before installing #{Chef::Dist::CLIENT}",
+ description: "Custom commands to run before installing #{Chef::Dist::PRODUCT}.",
proc: Proc.new { |preic| Chef::Config[:knife][:bootstrap_preinstall_command] = preic }
# bootstrap template
option :bootstrap_wget_options,
long: "--bootstrap-wget-options OPTIONS",
- description: "Add options to wget when installing #{Chef::Dist::CLIENT}",
+ description: "Add options to wget when installing #{Chef::Dist::PRODUCT}.",
proc: Proc.new { |wo| Chef::Config[:knife][:bootstrap_wget_options] = wo }
# bootstrap template
option :bootstrap_curl_options,
long: "--bootstrap-curl-options OPTIONS",
- description: "Add options to curl when install #{Chef::Dist::CLIENT}",
+ description: "Add options to curl when install #{Chef::Dist::PRODUCT}.",
proc: Proc.new { |co| Chef::Config[:knife][:bootstrap_curl_options] = co }
# chef_vault_handler
option :bootstrap_vault_file,
long: "--bootstrap-vault-file VAULT_FILE",
- description: "A JSON file with a list of vault(s) and item(s) to be updated"
+ description: "A JSON file with a list of vault(s) and item(s) to be updated."
# chef_vault_handler
option :bootstrap_vault_json,
long: "--bootstrap-vault-json VAULT_JSON",
- description: "A JSON string with the vault(s) and item(s) to be updated"
+ description: "A JSON string with the vault(s) and item(s) to be updated."
# chef_vault_handler
option :bootstrap_vault_item,
long: "--bootstrap-vault-item VAULT_ITEM",
- description: 'A single vault and item to update as "vault:item"',
+ description: 'A single vault and item to update as "vault:item".',
proc: Proc.new { |i|
(vault, item) = i.split(/:/)
Chef::Config[:knife][:bootstrap_vault_item] ||= {}
diff --git a/lib/chef/knife/client_bulk_delete.rb b/lib/chef/knife/client_bulk_delete.rb
index 8bb7181d65..a4777a4a16 100644
--- a/lib/chef/knife/client_bulk_delete.rb
+++ b/lib/chef/knife/client_bulk_delete.rb
@@ -29,7 +29,7 @@ class Chef
option :delete_validators,
short: "-D",
long: "--delete-validators",
- description: "Force deletion of clients if they're validators"
+ description: "Force deletion of clients if they're validators."
banner "knife client bulk delete REGEX (options)"
diff --git a/lib/chef/knife/client_create.rb b/lib/chef/knife/client_create.rb
index 62c8ff8417..869e174453 100644
--- a/lib/chef/knife/client_create.rb
+++ b/lib/chef/knife/client_create.rb
@@ -17,6 +17,7 @@
#
require "chef/knife"
+require "chef/dist"
class Chef
class Knife
@@ -50,7 +51,7 @@ class Chef
option :prevent_keygen,
short: "-k",
long: "--prevent-keygen",
- description: "API V1 (Chef Server 12.1+) only. Prevent server from generating a default key pair for you. Cannot be passed with --public-key.",
+ description: "API V1 (#{Chef::Dist::SERVER_PRODUCT} 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/client_delete.rb b/lib/chef/knife/client_delete.rb
index 7b09a9a351..b2e34352a2 100644
--- a/lib/chef/knife/client_delete.rb
+++ b/lib/chef/knife/client_delete.rb
@@ -29,7 +29,7 @@ class Chef
option :delete_validators,
short: "-D",
long: "--delete-validators",
- description: "Force deletion of client if it's a validator"
+ description: "Force deletion of client if it's a validator."
banner "knife client delete [CLIENT [CLIENT]] (options)"
diff --git a/lib/chef/knife/client_list.rb b/lib/chef/knife/client_list.rb
index bf68c46990..49d833353d 100644
--- a/lib/chef/knife/client_list.rb
+++ b/lib/chef/knife/client_list.rb
@@ -31,7 +31,7 @@ class Chef
option :with_uri,
short: "-w",
long: "--with-uri",
- description: "Show corresponding URIs"
+ description: "Show corresponding URIs."
def run
output(format_list_for_display(Chef::ApiClientV1.list))
diff --git a/lib/chef/knife/client_reregister.rb b/lib/chef/knife/client_reregister.rb
index 28660f60c0..37ef259cad 100644
--- a/lib/chef/knife/client_reregister.rb
+++ b/lib/chef/knife/client_reregister.rb
@@ -31,7 +31,7 @@ class Chef
option :file,
short: "-f FILE",
long: "--file FILE",
- description: "Write the key to a file"
+ description: "Write the key to a file."
def run
@client_name = @name_args[0]
diff --git a/lib/chef/knife/cookbook_download.rb b/lib/chef/knife/cookbook_download.rb
index a321d217db..d5b1040e3e 100644
--- a/lib/chef/knife/cookbook_download.rb
+++ b/lib/chef/knife/cookbook_download.rb
@@ -35,19 +35,19 @@ class Chef
option :latest,
short: "-N",
long: "--latest",
- description: "The version of the cookbook to download",
+ description: "The version of the cookbook to download.",
boolean: true
option :download_directory,
short: "-d DOWNLOAD_DIRECTORY",
long: "--dir DOWNLOAD_DIRECTORY",
- description: "The directory to download the cookbook into",
+ description: "The directory to download the cookbook into.",
default: Dir.pwd
option :force,
short: "-f",
long: "--force",
- description: "Force download over the download directory if it exists"
+ description: "Force download over the download directory if it exists."
# TODO: tim/cw: 5-23-2010: need to implement knife-side
# specificity for downloads - need to implement --platform and
diff --git a/lib/chef/knife/cookbook_list.rb b/lib/chef/knife/cookbook_list.rb
index deb36baef4..c5a5bd5835 100644
--- a/lib/chef/knife/cookbook_list.rb
+++ b/lib/chef/knife/cookbook_list.rb
@@ -28,7 +28,7 @@ class Chef
option :with_uri,
short: "-w",
long: "--with-uri",
- description: "Show corresponding URIs"
+ description: "Show corresponding URIs."
option :all_versions,
short: "-a",
diff --git a/lib/chef/knife/cookbook_metadata.rb b/lib/chef/knife/cookbook_metadata.rb
index 8a9c57f1c3..2b25f505a0 100644
--- a/lib/chef/knife/cookbook_metadata.rb
+++ b/lib/chef/knife/cookbook_metadata.rb
@@ -32,13 +32,13 @@ class Chef
option :cookbook_path,
short: "-o PATH:PATH",
long: "--cookbook-path PATH:PATH",
- description: "A colon-separated path to look for cookbooks in",
+ description: "A colon-separated path to look for cookbooks in.",
proc: lambda { |o| o.split(":") }
option :all,
short: "-a",
long: "--all",
- description: "Generate metadata for all cookbooks, rather than just a single cookbook"
+ description: "Generate metadata for all cookbooks, rather than just a single cookbook."
def run
config[:cookbook_path] ||= Chef::Config[:cookbook_path]
diff --git a/lib/chef/knife/cookbook_show.rb b/lib/chef/knife/cookbook_show.rb
index 46ed7a1aa6..d42c114556 100644
--- a/lib/chef/knife/cookbook_show.rb
+++ b/lib/chef/knife/cookbook_show.rb
@@ -33,22 +33,22 @@ class Chef
option :fqdn,
short: "-f FQDN",
long: "--fqdn FQDN",
- description: "The FQDN of the host to see the file for"
+ description: "The FQDN of the host to see the file for."
option :platform,
short: "-p PLATFORM",
long: "--platform PLATFORM",
- description: "The platform to see the file for"
+ description: "The platform to see the file for."
option :platform_version,
short: "-V VERSION",
long: "--platform-version VERSION",
- description: "The platform version to see the file for"
+ description: "The platform version to see the file for."
option :with_uri,
short: "-w",
long: "--with-uri",
- description: "Show corresponding URIs"
+ description: "Show corresponding URIs."
def run
cookbook_name, cookbook_version, segment, filename = @name_args
diff --git a/lib/chef/knife/deps.rb b/lib/chef/knife/deps.rb
index 4cb77eea46..8efa0d0b65 100644
--- a/lib/chef/knife/deps.rb
+++ b/lib/chef/knife/deps.rb
@@ -32,14 +32,16 @@ class Chef
long: "--[no-]recurse",
boolean: true,
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."
+
option :remote,
long: "--remote",
boolean: true,
- description: "List dependencies on the server instead of the local filesystem"
+ description: "List dependencies on the server instead of the local filesystem."
attr_accessor :exit_code
diff --git a/lib/chef/knife/diff.rb b/lib/chef/knife/diff.rb
index aac42ed5c5..bd75d31194 100644
--- a/lib/chef/knife/diff.rb
+++ b/lib/chef/knife/diff.rb
@@ -45,12 +45,11 @@ class Chef
option :diff_filter,
long: "--diff-filter=[(A|D|M|T)...[*]]",
- description: "Select only files that are Added (A), Deleted (D), Modified (M), or have their type (i.e. regular file, directory) changed (T). Any combination of the filter characters (including none) can be used. When * (All-or-none) is added to the combination, all paths are selected if
- there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected."
+ description: "Select only files that are Added (A), Deleted (D), Modified (M), or have their type (i.e. regular file, directory) changed (T). Any combination of the filter characters (including none) can be used. When * (All-or-none) is added to the combination, all paths are selected if there is any file that matches other criteria in the comparison; if there is no file that matches other criteria, nothing is selected."
option :cookbook_version,
long: "--cookbook-version VERSION",
- description: "Version of cookbook to download (if there are multiple versions and cookbook_versions is false)"
+ description: "Version of cookbook to download (if there are multiple versions and cookbook_versions is false)."
def run
if config[:name_only]
diff --git a/lib/chef/knife/exec.rb b/lib/chef/knife/exec.rb
index ed7101c0cc..63598923de 100644
--- a/lib/chef/knife/exec.rb
+++ b/lib/chef/knife/exec.rb
@@ -26,12 +26,12 @@ class Chef::Knife::Exec < Chef::Knife
option :exec,
short: "-E CODE",
long: "--exec CODE",
- description: "a string of Chef code to execute"
+ description: "A string of Chef code to execute."
option :script_path,
short: "-p PATH:PATH",
long: "--script-path PATH:PATH",
- description: "A colon-separated path to look for scripts in",
+ description: "A colon-separated path to look for scripts in.",
proc: lambda { |o| o.split(":") }
deps do
diff --git a/lib/chef/knife/list.rb b/lib/chef/knife/list.rb
index 03954dcf00..10018ff74c 100644
--- a/lib/chef/knife/list.rb
+++ b/lib/chef/knife/list.rb
@@ -31,33 +31,33 @@ class Chef
option :recursive,
short: "-R",
boolean: true,
- description: "List directories recursively"
+ description: "List directories recursively."
option :bare_directories,
short: "-d",
boolean: true,
- description: "When directories match the pattern, do not show the directories' children"
+ description: "When directories match the pattern, do not show the directories' children."
option :local,
long: "--local",
boolean: true,
- description: "List local directory instead of remote"
+ description: "List local directory instead of remote."
option :flat,
short: "-f",
long: "--flat",
boolean: true,
- description: "Show a list of filenames rather than the prettified ls-like output normally produced"
+ description: "Show a list of filenames rather than the prettified ls-like output normally produced."
option :one_column,
short: "-1",
boolean: true,
- description: "Show only one column of results"
+ description: "Show only one column of results."
option :trailing_slashes,
short: "-p",
boolean: true,
- description: "Show trailing slashes after directories"
+ description: "Show trailing slashes after directories."
attr_accessor :exit_code
diff --git a/lib/chef/knife/node_edit.rb b/lib/chef/knife/node_edit.rb
index 7551a8a7da..b97302a3da 100644
--- a/lib/chef/knife/node_edit.rb
+++ b/lib/chef/knife/node_edit.rb
@@ -35,7 +35,7 @@ class Chef
short: "-a",
long: "--all",
boolean: true,
- description: "Display all attributes when editing"
+ description: "Display all attributes when editing."
def run
if node_name.nil?
diff --git a/lib/chef/knife/node_list.rb b/lib/chef/knife/node_list.rb
index 4bc2c34508..651f30862d 100644
--- a/lib/chef/knife/node_list.rb
+++ b/lib/chef/knife/node_list.rb
@@ -32,7 +32,7 @@ class Chef
option :with_uri,
short: "-w",
long: "--with-uri",
- description: "Show corresponding URIs"
+ description: "Show corresponding URIs."
def run
env = Chef::Config[:environment]
diff --git a/lib/chef/knife/node_run_list_add.rb b/lib/chef/knife/node_run_list_add.rb
index 3fc28c041d..eed9343e0a 100644
--- a/lib/chef/knife/node_run_list_add.rb
+++ b/lib/chef/knife/node_run_list_add.rb
@@ -32,12 +32,12 @@ class Chef
option :after,
short: "-a ITEM",
long: "--after ITEM",
- description: "Place the ENTRY in the run list after ITEM"
+ description: "Place the ENTRY in the run list after ITEM."
option :before,
- short: "-b ITEM",
- long: "--before ITEM",
- description: "Place the ENTRY in the run list before ITEM"
+ short: "-b ITEM",
+ long: "--before ITEM",
+ description: "Place the ENTRY in the run list before ITEM."
def run
node = Chef::Node.load(@name_args[0])
diff --git a/lib/chef/knife/user_create.rb b/lib/chef/knife/user_create.rb
index 6a4a123ad8..2381ffbdbd 100644
--- a/lib/chef/knife/user_create.rb
+++ b/lib/chef/knife/user_create.rb
@@ -18,6 +18,7 @@
#
require "chef/knife"
+require "chef/dist"
class Chef
class Knife
@@ -41,7 +42,7 @@ class Chef
option :prevent_keygen,
short: "-k",
long: "--prevent-keygen",
- description: "API V1 (Chef Server 12.1+) only. Prevent server from generating a default key pair for you. Cannot be passed with --user-key.",
+ description: "API V1 (#{Chef::Dist::SERVER_PRODUCT} 12.1+) only. Prevent server from generating a default key pair for you. Cannot be passed with --user-key.",
boolean: true
banner "knife user create USERNAME DISPLAY_NAME FIRST_NAME LAST_NAME EMAIL PASSWORD (options)"
diff --git a/lib/chef/knife/user_reregister.rb b/lib/chef/knife/user_reregister.rb
index 3c63c32f29..7530327131 100644
--- a/lib/chef/knife/user_reregister.rb
+++ b/lib/chef/knife/user_reregister.rb
@@ -31,7 +31,7 @@ class Chef
option :file,
short: "-f FILE",
long: "--file FILE",
- description: "Write the private key to a file"
+ description: "Write the private key to a file."
def run
@user_name = @name_args[0]
diff --git a/lib/chef/knife/xargs.rb b/lib/chef/knife/xargs.rb
index ae5851f465..603279bcdd 100644
--- a/lib/chef/knife/xargs.rb
+++ b/lib/chef/knife/xargs.rb
@@ -32,7 +32,7 @@ class Chef
option :local,
long: "--local",
boolean: true,
- description: "Xargs local files instead of remote"
+ description: "Xargs local files instead of remote."
option :patterns,
long: "--pattern [PATTERN]",