slack-ruby-bot 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +21 -5
- data/CHANGELOG.md +32 -27
- data/CONTRIBUTING.md +5 -5
- data/Dangerfile +1 -0
- data/Gemfile +2 -0
- data/README.md +27 -18
- data/RELEASING.md +1 -1
- data/TUTORIAL.md +1 -1
- data/UPGRADING.md +12 -2
- data/lib/config/boot.rb +0 -1
- data/lib/initializers/giphy.rb +7 -4
- data/lib/slack-ruby-bot/about.rb +1 -1
- data/lib/slack-ruby-bot/client.rb +4 -3
- data/lib/slack-ruby-bot/commands/help.rb +1 -1
- data/lib/slack-ruby-bot/config.rb +2 -1
- data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_error.rb +2 -2
- data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb +2 -2
- data/lib/slack-ruby-bot/rspec/support/slack_ruby_bot_configure.rb +4 -0
- data/lib/slack-ruby-bot/server.rb +1 -1
- data/lib/slack-ruby-bot/version.rb +1 -1
- data/slack-ruby-bot.gemspec +1 -2
- data/spec/slack-ruby-bot/client_spec.rb +41 -0
- data/spec/slack-ruby-bot/commands/empty_text_spec.rb +0 -1
- data/spec/slack-ruby-bot/commands/help_spec.rb +1 -1
- data/spec/slack-ruby-bot/commands/message_loop_spec.rb +2 -11
- data/spec/slack-ruby-bot/commands/nil_message_spec.rb +0 -1
- data/spec/slack-ruby-bot/commands/send_gif_spec.rb +2 -1
- data/spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb +8 -38
- data/spec/slack-ruby-bot/config_spec.rb +43 -37
- data/spec/slack-ruby-bot/hooks/message_spec.rb +0 -6
- data/spec/slack-ruby-bot/server_spec.rb +29 -21
- metadata +7 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d81a287c11826ef682f08066d61ea77084f30fac
|
4
|
+
data.tar.gz: ad1bca7b36da88557f9ee1b50acb1f4f929073a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd33b6f5f6e5121d88fb74a24525ce792002e4cb1cf16b4ad36ed242f75df6cfcf7ed055899e61b1d9a2d8a9cdd58d3c85ec41f5894df3cc6dca20c7056dc1f
|
7
|
+
data.tar.gz: 855abd25109430b68e93a7bd1d3f21fc7f5ae54919ea0419a22ce5ecf6624ea35b9eaeed504babc368128077b72df1bbe09216930e971cbcdeb60f5a032f4a57
|
data/.travis.yml
CHANGED
@@ -1,6 +1,22 @@
|
|
1
|
-
|
2
|
-
- 2.3.0
|
3
|
-
env:
|
4
|
-
- CONCURRENCY=celluloid-io
|
5
|
-
- CONCURRENCY=faye-websocket
|
1
|
+
language: ruby
|
6
2
|
|
3
|
+
cache: bundler
|
4
|
+
|
5
|
+
matrix:
|
6
|
+
include:
|
7
|
+
- rvm: 2.3.0
|
8
|
+
script:
|
9
|
+
- bundle exec danger
|
10
|
+
- rvm: 2.3.0
|
11
|
+
env: CONCURRENCY=celluloid-io
|
12
|
+
- rvm: 2.3.0
|
13
|
+
env: CONCURRENCY=faye-websocket
|
14
|
+
- rvm: 2.3.0
|
15
|
+
env: CONCURRENCY=celluloid-io WITH_GIPHY=true
|
16
|
+
- rvm: 2.3.0
|
17
|
+
env: CONCURRENCY=faye-websocket WITH_GIPHY=true
|
18
|
+
- rvm: ruby-head
|
19
|
+
- rvm: jruby-head
|
20
|
+
allow_failures:
|
21
|
+
- rvm: ruby-head
|
22
|
+
- rvm: jruby-head
|
data/CHANGELOG.md
CHANGED
@@ -1,19 +1,24 @@
|
|
1
|
+
### 0.9.0 (8/29/2016)
|
2
|
+
|
3
|
+
* [#89](https://github.com/slack-ruby/slack-ruby-bot/pull/89): Drop giphy dependency - [@tmsrjs](https://github.com/tmsrjs).
|
4
|
+
* [#92](https://github.com/slack-ruby/slack-ruby-bot/pull/92): Added [danger](http://danger.systems), PR linting - [@dblock](https://github.com/dblock).
|
5
|
+
|
1
6
|
### 0.8.2 (7/10/2016)
|
2
7
|
|
3
|
-
* [#85](https://github.com/
|
8
|
+
* [#85](https://github.com/slack-ruby/slack-ruby-bot/issues/85): Fix: regression in bot instance logging - [@dblock](https://github.com/dblock).
|
4
9
|
|
5
10
|
### 0.8.1 (7/10/2016)
|
6
11
|
|
7
|
-
* [#69](https://github.com/
|
8
|
-
* [#75](https://github.com/
|
9
|
-
* [#76](https://github.com/
|
10
|
-
* [#81](https://github.com/
|
11
|
-
* [#84](https://github.com/
|
12
|
+
* [#69](https://github.com/slack-ruby/slack-ruby-bot/pull/69): Ability to add help info to bot and commands - [@accessd](https://github.com/accessd).
|
13
|
+
* [#75](https://github.com/slack-ruby/slack-ruby-bot/issues/75): Guarantee order of command evaluation - [@dblock](https://github.com/dblock).
|
14
|
+
* [#76](https://github.com/slack-ruby/slack-ruby-bot/issues/76): Infinity error when app disabled - [@slayershadow](https://github.com/SlayerShadow).
|
15
|
+
* [#81](https://github.com/slack-ruby/slack-ruby-bot/pull/81): Removed dependency on Bundler - [@derekddecker](https://github.com/derekddecker).
|
16
|
+
* [#84](https://github.com/slack-ruby/slack-ruby-bot/pull/84): Removed dependency on ActiveSupport - [@rmulligan](https://github.com/rmulligan).
|
12
17
|
|
13
18
|
### 0.8.0 (5/5/2016)
|
14
19
|
|
15
|
-
* [#32](https://github.com/
|
16
|
-
* [#54](https://github.com/
|
20
|
+
* [#32](https://github.com/slack-ruby/slack-ruby-bot/issues/32): Don't include `faye-websocket` by default, support `celluloid-io` - [@dblock](https://github.com/dblock).
|
21
|
+
* [#54](https://github.com/slack-ruby/slack-ruby-bot/pull/54): Improvements to Hook configuration - [@dramalho](https://github.com/dramalho).
|
17
22
|
|
18
23
|
### 0.7.0 (3/6/2016)
|
19
24
|
|
@@ -23,12 +28,12 @@
|
|
23
28
|
|
24
29
|
### 0.6.2 (2/4/2016)
|
25
30
|
|
26
|
-
* [#44](https://github.com/
|
31
|
+
* [#44](https://github.com/slack-ruby/slack-ruby-bot/pull/44): Bot graceful shutdown - [@accessd](https://github.com/accessd).
|
27
32
|
|
28
33
|
### 0.6.1 (1/29/2016)
|
29
34
|
|
30
|
-
* [#43](https://github.com/
|
31
|
-
* [#40](https://github.com/
|
35
|
+
* [#43](https://github.com/slack-ruby/slack-ruby-bot/issues/43): Issuing a `bot` command terminates bot - [@dblock](https://github.com/dblock).
|
36
|
+
* [#40](https://github.com/slack-ruby/slack-ruby-bot/pull/40): Added `SlackRubyBot::Config.reset!` - [@accessd](https://github.com/accessd).
|
32
37
|
|
33
38
|
### 0.6.0 (1/9/2016)
|
34
39
|
|
@@ -44,7 +49,7 @@
|
|
44
49
|
|
45
50
|
### 0.5.3 (12/28/2015)
|
46
51
|
|
47
|
-
* [#36](https://github.com/
|
52
|
+
* [#36](https://github.com/slack-ruby/slack-ruby-bot/issues/36): Fix: non-English bot aliases now work - [@dblock](https://github.com/dblock).
|
48
53
|
|
49
54
|
### 0.5.2 (12/26/2015)
|
50
55
|
|
@@ -53,7 +58,7 @@
|
|
53
58
|
### 0.5.1 (12/23/2015)
|
54
59
|
|
55
60
|
* Fix: restart sync vs. async - [@dblock](https://github.com/dblock).
|
56
|
-
* [#33](https://github.com/
|
61
|
+
* [#33](https://github.com/slack-ruby/slack-ruby-bot/pull/33): `SlackRubyBot::App.instance` now creates an instance of the class on which it is called - [@dmvt](https://github.com/dmvt).
|
57
62
|
|
58
63
|
### 0.5.0 (12/7/2015)
|
59
64
|
|
@@ -63,29 +68,29 @@
|
|
63
68
|
* Extracted `SlackRubyBot::Server` from `SlackRubyBot::App` - [@dblock](https://github.com/dblock).
|
64
69
|
* Fix: explicitly require 'giphy' - [@dblock](https://github.com/dblock).
|
65
70
|
* Fix: undefined method `stop` for `Slack::RealTime::Client` - [@dblock](https://github.com/dblock).
|
66
|
-
* [#29](https://github.com/
|
67
|
-
* [#30](https://github.com/
|
71
|
+
* [#29](https://github.com/slack-ruby/slack-ruby-bot/pull/29): Fixed bot failing to correctly respond to unknown commands when queried with format `@botname` - [@crayment](https://github.com/crayment).
|
72
|
+
* [#30](https://github.com/slack-ruby/slack-ruby-bot/pull/30): Fix RegexpError when parsing command - [@kuboshizuma](https://github.com/kuboshizuma).
|
68
73
|
|
69
74
|
### 0.4.5 (10/29/2015)
|
70
75
|
|
71
|
-
* [#23](https://github.com/
|
72
|
-
* [#22](https://github.com/
|
76
|
+
* [#23](https://github.com/slack-ruby/slack-ruby-bot/pull/23): Fixed `match` that forced bot name into the expression being evaluated - [@dblock](https://github.com/dblock).
|
77
|
+
* [#22](https://github.com/slack-ruby/slack-ruby-bot/issues/22), [slack-ruby-client#17](https://github.com/slack-ruby/slack-ruby-client/issues/17): Do not respond to messages from self, override with `allow_message_loops` - [@dblock](https://github.com/dblock).
|
73
78
|
|
74
79
|
### 0.4.4 (10/5/2015)
|
75
80
|
|
76
|
-
* [#17](https://github.com/
|
77
|
-
* [#19](https://github.com/
|
78
|
-
* [#3](https://github.com/
|
81
|
+
* [#17](https://github.com/slack-ruby/slack-ruby-bot/issues/17): Address bot by `name:` - [@dblock](https://github.com/dblock).
|
82
|
+
* [#19](https://github.com/slack-ruby/slack-ruby-bot/issues/19): Retry on `Faraday::Error::TimeoutError`, `TimeoutError` and `SSLError` - [@dblock](https://github.com/dblock).
|
83
|
+
* [#3](https://github.com/slack-ruby/slack-ruby-bot/issues/3): Retry on `migration_in_progress` errors during `rtm.start` - [@dblock](https://github.com/dblock).
|
79
84
|
* Respond to direct messages without being addressed by name - [@dblock](https://github.com/dblock).
|
80
85
|
* Added `send_gif`, to allow GIFs to be sent without text - [@maclover7](https://github.com/maclover7).
|
81
86
|
|
82
87
|
### 0.4.3 (8/21/2015)
|
83
88
|
|
84
|
-
* [#13](https://github.com/
|
89
|
+
* [#13](https://github.com/slack-ruby/slack-ruby-bot/issues/13): You can now address the bot by its Slack @id - [@dblock](https://github.com/dblock).
|
85
90
|
|
86
91
|
### 0.4.2 (8/20/2015)
|
87
92
|
|
88
|
-
* [#12](https://github.com/
|
93
|
+
* [#12](https://github.com/slack-ruby/slack-ruby-bot/issues/12): Added support for bot aliases - [@dblock](https://github.com/dblock).
|
89
94
|
|
90
95
|
### 0.4.1 (7/25/2015)
|
91
96
|
|
@@ -93,18 +98,18 @@
|
|
93
98
|
|
94
99
|
### 0.4.0 (7/25/2015)
|
95
100
|
|
96
|
-
* Using [slack-ruby-client](https://github.com/
|
101
|
+
* Using [slack-ruby-client](https://github.com/slack-ruby/slack-ruby-client) - [@dblock](https://github.com/dblock).
|
97
102
|
* Use RealTime API to post messages - [@dblock](https://github.com/dblock).
|
98
103
|
|
99
104
|
### 0.3.1 (7/21/2015)
|
100
105
|
|
101
|
-
* [#8](https://github.com/
|
106
|
+
* [#8](https://github.com/slack-ruby/slack-ruby-bot/issues/8): Fix: `undefined method 'strip!' for nil:NilClass` on nil message - [@dblock](https://github.com/dblock).
|
102
107
|
|
103
108
|
### 0.3.0 (7/19/2015)
|
104
109
|
|
105
|
-
* [#5](https://github.com/
|
106
|
-
* [#6](https://github.com/
|
107
|
-
* [#4](https://github.com/
|
110
|
+
* [#5](https://github.com/slack-ruby/slack-ruby-bot/issues/5): Added support for free-formed routes via `match` - [@dblock](https://github.com/dblock).
|
111
|
+
* [#6](https://github.com/slack-ruby/slack-ruby-bot/issues/6): Commands and operators take blocks - [@dblock](https://github.com/dblock).
|
112
|
+
* [#4](https://github.com/slack-ruby/slack-ruby-bot/issues/4): Messages are posted with `as_user: true` by default - [@dblock](https://github.com/dblock).
|
108
113
|
|
109
114
|
### 0.2.0 (7/10/2015)
|
110
115
|
|
data/CONTRIBUTING.md
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# Contributing to SlackRubyBot
|
2
2
|
|
3
|
-
This project is work of [many contributors](https://github.com/
|
3
|
+
This project is work of [many contributors](https://github.com/slack-ruby/slack-ruby-bot/graphs/contributors).
|
4
4
|
|
5
|
-
You're encouraged to submit [pull requests](https://github.com/
|
5
|
+
You're encouraged to submit [pull requests](https://github.com/slack-ruby/slack-ruby-bot/pulls), [propose features and discuss issues](https://github.com/slack-ruby/slack-ruby-bot/issues).
|
6
6
|
|
7
7
|
In the examples below, substitute your Github username for `contributor` in URLs.
|
8
8
|
|
9
9
|
## Fork the Project
|
10
10
|
|
11
|
-
Fork the [project on Github](https://github.com/
|
11
|
+
Fork the [project on Github](https://github.com/slack-ruby/slack-ruby-bot) and check out your copy.
|
12
12
|
|
13
13
|
```
|
14
14
|
git clone https://github.com/contributor/slack-ruby-bot.git
|
15
15
|
cd slack-ruby-bot
|
16
|
-
git remote add upstream https://github.com/
|
16
|
+
git remote add upstream https://github.com/slack-ruby/slack-ruby-bot.git
|
17
17
|
```
|
18
18
|
|
19
19
|
## Bundle Install and Test
|
@@ -116,7 +116,7 @@ git push origin my-feature-branch -f
|
|
116
116
|
Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.
|
117
117
|
|
118
118
|
```
|
119
|
-
* [#123](https://github.com/
|
119
|
+
* [#123](https://github.com/slack-ruby/slack-ruby-bot/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
|
120
120
|
```
|
121
121
|
|
122
122
|
Amend your previous commit and force push the changes.
|
data/Dangerfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# inherits from https://github.com/slack-ruby/danger
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,10 +2,10 @@ Slack-Ruby-Bot
|
|
2
2
|
==============
|
3
3
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/slack-ruby-bot.svg)](http://badge.fury.io/rb/slack-ruby-bot)
|
5
|
-
[![Build Status](https://travis-ci.org/
|
6
|
-
[![Code Climate](https://codeclimate.com/github/
|
5
|
+
[![Build Status](https://travis-ci.org/slack-ruby/slack-ruby-bot.svg)](https://travis-ci.org/slack-ruby/slack-ruby-bot)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/slack-ruby/slack-ruby-bot/badges/gpa.svg)](https://codeclimate.com/github/slack-ruby/slack-ruby-bot)
|
7
7
|
|
8
|
-
A generic Slack bot framework written in Ruby on top of [slack-ruby-client](https://github.com/
|
8
|
+
A generic Slack bot framework written in Ruby on top of [slack-ruby-client](https://github.com/slack-ruby/slack-ruby-client). This library does all the heavy lifting, such as message parsing, so you can focus on implementing slack bot commands. It also attempts to introduce the bare minimum number of requirements or any sorts of limitations. It's a Slack bot boilerplate.
|
9
9
|
|
10
10
|
If you are not familiar with Slack bots or Slack API concepts, you might want to watch [this video](http://code.dblock.org/2016/03/11/your-first-slack-bot-service-video.html).
|
11
11
|
|
@@ -13,8 +13,8 @@ If you are not familiar with Slack bots or Slack API concepts, you might want to
|
|
13
13
|
|
14
14
|
## Useful to Me?
|
15
15
|
|
16
|
-
* If you are just trying to send messages to Slack, use [slack-ruby-client](https://github.com/
|
17
|
-
* If you're trying to roll out a full service with Slack button integration, check out [slack-ruby-bot-server](https://github.com/
|
16
|
+
* If you are just trying to send messages to Slack, use [slack-ruby-client](https://github.com/slack-ruby/slack-ruby-client), which this library is built on top of.
|
17
|
+
* If you're trying to roll out a full service with Slack button integration, check out [slack-ruby-bot-server](https://github.com/slack-ruby/slack-ruby-bot-server), which uses this library.
|
18
18
|
* Otherwise, this piece of the puzzle will help you create a single bot instance for one team.
|
19
19
|
|
20
20
|
## Stable Release
|
@@ -132,7 +132,7 @@ You can also capture multiple matchers with `scan`.
|
|
132
132
|
|
133
133
|
```ruby
|
134
134
|
class Market < SlackRubyBot::Bot
|
135
|
-
scan(/(
|
135
|
+
scan(/([A-Z]{2,5})/) do |client, data, stocks|
|
136
136
|
# lookup stock market price
|
137
137
|
end
|
138
138
|
end
|
@@ -210,11 +210,30 @@ class Phone < SlackRubyBot::Commands::Base
|
|
210
210
|
end
|
211
211
|
```
|
212
212
|
|
213
|
+
### Animated GIFs
|
214
|
+
|
213
215
|
The `SlackRubyBot::Client` implementation comes with GIF support.
|
216
|
+
To enable it simply add `gem 'giphy'` to your **Gemfile**.
|
217
|
+
**Note:** Bots send animated GIFs in default commands and errors.
|
218
|
+
|
219
|
+
```ruby
|
220
|
+
class Phone < SlackRubyBot::Commands::Base
|
221
|
+
command 'call'
|
214
222
|
|
215
|
-
|
223
|
+
def self.call(client, data, match)
|
224
|
+
client.say(channel: data.channel, text: 'called', gif: 'phone')
|
225
|
+
# Sends the text 'called' and a random GIF that matches the keyword 'phone'.
|
226
|
+
end
|
227
|
+
end
|
228
|
+
```
|
216
229
|
|
217
|
-
|
230
|
+
If you use giphy for something else but don't want your bots to send GIFs you can set `ENV['SLACK_RUBY_BOT_SEND_GIFS']` or `SlackRubyBot::Config.send_gifs` to `false`. The latter takes precedence.
|
231
|
+
|
232
|
+
```ruby
|
233
|
+
SlackRubyBot.configure do |config|
|
234
|
+
config.send_gifs = false
|
235
|
+
end
|
236
|
+
```
|
218
237
|
|
219
238
|
### Built-In Commands
|
220
239
|
|
@@ -291,16 +310,6 @@ These will get pushed into the hook set on initialization.
|
|
291
310
|
|
292
311
|
Either by configuration, explicit assignment or hook blocks, multiple handlers can exist for the same event type.
|
293
312
|
|
294
|
-
### Disable Animated GIFs
|
295
|
-
|
296
|
-
By default bots send animated GIFs in default commands and errors. To disable animated GIFs set `send_gifs` or `ENV['SLACK_RUBY_BOT_SEND_GIFS']` to `false`.
|
297
|
-
|
298
|
-
```ruby
|
299
|
-
SlackRubyBot.configure do |config|
|
300
|
-
config.send_gifs = false
|
301
|
-
end
|
302
|
-
```
|
303
|
-
|
304
313
|
### Message Loop Protection
|
305
314
|
|
306
315
|
By default bots do not respond to their own messages. If you wish to change that behavior, set `allow_message_loops` to `true`.
|
data/RELEASING.md
CHANGED
@@ -11,7 +11,7 @@ bundle install
|
|
11
11
|
rake
|
12
12
|
```
|
13
13
|
|
14
|
-
Check that the last build succeeded in [Travis CI](https://travis-ci.org/
|
14
|
+
Check that the last build succeeded in [Travis CI](https://travis-ci.org/slack-ruby/slack-ruby-bot) for all supported platforms.
|
15
15
|
|
16
16
|
Increment the version, modify [lib/slack-ruby-bot/version.rb](lib/slack-ruby-bot/version.rb).
|
17
17
|
|
data/TUTORIAL.md
CHANGED
@@ -10,7 +10,7 @@ A typical production Slack bot is a combination of a vanilla web server and a we
|
|
10
10
|
|
11
11
|
#### Gemfile
|
12
12
|
|
13
|
-
Create a `Gemfile` that uses [slack-ruby-bot](https://github.com/
|
13
|
+
Create a `Gemfile` that uses [slack-ruby-bot](https://github.com/slack-ruby/slack-ruby-bot), [sinatra](https://github.com/sinatra/sinatra) (a web framework) and [puma](https://github.com/puma/puma) (a web server). For development we'll also use [foreman](https://github.com/theforeman/foreman) and write tests with [rspec](https://github.com/rspec/rspec).
|
14
14
|
|
15
15
|
```ruby
|
16
16
|
source 'http://rubygems.org'
|
data/UPGRADING.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Upgrading SlackRubyBot
|
2
2
|
======================
|
3
3
|
|
4
|
+
### Upgrading to >= 0.9.0
|
5
|
+
|
6
|
+
#### Add giphy to your Gemfile for GIF support
|
7
|
+
|
8
|
+
The dependency on the `giphy` gem was dropped and GIFs don't appear by default. If you want GIF support, add `gem 'giphy'` to your **Gemfile**.
|
9
|
+
|
10
|
+
You should not need to make any changes if you had already disabled GIFs for your bot.
|
11
|
+
|
12
|
+
See [#89](https://github.com/slack-ruby/slack-ruby-bot/pull/89) for more information.
|
13
|
+
|
4
14
|
### Upgrading to >= 0.8.0
|
5
15
|
|
6
16
|
#### Require a concurrency library
|
@@ -23,7 +33,7 @@ The regular expression parser for commands will now include a `nil` value for `e
|
|
23
33
|
|
24
34
|
#### Remove any bot.auth! calls
|
25
35
|
|
26
|
-
SlackRubyBot 0.6.x versions invoked a method called `auth!`, which caused a pre-flight authentication via Slack Web API `auth_test` method and collected a number of properties, such as client and team ID or name. This method has been removed in favor of using data available in the `Slack::RealTime::Client` local store introduced in [slack-ruby-client#54](https://github.com/
|
36
|
+
SlackRubyBot 0.6.x versions invoked a method called `auth!`, which caused a pre-flight authentication via Slack Web API `auth_test` method and collected a number of properties, such as client and team ID or name. This method has been removed in favor of using data available in the `Slack::RealTime::Client` local store introduced in [slack-ruby-client#54](https://github.com/slack-ruby/slack-ruby-client/issues/54). Remove any explicit calls to this method.
|
27
37
|
|
28
38
|
### Upgrading to >= 0.6.0
|
29
39
|
|
@@ -132,7 +142,7 @@ Bot.run
|
|
132
142
|
|
133
143
|
### Upgrading to >= 0.4.0
|
134
144
|
|
135
|
-
This version uses [slack-ruby-client](https://github.com/
|
145
|
+
This version uses [slack-ruby-client](https://github.com/slack-ruby/slack-ruby-client) instead of [slack-ruby-gem](https://github.com/aki017/slack-ruby-gem).
|
136
146
|
|
137
147
|
The command interface now takes a `client` parameter, which is the RealTime Messaging API instance. Add the new parameter to all `call` calls in classes that inherit from `SlackRubyBot::Commands::Base`.
|
138
148
|
|
data/lib/config/boot.rb
CHANGED
data/lib/initializers/giphy.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
begin
|
2
|
+
require 'giphy'
|
3
|
+
rescue LoadError
|
4
|
+
else
|
5
|
+
Giphy::Configuration.configure do |config|
|
6
|
+
config.api_key = ENV['GIPHY_API_KEY'] || 'dc6zaTOxFJmzC' # from https://github.com/Giphy/GiphyAPI
|
7
|
+
end
|
5
8
|
end
|
data/lib/slack-ruby-bot/about.rb
CHANGED
@@ -7,7 +7,7 @@ module SlackRubyBot
|
|
7
7
|
def initialize(attrs = {})
|
8
8
|
super(attrs)
|
9
9
|
@aliases = attrs[:aliases]
|
10
|
-
@send_gifs = attrs
|
10
|
+
@send_gifs = attrs[:send_gifs]
|
11
11
|
end
|
12
12
|
|
13
13
|
def names
|
@@ -30,7 +30,8 @@ module SlackRubyBot
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def send_gifs?
|
33
|
-
|
33
|
+
return false unless defined?(Giphy)
|
34
|
+
send_gifs.nil? ? SlackRubyBot::Config.send_gifs? : send_gifs
|
34
35
|
end
|
35
36
|
|
36
37
|
def name
|
@@ -52,7 +53,7 @@ module SlackRubyBot
|
|
52
53
|
rescue StandardError => e
|
53
54
|
logger.warn "Giphy.random: #{e.message}"
|
54
55
|
nil
|
55
|
-
end if
|
56
|
+
end if keywords && send_gifs?
|
56
57
|
text = [text, gif && gif.image_url.to_s].compact.join("\n")
|
57
58
|
message({ text: text }.merge(options))
|
58
59
|
end
|
@@ -32,7 +32,7 @@ module SlackRubyBot
|
|
32
32
|
|
33
33
|
For getting description of the command use: *help <command>*
|
34
34
|
|
35
|
-
For more information see https://github.com/
|
35
|
+
For more information see https://github.com/slack-ruby/slack-ruby-bot, please.
|
36
36
|
TEXT
|
37
37
|
end
|
38
38
|
end
|
@@ -2,8 +2,6 @@ require 'rspec/expectations'
|
|
2
2
|
|
3
3
|
RSpec::Matchers.define :respond_with_error do |error, error_message|
|
4
4
|
match do |actual|
|
5
|
-
allow(Giphy).to receive(:random)
|
6
|
-
|
7
5
|
client = if respond_to?(:client)
|
8
6
|
send(:client)
|
9
7
|
else
|
@@ -13,6 +11,8 @@ RSpec::Matchers.define :respond_with_error do |error, error_message|
|
|
13
11
|
message_command = SlackRubyBot::Hooks::Message.new
|
14
12
|
channel, user, message = parse(actual)
|
15
13
|
|
14
|
+
allow(Giphy).to receive(:random) if defined?(Giphy)
|
15
|
+
|
16
16
|
begin
|
17
17
|
expect do
|
18
18
|
message_command.call(client, Hashie::Mash.new(text: message, channel: channel, user: user))
|
@@ -9,9 +9,9 @@ RSpec::Matchers.define :respond_with_slack_message do |expected|
|
|
9
9
|
end
|
10
10
|
|
11
11
|
message_command = SlackRubyBot::Hooks::Message.new
|
12
|
-
|
13
12
|
channel, user, message = parse(actual)
|
14
|
-
|
13
|
+
|
14
|
+
allow(Giphy).to receive(:random) if defined?(Giphy)
|
15
15
|
|
16
16
|
expect(client).to receive(:message).with(channel: channel, text: expected)
|
17
17
|
message_command.call(client, Hashie::Mash.new(text: message, channel: channel, user: user))
|
@@ -11,7 +11,7 @@ module SlackRubyBot
|
|
11
11
|
def initialize(options = {})
|
12
12
|
@token = options[:token]
|
13
13
|
@aliases = options[:aliases]
|
14
|
-
@send_gifs = options
|
14
|
+
@send_gifs = options[:send_gifs]
|
15
15
|
|
16
16
|
# Hook Handling
|
17
17
|
flush_hook_blocks
|
data/slack-ruby-bot.gemspec
CHANGED
@@ -11,12 +11,11 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.files = `git ls-files`.split("\n")
|
12
12
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
13
13
|
s.require_paths = ['lib']
|
14
|
-
s.homepage = 'https://github.com/
|
14
|
+
s.homepage = 'https://github.com/slack-ruby/slack-ruby-bot'
|
15
15
|
s.licenses = ['MIT']
|
16
16
|
s.summary = 'The easiest way to write a Slack bot in Ruby.'
|
17
17
|
s.add_dependency 'hashie'
|
18
18
|
s.add_dependency 'slack-ruby-client', '>= 0.6.0'
|
19
|
-
s.add_dependency 'giphy', '~> 2.0.2'
|
20
19
|
s.add_development_dependency 'rake'
|
21
20
|
s.add_development_dependency 'rspec'
|
22
21
|
s.add_development_dependency 'rack-test'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe SlackRubyBot::Client do
|
4
|
+
describe '#send_gifs?' do
|
5
|
+
context 'without giphy is false', unless: ENV.key?('WITH_GIPHY') do
|
6
|
+
it 'by default' do
|
7
|
+
expect(subject.send_gifs?).to be false
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'when set to true' do
|
11
|
+
subject.send_gifs = true
|
12
|
+
expect(subject.send_gifs?).to be false
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'when set to true via config' do
|
16
|
+
SlackRubyBot::Config.send_gifs = true
|
17
|
+
expect(SlackRubyBot::Config.send_gifs?).to be false
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'with giphy', if: ENV.key?('WITH_GIPHY') do
|
22
|
+
it 'default is true' do
|
23
|
+
expect(subject.send_gifs?).to be true
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'defaults to SlackRubyBot::Config.send_gifs? if set' do
|
27
|
+
SlackRubyBot::Config.send_gifs = false
|
28
|
+
expect(subject.send_gifs?).to be false
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'client setting takes precedence' do
|
32
|
+
SlackRubyBot::Config.send_gifs = true
|
33
|
+
subject.send_gifs = false
|
34
|
+
expect(subject.send_gifs?).to be false
|
35
|
+
SlackRubyBot::Config.send_gifs = false
|
36
|
+
subject.send_gifs = true
|
37
|
+
expect(subject.send_gifs?).to be true
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -20,7 +20,7 @@ describe SlackRubyBot::Commands::Help do
|
|
20
20
|
|
21
21
|
For getting description of the command use: *help <command>*
|
22
22
|
|
23
|
-
For more information see https://github.com/
|
23
|
+
For more information see https://github.com/slack-ruby/slack-ruby-bot, please.
|
24
24
|
MSG
|
25
25
|
|
26
26
|
expect(message: "#{SlackRubyBot.config.user} help").to respond_with_slack_message(message)
|
@@ -10,7 +10,6 @@ describe SlackRubyBot::App do
|
|
10
10
|
|
11
11
|
before do
|
12
12
|
allow(client).to receive(:self).and_return(Hashie::Mash.new('id' => 'UDEADBEEF'))
|
13
|
-
allow(Giphy).to receive(:random)
|
14
13
|
end
|
15
14
|
|
16
15
|
context 'default' do
|
@@ -21,18 +20,10 @@ describe SlackRubyBot::App do
|
|
21
20
|
end
|
22
21
|
context 'with allow_message_loops=true' do
|
23
22
|
before do
|
24
|
-
SlackRubyBot.
|
25
|
-
config.allow_message_loops = true
|
26
|
-
end
|
27
|
-
end
|
28
|
-
after do
|
29
|
-
SlackRubyBot.configure do |config|
|
30
|
-
config.allow_message_loops = nil
|
31
|
-
end
|
23
|
+
SlackRubyBot::Config.allow_message_loops = true
|
32
24
|
end
|
33
25
|
it 'responds to self' do
|
34
|
-
expect(
|
35
|
-
message_hook.call(client, Hashie::Mash.new(text: "#{SlackRubyBot.config.user} hi", channel: 'channel', user: 'UDEADBEEF'))
|
26
|
+
expect(message: "#{SlackRubyBot.config.user} hi").to respond_with_slack_message('Hi <@user>!')
|
36
27
|
end
|
37
28
|
end
|
38
29
|
end
|
@@ -16,7 +16,6 @@ describe SlackRubyBot::Commands do
|
|
16
16
|
let(:message_hook) { SlackRubyBot::Hooks::Message.new }
|
17
17
|
|
18
18
|
it 'ignores nil messages' do
|
19
|
-
allow(Giphy).to receive(:random)
|
20
19
|
expect(client).to_not receive(:message)
|
21
20
|
message_hook.call(client, Hashie::Mash.new(text: nil, channel: 'channel', user: 'user'))
|
22
21
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe SlackRubyBot::Commands do
|
3
|
+
describe SlackRubyBot::Commands, if: ENV.key?('WITH_GIPHY') do
|
4
4
|
let! :command do
|
5
5
|
Class.new(SlackRubyBot::Commands::Base) do
|
6
6
|
command 'send_gif_spec' do |client, data, _match|
|
@@ -10,6 +10,7 @@ describe SlackRubyBot::Commands do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
let(:gif_image_url) { 'http://media2.giphy.com/media/pzOijFsdDrsS4/giphy.gif' }
|
13
|
+
|
13
14
|
it 'sends a gif' do
|
14
15
|
gif = Giphy::RandomGif.new('image_url' => gif_image_url)
|
15
16
|
expect(Giphy).to receive(:random).and_return(gif)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe SlackRubyBot::Commands do
|
3
|
+
describe SlackRubyBot::Commands, if: ENV.key?('WITH_GIPHY') do
|
4
4
|
let! :command do
|
5
5
|
Class.new(SlackRubyBot::Commands::Base) do
|
6
6
|
command 'send_message_with_gif_spec' do |client, data, match|
|
@@ -16,7 +16,7 @@ describe SlackRubyBot::Commands do
|
|
16
16
|
expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message("message\n#{gif_image_url}")
|
17
17
|
end
|
18
18
|
|
19
|
-
it 'eats up
|
19
|
+
it 'eats up errors' do
|
20
20
|
expect(Giphy).to receive(:random) { raise 'oh no!' }
|
21
21
|
expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message('message')
|
22
22
|
end
|
@@ -26,44 +26,14 @@ describe SlackRubyBot::Commands do
|
|
26
26
|
expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message('message')
|
27
27
|
end
|
28
28
|
|
29
|
-
context 'send_gifs' do
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
before do
|
34
|
-
client.send_gifs = false
|
35
|
-
end
|
36
|
-
|
37
|
-
it 'does not send a gif' do
|
38
|
-
expect(Giphy).to_not receive(:random)
|
39
|
-
expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message('message')
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
context 'set to false via config' do
|
44
|
-
before do
|
45
|
-
SlackRubyBot::Config.send_gifs = false
|
46
|
-
end
|
47
|
-
it 'does not send a gif' do
|
48
|
-
expect(Giphy).to_not receive(:random)
|
49
|
-
expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message('message')
|
50
|
-
end
|
51
|
-
after do
|
52
|
-
SlackRubyBot::Config.reset!
|
53
|
-
end
|
29
|
+
context 'when client.send_gifs is false' do
|
30
|
+
let :client do
|
31
|
+
SlackRubyBot::Client.new.tap { |c| c.send_gifs = false }
|
54
32
|
end
|
55
33
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
end
|
60
|
-
it 'does not send a gif' do
|
61
|
-
expect(Giphy).to_not receive(:random)
|
62
|
-
expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message('message')
|
63
|
-
end
|
64
|
-
after do
|
65
|
-
ENV.delete 'SLACK_RUBY_BOT_SEND_GIFS'
|
66
|
-
end
|
34
|
+
it 'does not send a gif' do
|
35
|
+
expect(Giphy).to_not receive(:random)
|
36
|
+
expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message('message')
|
67
37
|
end
|
68
38
|
end
|
69
39
|
end
|
@@ -1,57 +1,63 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe SlackRubyBot::Config do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
10
|
-
context 'set to false' do
|
11
|
-
before do
|
12
|
-
SlackRubyBot::Config.send_gifs = false
|
13
|
-
end
|
14
|
-
it 'is false' do
|
4
|
+
describe '.send_gifs?' do
|
5
|
+
after { ENV.delete 'SLACK_RUBY_BOT_SEND_GIFS' }
|
6
|
+
|
7
|
+
context 'without giphy is false', unless: ENV.key?('WITH_GIPHY') do
|
8
|
+
it 'by default' do
|
15
9
|
expect(SlackRubyBot::Config.send_gifs?).to be false
|
16
10
|
end
|
17
|
-
|
18
|
-
SlackRubyBot::Config.
|
19
|
-
end
|
20
|
-
end
|
21
|
-
context 'set to false via SLACK_RUBY_BOT_SEND_GIFS' do
|
22
|
-
before do
|
23
|
-
ENV['SLACK_RUBY_BOT_SEND_GIFS'] = 'false'
|
24
|
-
end
|
25
|
-
it 'is false' do
|
11
|
+
it 'when set to true' do
|
12
|
+
SlackRubyBot::Config.send_gifs = true
|
26
13
|
expect(SlackRubyBot::Config.send_gifs?).to be false
|
27
14
|
end
|
28
|
-
|
29
|
-
ENV
|
15
|
+
it 'when set to true via SLACK_RUBY_BOT_SEND_GIFS' do
|
16
|
+
ENV['SLACK_RUBY_BOT_SEND_GIFS'] = 'true'
|
17
|
+
expect(SlackRubyBot::Config.send_gifs?).to be false
|
30
18
|
end
|
31
19
|
end
|
32
|
-
context '
|
33
|
-
|
34
|
-
SlackRubyBot::Config.send_gifs = true
|
35
|
-
end
|
36
|
-
it 'is false' do
|
20
|
+
context 'with giphy', if: ENV.key?('WITH_GIPHY') do
|
21
|
+
it 'default is true' do
|
37
22
|
expect(SlackRubyBot::Config.send_gifs?).to be true
|
38
23
|
end
|
39
|
-
|
40
|
-
|
24
|
+
context 'set to false' do
|
25
|
+
it 'is false' do
|
26
|
+
SlackRubyBot::Config.send_gifs = false
|
27
|
+
expect(SlackRubyBot::Config.send_gifs?).to be false
|
28
|
+
end
|
41
29
|
end
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
30
|
+
context 'set to false via SLACK_RUBY_BOT_SEND_GIFS' do
|
31
|
+
it 'is false' do
|
32
|
+
ENV['SLACK_RUBY_BOT_SEND_GIFS'] = 'false'
|
33
|
+
expect(SlackRubyBot::Config.send_gifs?).to be false
|
34
|
+
end
|
46
35
|
end
|
47
|
-
|
48
|
-
|
36
|
+
context 'set to true' do
|
37
|
+
it 'is true' do
|
38
|
+
SlackRubyBot::Config.send_gifs = true
|
39
|
+
expect(SlackRubyBot::Config.send_gifs?).to be true
|
40
|
+
end
|
49
41
|
end
|
50
|
-
|
51
|
-
|
42
|
+
context 'set to true via SLACK_RUBY_BOT_SEND_GIFS' do
|
43
|
+
it 'is true' do
|
44
|
+
ENV['SLACK_RUBY_BOT_SEND_GIFS'] = 'true'
|
45
|
+
expect(SlackRubyBot::Config.send_gifs?).to be true
|
46
|
+
end
|
47
|
+
end
|
48
|
+
context 'when using both methods' do
|
49
|
+
it 'config setting takes precedence' do
|
50
|
+
ENV['SLACK_RUBY_BOT_SEND_GIFS'] = 'true'
|
51
|
+
SlackRubyBot::Config.send_gifs = false
|
52
|
+
expect(SlackRubyBot::Config.send_gifs?).to be false
|
53
|
+
ENV['SLACK_RUBY_BOT_SEND_GIFS'] = 'false'
|
54
|
+
SlackRubyBot::Config.send_gifs = true
|
55
|
+
expect(SlackRubyBot::Config.send_gifs?).to be true
|
56
|
+
end
|
52
57
|
end
|
53
58
|
end
|
54
59
|
end
|
60
|
+
|
55
61
|
describe '#reset!' do
|
56
62
|
it 'sets all config attributes to nil' do
|
57
63
|
SlackRubyBot::Config::ATTRS.each do |attr|
|
@@ -31,9 +31,6 @@ describe SlackRubyBot::Hooks::Message do
|
|
31
31
|
it do
|
32
32
|
expect(message_hook.send(:message_to_self_not_allowed?)).to be false
|
33
33
|
end
|
34
|
-
after do
|
35
|
-
SlackRubyBot::Config.reset!
|
36
|
-
end
|
37
34
|
end
|
38
35
|
context 'with allow_message_loops set to false' do
|
39
36
|
before do
|
@@ -42,9 +39,6 @@ describe SlackRubyBot::Hooks::Message do
|
|
42
39
|
it do
|
43
40
|
expect(message_hook.send(:message_to_self_not_allowed?)).to be true
|
44
41
|
end
|
45
|
-
after do
|
46
|
-
SlackRubyBot::Config.reset!
|
47
|
-
end
|
48
42
|
end
|
49
43
|
end
|
50
44
|
describe '#message_to_self?' do
|
@@ -3,45 +3,53 @@ require 'spec_helper'
|
|
3
3
|
describe SlackRubyBot::Server do
|
4
4
|
let(:logger) { subject.send :logger }
|
5
5
|
let(:client) { Slack::RealTime::Client.new }
|
6
|
-
|
7
|
-
|
8
|
-
SlackRubyBot::Server.new(token: 'token', send_gifs: false)
|
9
|
-
end
|
6
|
+
|
7
|
+
describe 'forwards settings to client' do
|
10
8
|
before do
|
11
9
|
allow(subject).to receive(:sleep)
|
12
10
|
allow(logger).to receive(:error)
|
13
11
|
end
|
14
|
-
|
15
|
-
|
12
|
+
|
13
|
+
it 'token' do
|
14
|
+
server = SlackRubyBot::Server.new(token: 'token')
|
15
|
+
expect(server.send(:client).token).to eq 'token'
|
16
16
|
end
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
|
18
|
+
it 'send_gifs is false without giphy', unless: ENV.key?('WITH_GIPHY') do
|
19
|
+
server = SlackRubyBot::Server.new(send_gifs: true)
|
20
|
+
expect(server.send(:client).send_gifs?).to be false
|
21
21
|
end
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
|
23
|
+
it 'send_gifs', if: ENV.key?('WITH_GIPHY') do
|
24
|
+
server = SlackRubyBot::Server.new(send_gifs: true)
|
25
|
+
expect(server.send(:client).send_gifs?).to be true
|
26
|
+
server = SlackRubyBot::Server.new(send_gifs: false)
|
27
|
+
expect(server.send(:client).send_gifs?).to be false
|
25
28
|
end
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
+
|
30
|
+
it 'aliases' do
|
31
|
+
server = SlackRubyBot::Server.new(aliases: %w(foo bar))
|
32
|
+
expect(server.send(:client).aliases).to eq %w(foo bar)
|
33
|
+
expect(server.send(:client).names).to include 'foo'
|
29
34
|
end
|
30
|
-
|
31
|
-
|
35
|
+
end
|
36
|
+
|
37
|
+
describe 'starting/stopping' do
|
38
|
+
subject do
|
39
|
+
SlackRubyBot::Server.new(token: 'token')
|
32
40
|
end
|
33
41
|
it 'creates a client with a token' do
|
34
42
|
expect(client).to receive(:start!) { raise 'expected' }
|
35
|
-
expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs:
|
43
|
+
expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs: nil, aliases: nil).and_return(client)
|
36
44
|
expect { subject.start! }.to raise_error RuntimeError, 'expected'
|
37
45
|
end
|
38
46
|
it 'asynchronously creates a client with a token' do
|
39
47
|
expect(client).to receive(:start_async) { raise 'expected' }
|
40
|
-
expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs:
|
48
|
+
expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs: nil, aliases: nil).and_return(client)
|
41
49
|
expect { subject.start_async }.to raise_error RuntimeError, 'expected'
|
42
50
|
end
|
43
51
|
it 'stops client' do
|
44
|
-
expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs:
|
52
|
+
expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs: nil, aliases: nil).and_return(client)
|
45
53
|
expect(subject.send(:client)).to_not be nil
|
46
54
|
expect(client).to receive(:started?).and_return(true)
|
47
55
|
subject.stop!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack-ruby-bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Doubrovkine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.6.0
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: giphy
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 2.0.2
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 2.0.2
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rake
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +136,7 @@ files:
|
|
150
136
|
- CHANGELOG.md
|
151
137
|
- CONTRIBUTING.md
|
152
138
|
- DEPLOYMENT.md
|
139
|
+
- Dangerfile
|
153
140
|
- Gemfile
|
154
141
|
- LICENSE.md
|
155
142
|
- README.md
|
@@ -212,6 +199,7 @@ files:
|
|
212
199
|
- slack-ruby-bot.gemspec
|
213
200
|
- slack.png
|
214
201
|
- spec/slack-ruby-bot/app_spec.rb
|
202
|
+
- spec/slack-ruby-bot/client_spec.rb
|
215
203
|
- spec/slack-ruby-bot/commands/about_spec.rb
|
216
204
|
- spec/slack-ruby-bot/commands/aliases_spec.rb
|
217
205
|
- spec/slack-ruby-bot/commands/bot_message_spec.rb
|
@@ -248,7 +236,7 @@ files:
|
|
248
236
|
- spec/slack-ruby-bot/support/loggable_spec.rb
|
249
237
|
- spec/slack-ruby-bot/version_spec.rb
|
250
238
|
- spec/spec_helper.rb
|
251
|
-
homepage: https://github.com/
|
239
|
+
homepage: https://github.com/slack-ruby/slack-ruby-bot
|
252
240
|
licenses:
|
253
241
|
- MIT
|
254
242
|
metadata: {}
|
@@ -268,12 +256,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
256
|
version: 1.3.6
|
269
257
|
requirements: []
|
270
258
|
rubyforge_project:
|
271
|
-
rubygems_version: 2.
|
259
|
+
rubygems_version: 2.5.1
|
272
260
|
signing_key:
|
273
261
|
specification_version: 4
|
274
262
|
summary: The easiest way to write a Slack bot in Ruby.
|
275
263
|
test_files:
|
276
264
|
- spec/slack-ruby-bot/app_spec.rb
|
265
|
+
- spec/slack-ruby-bot/client_spec.rb
|
277
266
|
- spec/slack-ruby-bot/commands/about_spec.rb
|
278
267
|
- spec/slack-ruby-bot/commands/aliases_spec.rb
|
279
268
|
- spec/slack-ruby-bot/commands/bot_message_spec.rb
|