summaryrefslogtreecommitdiff
path: root/lib/chef/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r--lib/chef/resource.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 634d00feef..863d357561 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -209,7 +209,7 @@ class Chef
# actions have been run. This is the default.
# - `immediate`, `immediately`: Will run the action on the other resource
# immediately (before any other action is run).
- # - `immediately_before`: Will run the action on the other resource
+ # - `before`: Will run the action on the other resource
# immediately *before* the action is actually run.
#
# @example Resource by string
@@ -253,11 +253,11 @@ class Chef
notifies_delayed(action, resource)
when 'immediate', 'immediately'
notifies_immediately(action, resource)
- when 'immediately_before'
- notifies_immediately_before(action, resource)
+ when 'before'
+ notifies_before(action, resource)
else
raise ArgumentError, "invalid timing: #{timing} for notifies(#{action}, #{resources.inspect}, #{timing}) resource #{self} "\
- "Valid timings are: :delayed, :immediate, :immediately, :immediately_before"
+ "Valid timings are: :delayed, :immediate, :immediately, :before"
end
end
@@ -281,7 +281,7 @@ class Chef
# actions have been run. This is the default.
# - `immediate`, `immediately`: The action will run immediately following
# the other resource being updated.
- # - `immediately_before`: The action will run immediately before the
+ # - `before`: The action will run immediately before the
# other resource is updated.
#
# @example Resources by string
@@ -1244,7 +1244,7 @@ class Chef
# resolve_resource_reference on each in turn, causing them to
# resolve lazy/forward references.
def resolve_notification_references
- run_context.immediately_before_notifications(self).each { |n|
+ run_context.before_notifications(self).each { |n|
n.resolve_resource_reference(run_context.resource_collection)
}
run_context.immediate_notifications(self).each { |n|
@@ -1256,8 +1256,8 @@ class Chef
end
# Helper for #notifies
- def notifies_immediately_before(action, resource_spec)
- run_context.notifies_immediately_before(Notification.new(resource_spec, action, self))
+ def notifies_before(action, resource_spec)
+ run_context.notifies_before(Notification.new(resource_spec, action, self))
end
# Helper for #notifies
@@ -1355,8 +1355,8 @@ class Chef
"#{declared_type}[#{@name}]"
end
- def immediately_before_notifications
- run_context.immediately_before_notifications(self)
+ def before_notifications
+ run_context.before_notifications(self)
end
def immediate_notifications