summaryrefslogtreecommitdiff
path: root/lib/chef/formatters
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/formatters')
-rw-r--r--lib/chef/formatters/base.rb10
-rw-r--r--lib/chef/formatters/doc.rb6
-rw-r--r--lib/chef/formatters/error_descriptor.rb4
-rw-r--r--lib/chef/formatters/error_inspectors.rb10
-rw-r--r--lib/chef/formatters/error_inspectors/api_error_formatting.rb4
-rw-r--r--lib/chef/formatters/error_inspectors/compile_error_inspector.rb2
-rw-r--r--lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb2
-rw-r--r--lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb2
-rw-r--r--lib/chef/formatters/error_inspectors/node_load_error_inspector.rb2
-rw-r--r--lib/chef/formatters/error_inspectors/registration_error_inspector.rb2
-rw-r--r--lib/chef/formatters/error_inspectors/resource_failure_inspector.rb2
-rw-r--r--lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb2
-rw-r--r--lib/chef/formatters/indentable_output_stream.rb10
-rw-r--r--lib/chef/formatters/minimal.rb4
14 files changed, 31 insertions, 31 deletions
diff --git a/lib/chef/formatters/base.rb b/lib/chef/formatters/base.rb
index 4c393f7a48..c881397b60 100644
--- a/lib/chef/formatters/base.rb
+++ b/lib/chef/formatters/base.rb
@@ -17,11 +17,11 @@
# limitations under the License.
#
-require 'chef/event_dispatch/base'
-require 'chef/formatters/error_inspectors'
-require 'chef/formatters/error_descriptor'
-require 'chef/formatters/error_mapper'
-require 'chef/formatters/indentable_output_stream'
+require "chef/event_dispatch/base"
+require "chef/formatters/error_inspectors"
+require "chef/formatters/error_descriptor"
+require "chef/formatters/error_mapper"
+require "chef/formatters/indentable_output_stream"
class Chef
diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb
index 70108f547b..5510956754 100644
--- a/lib/chef/formatters/doc.rb
+++ b/lib/chef/formatters/doc.rb
@@ -1,5 +1,5 @@
-require 'chef/formatters/base'
-require 'chef/config'
+require "chef/formatters/base"
+require "chef/config"
class Chef
module Formatters
@@ -334,7 +334,7 @@ class Chef
# Called before handlers run
def handlers_start(handler_count)
- puts ''
+ puts ""
puts "Running handlers:"
indent
end
diff --git a/lib/chef/formatters/error_descriptor.rb b/lib/chef/formatters/error_descriptor.rb
index f0e7520f31..a48f0609a9 100644
--- a/lib/chef/formatters/error_descriptor.rb
+++ b/lib/chef/formatters/error_descriptor.rb
@@ -48,8 +48,8 @@ class Chef
def for_json()
{
- 'title' => @title,
- 'sections' => @sections,
+ "title" => @title,
+ "sections" => @sections,
}
end
diff --git a/lib/chef/formatters/error_inspectors.rb b/lib/chef/formatters/error_inspectors.rb
index 418457322d..9221ecda4d 100644
--- a/lib/chef/formatters/error_inspectors.rb
+++ b/lib/chef/formatters/error_inspectors.rb
@@ -1,9 +1,9 @@
-require 'chef/formatters/error_inspectors/node_load_error_inspector'
+require "chef/formatters/error_inspectors/node_load_error_inspector"
require "chef/formatters/error_inspectors/registration_error_inspector"
-require 'chef/formatters/error_inspectors/compile_error_inspector'
-require 'chef/formatters/error_inspectors/resource_failure_inspector'
-require 'chef/formatters/error_inspectors/run_list_expansion_error_inspector'
-require 'chef/formatters/error_inspectors/cookbook_resolve_error_inspector'
+require "chef/formatters/error_inspectors/compile_error_inspector"
+require "chef/formatters/error_inspectors/resource_failure_inspector"
+require "chef/formatters/error_inspectors/run_list_expansion_error_inspector"
+require "chef/formatters/error_inspectors/cookbook_resolve_error_inspector"
require "chef/formatters/error_inspectors/cookbook_sync_error_inspector"
class Chef
diff --git a/lib/chef/formatters/error_inspectors/api_error_formatting.rb b/lib/chef/formatters/error_inspectors/api_error_formatting.rb
index 05ee3132a7..5f2a912a01 100644
--- a/lib/chef/formatters/error_inspectors/api_error_formatting.rb
+++ b/lib/chef/formatters/error_inspectors/api_error_formatting.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'chef/http/authenticator'
+require "chef/http/authenticator"
class Chef
module Formatters
@@ -106,7 +106,7 @@ E
# Parses JSON from the error response sent by Chef Server and returns the
# error message
def format_rest_error
- Array(Chef::JSONCompat.from_json(exception.response.body)["error"]).join('; ')
+ Array(Chef::JSONCompat.from_json(exception.response.body)["error"]).join("; ")
rescue Exception
safe_format_rest_error
end
diff --git a/lib/chef/formatters/error_inspectors/compile_error_inspector.rb b/lib/chef/formatters/error_inspectors/compile_error_inspector.rb
index 621fadce40..1c0cce9dd7 100644
--- a/lib/chef/formatters/error_inspectors/compile_error_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/compile_error_inspector.rb
@@ -74,7 +74,7 @@ class Chef
MESSAGE
- error_description.section("Additional information:", msg.gsub(/^ {6}/, ''))
+ error_description.section("Additional information:", msg.gsub(/^ {6}/, ""))
end
end
diff --git a/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb b/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb
index e011fa9d9b..a1f2c8ce37 100644
--- a/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'chef/formatters/error_inspectors/api_error_formatting'
+require "chef/formatters/error_inspectors/api_error_formatting"
class Chef
module Formatters
diff --git a/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb b/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb
index 971dbd664e..30811a6d24 100644
--- a/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'chef/formatters/error_inspectors/api_error_formatting'
+require "chef/formatters/error_inspectors/api_error_formatting"
class Chef
module Formatters
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 d81a9f7cc8..6371243624 100644
--- a/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'chef/formatters/error_inspectors/api_error_formatting'
+require "chef/formatters/error_inspectors/api_error_formatting"
class Chef
module Formatters
diff --git a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
index dbd23f4a52..312e35adb6 100644
--- a/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/registration_error_inspector.rb
@@ -134,7 +134,7 @@ E
#--
# TODO: this code belongs in Chef::REST
def format_rest_error
- Array(Chef::JSONCompat.from_json(exception.response.body)["error"]).join('; ')
+ Array(Chef::JSONCompat.from_json(exception.response.body)["error"]).join("; ")
rescue Exception
exception.response.body
end
diff --git a/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb b/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb
index 6e4d9322f9..83e22cb410 100644
--- a/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb
@@ -52,7 +52,7 @@ class Chef
end
if Chef::Platform.windows?
- require 'chef/win32/security'
+ require "chef/win32/security"
if !Chef::ReservedNames::Win32::Security.has_admin_privileges?
error_description.section("Missing Windows Admin Privileges", "chef-client doesn't have administrator privileges. This can be a possible reason for the resource failure.")
diff --git a/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb b/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb
index 818228276e..7ba5448227 100644
--- a/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb
+++ b/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'chef/formatters/error_inspectors/api_error_formatting'
+require "chef/formatters/error_inspectors/api_error_formatting"
class Chef
module Formatters
diff --git a/lib/chef/formatters/indentable_output_stream.rb b/lib/chef/formatters/indentable_output_stream.rb
index f7f470b190..e5e84e0f65 100644
--- a/lib/chef/formatters/indentable_output_stream.rb
+++ b/lib/chef/formatters/indentable_output_stream.rb
@@ -19,7 +19,7 @@ class Chef
def highline
@highline ||= begin
- require 'highline'
+ require "highline"
HighLine.new
end
end
@@ -110,7 +110,7 @@ class Chef
def print_string(string, options)
if string.empty?
if options[:end_line]
- print_line('', options)
+ print_line("", options)
end
else
string.lines.each do |line|
@@ -136,7 +136,7 @@ class Chef
def move_to_next_line
if @line_started
- @out.puts ''
+ @out.puts ""
@line_started = false
end
end
@@ -151,11 +151,11 @@ class Chef
if @current_stream != options[:stream]
@out.print "#{(' ' * indent)}[#{options[:name]}] "
else
- @out.print ' ' * (indent + 3 + options[:name].size)
+ @out.print " " * (indent + 3 + options[:name].size)
end
else
# Otherwise, just print indents.
- @out.print ' ' * indent
+ @out.print " " * indent
end
if @current_stream != options[:stream]
diff --git a/lib/chef/formatters/minimal.rb b/lib/chef/formatters/minimal.rb
index 62db517e3e..2e32968b4b 100644
--- a/lib/chef/formatters/minimal.rb
+++ b/lib/chef/formatters/minimal.rb
@@ -1,4 +1,4 @@
-require 'chef/formatters/base'
+require "chef/formatters/base"
class Chef
@@ -130,7 +130,7 @@ class Chef
# Called after a file in a cookbook is loaded.
def file_loaded(path)
- print '.'
+ print "."
end
def file_load_failed(path, exception)