summaryrefslogtreecommitdiff
path: root/lib/chef/event_dispatch
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/event_dispatch
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/event_dispatch')
-rw-r--r--lib/chef/event_dispatch/base.rb4
-rw-r--r--lib/chef/event_dispatch/dispatcher.rb2
-rw-r--r--lib/chef/event_dispatch/dsl.rb1
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/chef/event_dispatch/base.rb b/lib/chef/event_dispatch/base.rb
index 585a3db174..a6a18718c2 100644
--- a/lib/chef/event_dispatch/base.rb
+++ b/lib/chef/event_dispatch/base.rb
@@ -298,7 +298,7 @@ class Chef
#
# Called before action is executed on a resource.
- def resource_action_start(resource, action, notification_type=nil, notifier=nil)
+ def resource_action_start(resource, action, notification_type = nil, notifier = nil)
end
# Called when a resource action has been skipped b/c of a conditional
@@ -381,7 +381,7 @@ class Chef
end
# Emit a message about something being deprecated.
- def deprecation(message, location=caller(2..2)[0])
+ def deprecation(message, location = caller(2..2)[0])
end
def run_list_expanded(run_list_expansion)
diff --git a/lib/chef/event_dispatch/dispatcher.rb b/lib/chef/event_dispatch/dispatcher.rb
index dae2c3f6b4..69419a393b 100644
--- a/lib/chef/event_dispatch/dispatcher.rb
+++ b/lib/chef/event_dispatch/dispatcher.rb
@@ -54,7 +54,7 @@ class Chef
end
# Special case deprecation, since it needs to know its caller
- def deprecation(message, location=caller(2..2)[0])
+ def deprecation(message, location = caller(2..2)[0])
call_subscribers(:deprecation, message, location)
end
end
diff --git a/lib/chef/event_dispatch/dsl.rb b/lib/chef/event_dispatch/dsl.rb
index d370c37fae..999d536fbe 100644
--- a/lib/chef/event_dispatch/dsl.rb
+++ b/lib/chef/event_dispatch/dsl.rb
@@ -55,6 +55,7 @@ class Chef
end
private
+
def validate!(event_type)
all_event_types = (Chef::EventDispatch::Base.instance_methods - Object.instance_methods)
raise Chef::Exceptions::InvalidEventType, "Invalid event type: #{event_type}" unless all_event_types.include?(event_type)