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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15d5c765a0ecab00e3d90bc35416ad048f5702b0
4
- data.tar.gz: fe1250c22499b39b5fc7f108ed5ede76fb7670f5
3
+ metadata.gz: 99cc17d1f2de0315743589c6b7e2daa87628338a
4
+ data.tar.gz: 5cfb5802139e26a4afd30191edcca5b5ddb567a0
5
5
  SHA512:
6
- metadata.gz: 029e116cfa0e6343901f2b18f6ed5ced4d7e1699133f7e8ff3b2959235a694e386272d0aa4ec1c982276a0fe55126d7a8573c9066180e9539e80902f3f01cfd9
7
- data.tar.gz: 4a1189227edc118fa37da1ba4556793c7a8b13b917ea16b7d4ff2cdb17b806dfb7115d247c10efd34c407d1c85f0c31c6e5bf7e94e457dff2454543123089012
6
+ metadata.gz: 5ecbbd29572db20db829f33b8b6cecc4f6274fc13deabf035347e7bc8e2927fee7688a741e00b4d21bf8aa646b57c42a44c9552e3e38ffba05d38f3c336ea788
7
+ data.tar.gz: 57d36d7fb781d01cdf1b07fd42640d73b8ac4e61475117832cea7c51d3fb0bd63a3bb4e608b6fd1ccfc63e6e8e0c0bf734de433d97ad02984ac93090d53ba37f
@@ -1,3 +1,3 @@
1
1
  module SlackWebhooks
2
- VERSION = "0.0.11"
3
- end
2
+ VERSION = "0.2.0"
3
+ end
@@ -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.11
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: 2016-06-18 00:00:00.000000000 Z
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.1
60
+ rubygems_version: 2.5.2
61
61
  signing_key:
62
62
  specification_version: 4
63
63
  summary: Helper for slack webhooks