summaryrefslogtreecommitdiff
path: root/lib/chef/resource.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-04-26 12:03:09 -0700
committerBryan McLellan <btm@opscode.com>2013-05-30 09:06:51 -0700
commit98c4cb1d138ea031cc590263517ab2162a72c070 (patch)
treec63613074ba0220511811296940773b6da278db8 /lib/chef/resource.rb
parentcbec1a861510b4a3d9cb1b29cadfdcc021d578df (diff)
downloadchef-98c4cb1d138ea031cc590263517ab2162a72c070.tar.gz
[CHEF-4135] add eager validation of notification syntax
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r--lib/chef/resource.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index eb8d7bbf05..f335e8eef7 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -404,6 +404,9 @@ F
# could end up with multiple resources.
resources = [ resource_spec ].flatten
resources.each do |resource|
+
+ validate_resource_spec!(resource_spec)
+
case timing.to_s
when 'delayed'
notifies_delayed(action, resource)
@@ -460,6 +463,10 @@ F
true
end
+ def validate_resource_spec!(resource_spec)
+ run_context.resource_collection.validate_lookup_spec!(resource_spec)
+ end
+
def is(*args)
if args.size == 1
args.first