slack_webhooks 0.0.11 → 0.2.0
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 +2 -2
- data/lib/slack_webhooks.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99cc17d1f2de0315743589c6b7e2daa87628338a
|
4
|
+
data.tar.gz: 5cfb5802139e26a4afd30191edcca5b5ddb567a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ecbbd29572db20db829f33b8b6cecc4f6274fc13deabf035347e7bc8e2927fee7688a741e00b4d21bf8aa646b57c42a44c9552e3e38ffba05d38f3c336ea788
|
7
|
+
data.tar.gz: 57d36d7fb781d01cdf1b07fd42640d73b8ac4e61475117832cea7c51d3fb0bd63a3bb4e608b6fd1ccfc63e6e8e0c0bf734de433d97ad02984ac93090d53ba37f
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module SlackWebhooks
|
2
|
-
VERSION = "0.0
|
3
|
-
end
|
2
|
+
VERSION = "0.2.0"
|
3
|
+
end
|
data/lib/slack_webhooks.rb
CHANGED
@@ -14,7 +14,7 @@ module SlackWebhooks
|
|
14
14
|
# botname is the name to post to the channel with.
|
15
15
|
# body is the outgoing webhook POST body that Slack sends.
|
16
16
|
# webhook_url is the incoming webhook to post back to slack.
|
17
|
-
def initialize(botname, body, webhook_url)
|
17
|
+
def initialize(botname, body, webhook_url=nil)
|
18
18
|
self.botname = botname
|
19
19
|
self.webhook_url = webhook_url
|
20
20
|
parsed = URI.decode_www_form(body)
|
@@ -39,6 +39,10 @@ module SlackWebhooks
|
|
39
39
|
self.text = p[1].strip
|
40
40
|
# puts "text=#{text}"
|
41
41
|
end
|
42
|
+
if p[0] == "response_url" && !webhook_url
|
43
|
+
# we get it in the post body with more recent slack apps
|
44
|
+
self.webhook_url = p[1]
|
45
|
+
end
|
42
46
|
end
|
43
47
|
if self.channel == "directmessage"
|
44
48
|
self.channel = self.username
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack_webhooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Reeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slack-notifier
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
57
|
version: 1.3.6
|
58
58
|
requirements: []
|
59
59
|
rubyforge_project:
|
60
|
-
rubygems_version: 2.5.
|
60
|
+
rubygems_version: 2.5.2
|
61
61
|
signing_key:
|
62
62
|
specification_version: 4
|
63
63
|
summary: Helper for slack webhooks
|