slack-ruby-bot 0.10.0 → 0.10.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +12 -2
- data/lib/slack-ruby-bot/commands/base.rb +3 -3
- data/lib/slack-ruby-bot/version.rb +1 -1
- data/spec/slack-ruby-bot/commands/bot_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 599b19f9020a13b61a9cda2f4bd570e4121a4208
|
4
|
+
data.tar.gz: 885f72dffbb46d911fb7368309713393a684d35f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f98b14588981310cafa3b95aa12b167551bdd32c7c0a78f77689d6d7ded74a10088f0b65a60a777f186f280a5e2ad1fd309e3166987d4f9c0e4fef83059a313
|
7
|
+
data.tar.gz: 25c471d74bf5b09f4ebe5de10f74add3decf68c226fa8e57506a58a282c7736441604431bac0773afc08a169e36b4c0c0c848643d255fe5ed13e7bb245e7b2fb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
### 0.10.1 (2/12/2017)
|
2
|
+
|
3
|
+
* [#113](https://github.com/slack-ruby/slack-ruby-bot/issues/113): Fixed commands in subclassed `SlackRubyBot::Bot` - [@dblock](https://github.com/dblock).
|
4
|
+
|
1
5
|
### 0.10.0 (2/9/2017)
|
2
6
|
|
3
7
|
* [#111](https://github.com/slack-ruby/slack-ruby-bot/pull/111): Default keyword for GIFs in invalid commands has been changed from `idiot` to `understand` - [@dblock](https://github.com/dblock).
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ If you are not familiar with Slack bots or Slack API concepts, you might want to
|
|
19
19
|
|
20
20
|
## Stable Release
|
21
21
|
|
22
|
-
You're reading the documentation for the **stable** release of slack-ruby-bot, 0.10.
|
22
|
+
You're reading the documentation for the **stable** release of slack-ruby-bot, 0.10.1. See [CHANGELOG](CHANGELOG.md) for a history of changes and [UPGRADING](UPGRADING.md) for how to upgrade to more recent versions.
|
23
23
|
|
24
24
|
## Usage
|
25
25
|
|
@@ -346,12 +346,22 @@ For an example of advanced integration that supports multiple teams, see [slack-
|
|
346
346
|
|
347
347
|
### RSpec Shared Behaviors
|
348
348
|
|
349
|
-
Slack-ruby-bot ships with a number of shared RSpec behaviors that can be used in your RSpec tests.
|
349
|
+
Slack-ruby-bot ships with a number of shared RSpec behaviors that can be used in your RSpec tests.
|
350
350
|
|
351
351
|
* [behaves like a slack bot](lib/slack-ruby-bot/rspec/support/slack-ruby-bot/it_behaves_like_a_slack_bot.rb): A bot quacks like a Slack Ruby bot.
|
352
352
|
* [respond with slack message](lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb): The bot responds with a message.
|
353
353
|
* [respond with error](lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_error.rb): An exception is raised inside a bot command.
|
354
354
|
|
355
|
+
Require `slack-ruby-bot/rspec` in your `spec_helper.rb` along with the following dependencies in Gemfile.
|
356
|
+
|
357
|
+
```ruby
|
358
|
+
group :development, :test do
|
359
|
+
gem 'rspec'
|
360
|
+
gem 'vcr'
|
361
|
+
gem 'webmock'
|
362
|
+
end
|
363
|
+
```
|
364
|
+
|
355
365
|
### Useful Libraries
|
356
366
|
|
357
367
|
* [newrelic-slack-ruby-bot](https://github.com/dblock/newrelic-slack-ruby-bot): NewRelic instrumentation for slack-ruby-bot.
|
@@ -5,11 +5,11 @@ module SlackRubyBot
|
|
5
5
|
class_attribute :routes
|
6
6
|
|
7
7
|
class << self
|
8
|
-
|
8
|
+
attr_accessor :command_classes
|
9
9
|
|
10
10
|
def inherited(subclass)
|
11
|
-
|
12
|
-
|
11
|
+
SlackRubyBot::Commands::Base.command_classes ||= []
|
12
|
+
SlackRubyBot::Commands::Base.command_classes << subclass
|
13
13
|
end
|
14
14
|
|
15
15
|
def send_message(client, channel, text, options = {})
|
@@ -13,6 +13,10 @@ describe SlackRubyBot::Bot do
|
|
13
13
|
SlackRubyBot::Bot.instance
|
14
14
|
end
|
15
15
|
|
16
|
+
it 'registers subclass command' do
|
17
|
+
expect(SlackRubyBot::Commands::Base.command_classes).to include command
|
18
|
+
end
|
19
|
+
|
16
20
|
it 'sends a message' do
|
17
21
|
expect(message: "#{SlackRubyBot.config.user} bot_spec message").to respond_with_slack_message('message')
|
18
22
|
end
|
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.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Doubrovkine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|