summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dslkeywords/notify.rb4
-rw-r--r--lib/dslkeywords/resource.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/dslkeywords/notify.rb b/lib/dslkeywords/notify.rb
index c7d50d9..602d216 100644
--- a/lib/dslkeywords/notify.rb
+++ b/lib/dslkeywords/notify.rb
@@ -20,10 +20,10 @@ module RCM
# Add notify keyword to the DSL
class DSL
- def notify(message, &block)
+ def notify(message = nil, &block)
return unless @conds_met
- n = Notify.new(message)
+ n = Notify.new(message.nil? ? '' : message)
n.message(n.instance_eval(&block)) if block
self << n
n
diff --git a/lib/dslkeywords/resource.rb b/lib/dslkeywords/resource.rb
index 884dec9..c9098d4 100644
--- a/lib/dslkeywords/resource.rb
+++ b/lib/dslkeywords/resource.rb
@@ -19,10 +19,10 @@ module RCM
def [](other) = "#{@name}['#{other}']"
end
- class NoSuchResource < StandardError; end
+ class NoSuchResourceType < StandardError; end
def method_missing(method_name)
- raise NoSuchResource, "No such resource: #{method_name}" unless @valid_resources.include?(method_name)
+ raise NoSuchResourceType, "No such resource type: #{method_name}" unless @valid_resources.include?(method_name)
SyntaxSugar.new(method_name)
end