Commit d0f492f8 authored by Victor Penso's avatar Victor Penso
Browse files

Support multiple notifies/subscribes in a resource

parent 02f78c95
......@@ -4,5 +4,5 @@ maintainer_email ''
license 'Apache 2.0'
description 'Use generic Chef resources by attributes'
long_description, ''))
version '1.3.0'
version '1.4.0'
source_url ''
......@@ -110,9 +110,22 @@ resource_list.each do |resource|
value = value.join("\n") << "\n"
when 'notifies','subscribes','template','not_if','only_if'
when 'template','not_if','only_if'
send(key, *value)
when 'notifies','subscribes'
# nested arrays indicate multiple notifies/subscribes
if value[0].kind_of? Array
# loop over the notifies/subscribes
value.each do |sub_value|
# and send them individually
send(key, *sub_value)
# a single notifies/subscribes
send(key, *value)
# Ignore the following keys...
when 'banner'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment