-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from binford2k/feature/events
Add the ability to respond only to certain events
- Loading branch information
Showing
5 changed files
with
123 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
--- | ||
<% @webhook_hash.sort.each do |key,value| -%> | ||
<% if value != :undef -%> | ||
<%=key-%>: <%= (value.class == TrueClass || value.class == FalseClass ) ? value : "\"#{value}\"" %> | ||
<% if value != :undef and ! value.nil? -%> | ||
<% | ||
value = case value | ||
when TrueClass, FalseClass | ||
value | ||
when Array | ||
value.sort.to_s | ||
else | ||
"\"#{value}\"" | ||
end | ||
-%> | ||
<%=key-%>: <%= value %> | ||
<% end -%> | ||
<% end -%> |