Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHEF
cookbooks
base
Commits
5cebaabe
Commit
5cebaabe
authored
May 26, 2017
by
Victor Penso
Browse files
Support subscribe
parent
b7d7b7c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
recipes/default.rb
View file @
5cebaabe
...
...
@@ -43,10 +43,11 @@
node
[
resource
].
each
do
|
name
,
conf
|
public_send
(
resource
,
name
)
do
conf
.
each
do
|
key
,
value
|
case
key
when
'content'
if
resource
.
eql?
'file'
value
=
"
#
...
...
@@ -57,24 +58,23 @@
#{
value
}
"
end
value
=
value
.
gsub
(
/^ */
,
''
)
value
=
value
.
split
(
"
\n
"
)
value
=
value
[
1
..-
1
]
if
value
[
0
]
=~
/^$/
value
=
value
.
join
(
"
\n
"
)
<<
"
\n
"
send
(
key
,
value
)
when
'notifies'
when
'notifies'
,
'subscribes'
send
(
key
,
*
value
)
else
send
(
key
,
value
)
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment