summaryrefslogtreecommitdiff
path: root/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-07-02 13:18:58 -0700
committerGitHub <noreply@github.com>2018-07-02 13:18:58 -0700
commit4ca23a0dd98c59e1cae29fd7ad6e485cbb12c2b3 (patch)
treec23401b04cc4184969ea7ab8d4ae5ad8760ee198 /lib/chef/formatters/error_inspectors/node_load_error_inspector.rb
parent28f9fa7713cd2788f259efc7ec5405365d07419c (diff)
parent865b2aac61aea10db31bae7dcedd6146c9526f74 (diff)
downloadchef-4ca23a0dd98c59e1cae29fd7ad6e485cbb12c2b3.tar.gz
Merge pull request #7414 from chef/lcg/chefstyle2
Chefstyle fixes
Diffstat (limited to 'lib/chef/formatters/error_inspectors/node_load_error_inspector.rb')
-rw-r--r--lib/chef/formatters/error_inspectors/node_load_error_inspector.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb b/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb
index c52dad4c09..a2f77c8287 100644
--- a/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb
@@ -43,12 +43,12 @@ class Chef
when Net::HTTPServerException, Net::HTTPFatalError
humanize_http_exception(error_description)
when Chef::Exceptions::PrivateKeyMissing
- error_description.section("Private Key Not Found:", <<-E)
-Your private key could not be loaded. If the key file exists, ensure that it is
-readable by chef-client.
+ error_description.section("Private Key Not Found:", <<~E)
+ Your private key could not be loaded. If the key file exists, ensure that it is
+ readable by chef-client.
E
- error_description.section("Relevant Config Settings:", <<-E)
-client_key "#{api_key}"
+ error_description.section("Relevant Config Settings:", <<~E)
+ client_key "#{api_key}"
E
when EOFError
describe_eof_error(error_description)
@@ -69,13 +69,13 @@ E
# TODO: we're rescuing errors from Node.find_or_create
# * could be no write on nodes container
# * could be no read on the node
- error_description.section("Authorization Error", <<-E)
-Your client is not authorized to load the node data (HTTP 403).
+ error_description.section("Authorization Error", <<~E)
+ Your client is not authorized to load the node data (HTTP 403).
E
error_description.section("Server Response:", format_rest_error)
- error_description.section("Possible Causes:", <<-E)
-* Your client (#{username}) may have misconfigured authorization permissions.
+ error_description.section("Possible Causes:", <<~E)
+ * Your client (#{username}) may have misconfigured authorization permissions.
E
when Net::HTTPBadRequest
describe_400_error(error_description)
@@ -97,11 +97,11 @@ E
# one, e.g., PUT http://wrong.url/nodes/node-name becomes a GET after a
# redirect.
def describe_404_error(error_description)
- error_description.section("Resource Not Found:", <<-E)
-The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
+ error_description.section("Resource Not Found:", <<~E)
+ The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
E
- error_description.section("Relevant Config Settings:", <<-E)
-chef_server_url "#{server_url}"
+ error_description.section("Relevant Config Settings:", <<~E)
+ chef_server_url "#{server_url}"
E
end