slack_webhooks 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slack_webhooks/version.rb +1 -1
- data/lib/slack_webhooks.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fad94820f8d3dd81d3760d6328386819e89ceb61
|
4
|
+
data.tar.gz: ce6699c25362df460b38059239a873bab2bbeadc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a91caac4047fb548ea47098ef912132f7695ff21f8d78350f3e323c5e824e5a2e6619485bb3a7d0f4b697cf60470cf0459fadd75581d9e27004a5a98e04b518
|
7
|
+
data.tar.gz: 111aa98b4557a8a414b219a9cbc301fa9a57f1ff7d5b36968e2987b4e687be9008c8083f656bf1b62bef8715eeb26233fd43c21b5501d670f268b5033443b848
|
data/lib/slack_webhooks.rb
CHANGED
@@ -5,7 +5,8 @@ require_relative 'slack_webhooks/version'
|
|
5
5
|
module SlackWebhooks
|
6
6
|
class Hook
|
7
7
|
|
8
|
-
attr_accessor :command, :trigger_word, :channel, :username, :text, :webhook_url,
|
8
|
+
attr_accessor :command, :trigger_word, :channel, :username, :text, :webhook_url,
|
9
|
+
:botname, :icon_url
|
9
10
|
alias_method :user_name, :username
|
10
11
|
|
11
12
|
# botname is the name to post to the channel with.
|
@@ -56,6 +57,10 @@ module SlackWebhooks
|
|
56
57
|
resp = nil
|
57
58
|
attachment = options.delete(:attachment)
|
58
59
|
options[:attachments] = [attachment]
|
60
|
+
if self.icon_url != nil
|
61
|
+
options[:icon_url] = self.icon_url
|
62
|
+
end
|
63
|
+
|
59
64
|
resp = notifier.ping s, options
|
60
65
|
|
61
66
|
p resp
|