summaryrefslogtreecommitdiff
path: root/lib/chef/application/windows_service.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
commit686113531d23f30e9973d659c456ae33eb9cff1f (patch)
treef225de7251a8b49b8d183dd168bab0a0addbe23f /lib/chef/application/windows_service.rb
parentd1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff)
downloadchef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
Diffstat (limited to 'lib/chef/application/windows_service.rb')
-rw-r--r--lib/chef/application/windows_service.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb
index 0032114136..b955dd31b8 100644
--- a/lib/chef/application/windows_service.rb
+++ b/lib/chef/application/windows_service.rb
@@ -187,12 +187,12 @@ class Chef
Chef::Log.info "Starting chef-client in a new process"
# Pass config params to the new process
config_params = " --no-fork"
- config_params += " -c #{Chef::Config[:config_file]}" unless Chef::Config[:config_file].nil?
+ config_params += " -c #{Chef::Config[:config_file]}" unless Chef::Config[:config_file].nil?
# log_location might be an event logger and if so we cannot pass as a command argument
# but shed no tears! If the logger is an event logger, it must have been configured
# as such in the config file and chef-client will use that when no arg is passed here
config_params += " -L #{resolve_log_location}" if resolve_log_location.is_a?(String)
-
+
# Starts a new process and waits till the process exits
result = shell_out(
@@ -204,8 +204,8 @@ class Chef
Chef::Log.debug "#{result.stderr}"
rescue Mixlib::ShellOut::CommandTimeout => e
Chef::Log.error "chef-client timed out\n(#{e})"
- Chef::Log.error(<<-EOF)
- Your chef-client run timed out. You can increase the time chef-client is given
+ Chef::Log.error(<<-EOF)
+ Your chef-client run timed out. You can increase the time chef-client is given
to complete by configuring windows_service.watchdog_timeout in your client.rb.
EOF
rescue Mixlib::ShellOut::ShellCommandFailed => e
@@ -225,12 +225,12 @@ class Chef
# Lifted from Chef::Application, with addition of optional startup parameters
# for playing nicely with Windows Services
- def reconfigure(startup_parameters=[])
+ def reconfigure(startup_parameters = [])
configure_chef startup_parameters
configure_logging
Chef::Config[:chef_server_url] = config[:chef_server_url] if config.has_key? :chef_server_url
- unless Chef::Config[:exception_handlers].any? {|h| Chef::Handler::ErrorReport === h}
+ unless Chef::Config[:exception_handlers].any? { |h| Chef::Handler::ErrorReport === h }
Chef::Config[:exception_handlers] << Chef::Handler::ErrorReport.new
end
@@ -251,7 +251,7 @@ class Chef
def configure_stdout_logger
stdout_logger = MonoLogger.new(STDOUT)
stdout_logger.formatter = Chef::Log.logger.formatter
- Chef::Log.loggers << stdout_logger
+ Chef::Log.loggers << stdout_logger
end
# Based on config and whether or not STDOUT is a tty, should we setup a
@@ -334,5 +334,5 @@ end
# To run this file as a service, it must be called as a script from within
# the Windows Service framework. In that case, kick off the main loop!
if __FILE__ == $0
- Chef::Application::WindowsService.mainloop
+ Chef::Application::WindowsService.mainloop
end