ruboty-slack_rtm 1.4.0 → 1.5.0

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: 23919e4dac311365e1d4ff201b2e9a909145de27
4
- data.tar.gz: 77b8f3264cac7608b8bf12c0e093a86f29a61683
3
+ metadata.gz: f1090e04cb0f01da553baaca992e576301e0918e
4
+ data.tar.gz: ea0e5070e4e166cacfcf114beb4cae62351d4830
5
5
  SHA512:
6
- metadata.gz: 36869ec11a7b0e7dfb3af3b4c7f36ff541fa6fb6a3d8cf5ef9438b5f9d5b5176152dc67e7ef4dcc4c5eae2ec057967caec6f50df04c7e3719480241f038248d4
7
- data.tar.gz: 179cdde1bb7d9d5c76cfac05621eba14618d13061b15a70ef4c383b1361f192b368b875d0921d13b25d350946cf532b59e239731e9c4c70bc0e580f2f80e2046
6
+ metadata.gz: 1fa3aabae40d573423a644e68b53206f526df35be109b44f5c7cef4e3ec58ffe78abc5e7a7965fb7e568980b11cc8bb0ad249209d1744b344b156c29488abc22
7
+ data.tar.gz: de9b0c893576cbab5bc00da4eb38effcac03c06196bff99c839804182e97d4fd3458bf4b72a2175902e0b0f56128c52c7334a0abb9a15ab17c01d3ac3d36b31e
data/README.md CHANGED
@@ -15,6 +15,7 @@ gem 'ruboty-slack_rtm'
15
15
  - `SLACK_TOKEN`: Account's token. get one on https://api.slack.com/web#basics
16
16
  - `SLACK_EXPOSE_CHANNEL_NAME`: if this set to 1, `message.to` will be channel name instead of id (optional)
17
17
  - `SLACK_IGNORE_GENERAL`: if this set to 1, bot ignores all messages on #general channel (optional)
18
+ - `SLACK_GENERAL_NAME`: Set general channel name if your Slack changes general name (optional)
18
19
 
19
20
  This adapter doesn't require a real user account. Using with bot integration's API token is recommended.
20
21
  See: https://api.slack.com/bot-users
@@ -10,6 +10,7 @@ module Ruboty
10
10
  env :SLACK_TOKEN, "Account's token. get one on https://api.slack.com/web#basics"
11
11
  env :SLACK_EXPOSE_CHANNEL_NAME, "if this set to 1, message.to will be channel name instead of id", optional: true
12
12
  env :SLACK_IGNORE_GENERAL, "if this set to 1, bot ignores all messages on #general channel", optional: true
13
+ env :SLACK_GENERAL_NAME, "Set general channel name if your Slack changes general name", optional: true
13
14
 
14
15
  def run
15
16
  init
@@ -97,7 +98,7 @@ module Ruboty
97
98
  channel = channel_info(data['channel'])
98
99
 
99
100
  if channel
100
- return if channel['name'] == 'general' && ENV['SLACK_IGNORE_GENERAL'] == '1'
101
+ return if channel['name'] == (ENV['SLACK_GENERAL_NAME'] || 'general') && ENV['SLACK_IGNORE_GENERAL'] == '1'
101
102
 
102
103
  channel_to = expose_channel_name? ? "##{channel['name']}" : channel['id']
103
104
  else # direct message
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module SlackRTM
3
- VERSION = '1.4.0'
3
+ VERSION = '1.5.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-slack_rtm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Kusano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-06 00:00:00.000000000 Z
11
+ date: 2015-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler