summaryrefslogtreecommitdiff
path: root/lib/chef/run_context.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/run_context.rb')
-rw-r--r--lib/chef/run_context.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb
index b725857bc5..6e02f47ff1 100644
--- a/lib/chef/run_context.rb
+++ b/lib/chef/run_context.rb
@@ -104,13 +104,13 @@ class Chef
#
#
- # A Hash containing the immediately_before notifications triggered by resources
+ # A Hash containing the before notifications triggered by resources
# during the converge phase of the chef run.
#
# @return [Hash[String, Array[Chef::Resource::Notification]]] A hash from
# <notifying resource name> => <list of notifications it sent>
#
- attr_reader :immediately_before_notification_collection
+ attr_reader :before_notification_collection
#
# A Hash containing the immediate notifications triggered by resources
@@ -173,22 +173,22 @@ class Chef
def initialize_child_state
@audits = {}
@resource_collection = Chef::ResourceCollection.new
- @immediately_before_notification_collection = Hash.new {|h,k| h[k] = []}
+ @before_notification_collection = Hash.new {|h,k| h[k] = []}
@immediate_notification_collection = Hash.new {|h,k| h[k] = []}
@delayed_notification_collection = Hash.new {|h,k| h[k] = []}
end
#
- # Adds an immediately_before notification to the +immediately_before_notification_collection+.
+ # Adds an before notification to the +before_notification_collection+.
#
# @param [Chef::Resource::Notification] The notification to add.
#
- def notifies_immediately_before(notification)
+ def notifies_before(notification)
nr = notification.notifying_resource
if nr.instance_of?(Chef::Resource)
- immediately_before_notification_collection[nr.name] << notification
+ before_notification_collection[nr.name] << notification
else
- immediately_before_notification_collection[nr.declared_key] << notification
+ before_notification_collection[nr.declared_key] << notification
end
end
@@ -221,18 +221,18 @@ class Chef
end
#
- # Get the list of immediately_before notifications sent by the given resource.
+ # Get the list of before notifications sent by the given resource.
#
# TODO seriously, this is actually wrong. resource.name is not unique,
# you need the type as well.
#
# @return [Array[Notification]]
#
- def immediately_before_notifications(resource)
+ def before_notifications(resource)
if resource.instance_of?(Chef::Resource)
- return immediately_before_notification_collection[resource.name]
+ return before_notification_collection[resource.name]
else
- return immediately_before_notification_collection[resource.declared_key]
+ return before_notification_collection[resource.declared_key]
end
end
@@ -648,13 +648,13 @@ ERROR_MESSAGE
immediate_notification_collection
immediate_notification_collection=
immediate_notifications
- immediately_before_notification_collection
- immediately_before_notifications
+ before_notification_collection
+ before_notifications
include_recipe
initialize_child_state
load_recipe
load_recipe_file
- notifies_immediately_before
+ notifies_before
notifies_immediately
notifies_delayed
parent_run_context