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: 544801374847a42ab0ab512bc121415c428bc81b
4
- data.tar.gz: 19aa5f01f32fc051d06b1661d1bc119a7255f61a
3
+ metadata.gz: cee7fec8842e42b01a23019cd389fa0751d078b6
4
+ data.tar.gz: a2d8fa9464e6b25406145c19007ac858edd04c69
5
5
  SHA512:
6
- metadata.gz: 9c543209a6d74af7daf7baa49cd875e5fc960d2517cd7dafbc20058d8210a6e814c933c0c9acc429423ee98c0cd0e29714016a969c8e4fc469224add10f6a459
7
- data.tar.gz: 6cb909419b520262534fd3b6a275013af8c04a878f23f3461dd35caf4916c2a3ee68176a93138ae241dbb670d64a7284eb8793a2f0d2895f5970c2b13ea5baff
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(method)
4
+ def execute_or_speak(method_name)
5
5
  begin
6
- send(method)
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 })
@@ -1,3 +1,3 @@
1
1
  module SlackNotifierWrapper
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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 args.fetch(:message, ""), icon_emoji: @icon_emoji, attachments: [attachments]
18
+ notifier.ping(args.fetch(:message, ""), icon_emoji: @icon_emoji, attachments: [attachments])
19
19
  end
20
20
 
21
21
  def notifier
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_notifier_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - MrPowers