slack_notifier_wrapper 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cee7fec8842e42b01a23019cd389fa0751d078b6
|
4
|
+
data.tar.gz: a2d8fa9464e6b25406145c19007ac858edd04c69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c4780829b49bd34bf1884918579d0e874ba690ec8611255b9eef74e7d33b7390ae94ea2fb41e83c680881432684ef9c34ba93eb713385fc2f07575c2df0fd9
|
7
|
+
data.tar.gz: 4d64040b704474121e54f888de54393ee8bf7f7d44a9676a66f34d3a645e0723dea2090d998f52edaf33945a4f3967d0c802fda053e4c1cf93c7eb7b584c9fce
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module SlackNotifierWrapper
|
2
2
|
module Helpers
|
3
3
|
|
4
|
-
def execute_or_speak(
|
4
|
+
def execute_or_speak(method_name)
|
5
5
|
begin
|
6
|
-
send(
|
6
|
+
send(method_name)
|
7
7
|
rescue Exception => e
|
8
8
|
attachment_message = "#{self.class}##{method_name} failed to execute"
|
9
9
|
SlackNotifierWrapper.speak_attachments({ color: "danger", attachment_message: attachment_message })
|
@@ -10,12 +10,12 @@ module SlackNotifierWrapper
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def speak_attachments(args)
|
13
|
-
{
|
13
|
+
attachments = {
|
14
14
|
text: args.fetch(:attachment_message, ""),
|
15
15
|
color: args.fetch(:color, "good"),
|
16
16
|
mrkdwn_in: ["text"]
|
17
17
|
}
|
18
|
-
notifier.ping
|
18
|
+
notifier.ping(args.fetch(:message, ""), icon_emoji: @icon_emoji, attachments: [attachments])
|
19
19
|
end
|
20
20
|
|
21
21
|
def notifier
|