slack-ruby-bot 0.10.0 → 0.10.1

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: d8e23b1dde8a7cb5147d728f4a0269e36f91fb27
4
- data.tar.gz: b5355a6b7a7cf15868390e97c0aa423881373f6d
3
+ metadata.gz: 599b19f9020a13b61a9cda2f4bd570e4121a4208
4
+ data.tar.gz: 885f72dffbb46d911fb7368309713393a684d35f
5
5
  SHA512:
6
- metadata.gz: 726e80f25e3bc5310298205bdea44759b830974a87d7f0723c444ee956113a40d9fdf67c6ca2a9f21138379e28c0cea6e38e3d5efa3796d2334f0f27e8fb1e40
7
- data.tar.gz: 9235ebff49dc787ab29514b8c2351fbbad318a097a144168ac18d768b2aeceb743ec4d62767cf5c76d9f7063f56123b6288c530cf8a1b89176c871a963f76c6d
6
+ metadata.gz: 2f98b14588981310cafa3b95aa12b167551bdd32c7c0a78f77689d6d7ded74a10088f0b65a60a777f186f280a5e2ad1fd309e3166987d4f9c0e4fef83059a313
7
+ data.tar.gz: 25c471d74bf5b09f4ebe5de10f74add3decf68c226fa8e57506a58a282c7736441604431bac0773afc08a169e36b4c0c0c848643d255fe5ed13e7bb245e7b2fb
@@ -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.0. See [CHANGELOG](CHANGELOG.md) for a history of changes and [UPGRADING](UPGRADING.md) for how to upgrade to more recent versions.
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. Require 'slack-ruby-bot/rspec' in your `spec_helper.rb`.
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
- attr_reader :command_classes
8
+ attr_accessor :command_classes
9
9
 
10
10
  def inherited(subclass)
11
- @command_classes ||= []
12
- @command_classes << subclass
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 = {})
@@ -1,3 +1,3 @@
1
1
  module SlackRubyBot
2
- VERSION = '0.10.0'.freeze
2
+ VERSION = '0.10.1'.freeze
3
3
  end
@@ -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.0
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-09 00:00:00.000000000 Z
11
+ date: 2017-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie