slack-ruby-bot 0.6.0 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b27b94f1f7396de181c038e27e4896b1754dc4b
4
- data.tar.gz: aae8cf08bbc1839ee45efa03fb752080290c3216
3
+ metadata.gz: 8c2b1b2adc7654b7b32b85a73168351eadc504cf
4
+ data.tar.gz: 2a18eb90029dbc968be4a165e461aa206d445bc2
5
5
  SHA512:
6
- metadata.gz: 96b648ba4ab3cc77c37bc351f5cdb77efd92b427763e0f90627d8e2d1389035cf3ff7fb06ef0a59f7be70fe7e06cd95af3cfd67adb007a2f9bef769b0387e9e3
7
- data.tar.gz: 3a8d709cda131675445dc986ecb67d7e62f63a17bae29820a89622f4dff2701d3d7f2b701ee416e2cde9b67577b38e51f628bb14d4ad48514d0b46516f390a7b
6
+ metadata.gz: fbb72cee5e317f55e5cc9a91d290f7ccd9c8ee4053882fc72ef30451f662a49a8f089733685a695ba7d8fc819efc28ecc39b2242c55b33805208c79ad52bf65d
7
+ data.tar.gz: 7619f31f2cd84de42bd7cc64ccc92de66dbc749d8a2494d9a41a11bc64263f3c8c7af65601ea9b51cde19010e8436efdd18e84a56de4554c2325da3dd558a202
@@ -1,5 +1,5 @@
1
1
  # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2016-01-03 14:51:05 -0700 using RuboCop version 0.32.1.
2
+ # on 2016-01-24 08:58:25 -0500 using RuboCop version 0.32.1.
3
3
  # The point is for the user to remove these configuration records
4
4
  # one by one as the offenses are removed from the code base.
5
5
  # Note that changes in the inspected code, or installation of new
@@ -9,24 +9,15 @@
9
9
  Lint/HandleExceptions:
10
10
  Enabled: false
11
11
 
12
- # Offense count: 1
13
- Lint/UselessAccessModifier:
14
- Enabled: false
15
-
16
- # Offense count: 8
12
+ # Offense count: 7
17
13
  Metrics/AbcSize:
18
14
  Max: 28
19
15
 
20
- # Offense count: 1
21
- # Configuration parameters: CountComments.
22
- Metrics/ClassLength:
23
- Max: 101
24
-
25
- # Offense count: 3
16
+ # Offense count: 2
26
17
  Metrics/CyclomaticComplexity:
27
18
  Max: 8
28
19
 
29
- # Offense count: 104
20
+ # Offense count: 113
30
21
  # Configuration parameters: AllowURI, URISchemes.
31
22
  Metrics/LineLength:
32
23
  Max: 145
@@ -40,11 +31,11 @@ Metrics/MethodLength:
40
31
  Metrics/PerceivedComplexity:
41
32
  Max: 8
42
33
 
43
- # Offense count: 17
34
+ # Offense count: 18
44
35
  Style/Documentation:
45
36
  Enabled: false
46
37
 
47
- # Offense count: 2
38
+ # Offense count: 3
48
39
  Style/DoubleNegation:
49
40
  Enabled: false
50
41
 
@@ -1,3 +1,8 @@
1
+ ### 0.6.1 (1/29/2016)
2
+
3
+ * [#43](https://github.com/dblock/slack-ruby-bot/issues/43): Issuing a `bot` command terminates bot - [@dblock](https://github.com/dblock).
4
+ * [#40](https://github.com/dblock/slack-ruby-bot/pull/40): Added `SlackRubyBot::Config.reset!` - [@accessd](https://github.com/accessd).
5
+
1
6
  ### 0.6.0 (1/9/2016)
2
7
 
3
8
  * Deprecated `SlackRubyBot::Base#send_message`, `send_message_with_gif` and `send_gif` in favor of `client.say` - [@dblock](https://github.com/dblock).
data/README.md CHANGED
@@ -17,7 +17,7 @@ A generic Slack bot framework written in Ruby on top of [slack-ruby-client](http
17
17
 
18
18
  ## Stable Release
19
19
 
20
- You're reading the documentation for the **stable** release of slack-ruby-bot, 0.6.0. See [CHANGELOG](CHANGELOG.md) for a history of changes and [UPGRADING](UPGRADING.md) for how to upgrade to more recent versions.
20
+ You're reading the documentation for the **stable** release of slack-ruby-bot 0.6.1. See [CHANGELOG](CHANGELOG.md) for a history of changes and [UPGRADING](UPGRADING.md) for how to upgrade to more recent versions.
21
21
 
22
22
  ## Usage
23
23
 
@@ -18,6 +18,7 @@ source 'http://rubygems.org'
18
18
  gem 'slack-ruby-bot'
19
19
  gem 'puma'
20
20
  gem 'sinatra'
21
+ gem 'dotenv'
21
22
 
22
23
  group :development, :test do
23
24
  gem 'rake'
@@ -52,7 +53,7 @@ module SlackMathbot
52
53
  module Commands
53
54
  class Calculate < SlackRubyBot::Commands::Base
54
55
  command 'calculate' do |client, data, _match|
55
- client.say(chanbel: data.channel, text: '4')
56
+ client.say(channel: data.channel, text: '4')
56
57
  end
57
58
  end
58
59
  end
@@ -92,6 +93,9 @@ Tie all the pieces together in `config.ru` which creates a thread for the bot an
92
93
  ```ruby
93
94
  $LOAD_PATH.unshift(File.dirname(__FILE__))
94
95
 
96
+ require 'dotenv'
97
+ Dotenv.load
98
+
95
99
  require 'slack-mathbot'
96
100
  require 'web'
97
101
 
@@ -1,6 +1,7 @@
1
1
  require File.expand_path('../config/environment', __FILE__)
2
2
 
3
3
  require 'slack-ruby-bot/version'
4
+ require 'slack-ruby-bot/support/loggable'
4
5
  require 'slack-ruby-bot/about'
5
6
  require 'slack-ruby-bot/config'
6
7
  require 'slack-ruby-bot/hooks'
@@ -9,5 +9,9 @@ module SlackRubyBot
9
9
  def self.instance
10
10
  SlackRubyBot::App.instance
11
11
  end
12
+
13
+ def self.call(client, data, _match)
14
+ client.say(channel: data.channel, text: "Sorry <@#{data.user}>, I don't understand that command!", gif: 'idiot')
15
+ end
12
16
  end
13
17
  end
@@ -1,5 +1,6 @@
1
1
  module SlackRubyBot
2
2
  class Client < Slack::RealTime::Client
3
+ include Loggable
3
4
  attr_accessor :auth
4
5
  attr_accessor :aliases
5
6
  attr_accessor :send_gifs
@@ -41,13 +42,6 @@ module SlackRubyBot
41
42
  SlackRubyBot.config.url || (auth && auth['url'])
42
43
  end
43
44
 
44
- def logger
45
- @logger ||= begin
46
- $stdout.sync = true
47
- Logger.new(STDOUT)
48
- end
49
- end
50
-
51
45
  def say(options = {})
52
46
  options = options.dup
53
47
  # get GIF
@@ -1,6 +1,7 @@
1
1
  module SlackRubyBot
2
2
  module Commands
3
3
  class Base
4
+ include Loggable
4
5
  class_attribute :routes
5
6
 
6
7
  def self.send_message(client, channel, text, options = {})
@@ -22,13 +23,6 @@ module SlackRubyBot
22
23
  client.say(options.merge(channel: channel, text: '', gif: keywords))
23
24
  end
24
25
 
25
- def self.logger
26
- @logger ||= begin
27
- $stdout.sync = true
28
- Logger.new(STDOUT)
29
- end
30
- end
31
-
32
26
  def self.default_command_name
33
27
  name && name.split(':').last.downcase
34
28
  end
@@ -74,19 +68,26 @@ module SlackRubyBot
74
68
  self.routes[match] = block
75
69
  end
76
70
 
77
- private
78
-
79
71
  def self.parse(client, data)
80
72
  text = data.text
81
- return text unless data.channel && data.channel[0] == 'D' && data.user && data.user != SlackRubyBot.config.user_id
82
- client.names.each do |name|
83
- text.downcase.tap do |td|
84
- return text if td == name || td.starts_with?("#{name} ")
85
- end
86
- end
73
+ return text unless direct_message?(data) && message_from_another_user?(data)
74
+ return text if bot_mentioned_in_message?(text, client.names)
87
75
  ["#{client.name} #{text}", text]
88
76
  end
89
77
 
78
+ def self.direct_message?(data)
79
+ data.channel && data.channel[0] == 'D'
80
+ end
81
+
82
+ def self.message_from_another_user?(data)
83
+ data.user && data.user != SlackRubyBot.config.user_id
84
+ end
85
+
86
+ def self.bot_mentioned_in_message?(text, bot_names)
87
+ bot_names = bot_names.join('|')
88
+ !!text.downcase.match(/\A(#{bot_names})\s|\A(#{bot_names})\z/)
89
+ end
90
+
90
91
  def self.finalize_routes!
91
92
  return if self.routes && self.routes.any?
92
93
  command default_command_name
@@ -2,15 +2,8 @@ module SlackRubyBot
2
2
  module Config
3
3
  extend self
4
4
 
5
- attr_accessor :token
6
- attr_accessor :url
7
- attr_accessor :aliases
8
- attr_accessor :user
9
- attr_accessor :user_id
10
- attr_accessor :team
11
- attr_accessor :team_id
12
- attr_accessor :allow_message_loops
13
- attr_accessor :send_gifs
5
+ ATTRS = [:token, :url, :aliases, :user, :user_id, :team, :team_id, :allow_message_loops, :send_gifs].freeze
6
+ attr_accessor(*ATTRS)
14
7
 
15
8
  def allow_message_loops?
16
9
  allow_message_loops
@@ -21,6 +14,10 @@ module SlackRubyBot
21
14
  v.nil? ? (send_gifs.nil? || send_gifs) : v
22
15
  end
23
16
 
17
+ def reset!
18
+ ATTRS.each { |attr| send("#{attr}=", nil) }
19
+ end
20
+
24
21
  private
25
22
 
26
23
  def boolean_from_env(key)
@@ -5,7 +5,7 @@ module SlackRubyBot
5
5
 
6
6
  def message(client, data)
7
7
  data = Hashie::Mash.new(data)
8
- return if !SlackRubyBot::Config.allow_message_loops? && (client.self && client.self['id'] == data.user)
8
+ return if message_to_self_not_allowed? && message_to_self?(client, data)
9
9
  data.text.strip! if data.text
10
10
  result = child_command_classes.detect { |d| d.invoke(client, data) }
11
11
  result ||= built_in_command_classes.detect { |d| d.invoke(client, data) }
@@ -15,6 +15,14 @@ module SlackRubyBot
15
15
 
16
16
  private
17
17
 
18
+ def message_to_self_not_allowed?
19
+ !SlackRubyBot::Config.allow_message_loops?
20
+ end
21
+
22
+ def message_to_self?(client, data)
23
+ client.self && client.self['id'] == data.user
24
+ end
25
+
18
26
  #
19
27
  # All commands.
20
28
  #
@@ -1,5 +1,6 @@
1
1
  module SlackRubyBot
2
2
  class Server
3
+ include Loggable
3
4
  cattr_accessor :hooks
4
5
  attr_accessor :token
5
6
  attr_accessor :aliases
@@ -76,13 +77,6 @@ module SlackRubyBot
76
77
 
77
78
  private
78
79
 
79
- def logger
80
- @logger ||= begin
81
- $stdout.sync = true
82
- Logger.new(STDOUT)
83
- end
84
- end
85
-
86
80
  def client
87
81
  @client ||= begin
88
82
  client = SlackRubyBot::Client.new(aliases: aliases, send_gifs: send_gifs, token: token)
@@ -0,0 +1,20 @@
1
+ module SlackRubyBot
2
+ module Loggable
3
+ extend ActiveSupport::Concern
4
+
5
+ class_methods do
6
+ def logger
7
+ @logger ||= begin
8
+ $stdout.sync = true
9
+ Logger.new(STDOUT)
10
+ end
11
+ end
12
+ end
13
+
14
+ private
15
+
16
+ def logger
17
+ self.class.logger
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module SlackRubyBot
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe SlackRubyBot::Commands::Help do
4
+ def app
5
+ SlackRubyBot::App.new
6
+ end
7
+ it 'bot' do
8
+ expect(message: "#{SlackRubyBot.config.user} bot").to respond_with_slack_message("Sorry <@user>, I don't understand that command!")
9
+ end
10
+ end
@@ -18,4 +18,22 @@ describe SlackRubyBot::Commands do
18
18
  expect(message: "#{SlackRubyBot.config.user} sayhi arg1 arg2").to respond_with_slack_message('sayhi: arg1 arg2')
19
19
  expect(message: "#{SlackRubyBot.config.user} saybye arg1 arg2").to respond_with_slack_message('saybye: arg1 arg2')
20
20
  end
21
+ it 'checks for direct message' do
22
+ expect(command.direct_message?(Hashie::Mash.new(channel: 'D0K79RKJ7'))).to be true
23
+ expect(command.direct_message?(Hashie::Mash.new(channel: 'S0K79RKJ7'))).to be false
24
+ end
25
+ it 'checks that message from another user' do
26
+ SlackRubyBot.config.user_id = 'UDEADBEEF'
27
+ expect(command.message_from_another_user?(Hashie::Mash.new(user: 'U0CPHNZ2N'))).to be true
28
+ expect(command.message_from_another_user?(Hashie::Mash.new(user: 'UDEADBEEF'))).to be false
29
+ end
30
+ it 'checks that bot mentioned in message' do
31
+ bot_names = ['rubybot', '<@deadbeef>', '<@deadbeef>:', 'rubybot:']
32
+ expect(command.bot_mentioned_in_message?('rubybot', bot_names)).to be true
33
+ expect(command.bot_mentioned_in_message?('rubybot ', bot_names)).to be true
34
+ expect(command.bot_mentioned_in_message?('rubybotbot', bot_names)).to be false
35
+ expect(command.bot_mentioned_in_message?('rubybot:', bot_names)).to be true
36
+ expect(command.bot_mentioned_in_message?('rubybot: ', bot_names)).to be true
37
+ expect(command.bot_mentioned_in_message?('rubybot:bot', bot_names)).to be false
38
+ end
21
39
  end
@@ -53,7 +53,7 @@ describe SlackRubyBot::Commands do
53
53
  app.send(:message, client, text: "#{SlackRubyBot.config.user} send_message_with_gif_spec message", channel: 'channel', user: 'user')
54
54
  end
55
55
  after do
56
- SlackRubyBot::Config.send_gifs = nil
56
+ SlackRubyBot::Config.reset!
57
57
  end
58
58
  end
59
59
  context 'set to false via SLACK_RUBY_BOT_SEND_GIFS' do
@@ -15,7 +15,7 @@ describe SlackRubyBot::Config do
15
15
  expect(SlackRubyBot::Config.send_gifs?).to be false
16
16
  end
17
17
  after do
18
- SlackRubyBot::Config.send_gifs = nil
18
+ SlackRubyBot::Config.reset!
19
19
  end
20
20
  end
21
21
  context 'set to false via SLACK_RUBY_BOT_SEND_GIFS' do
@@ -37,7 +37,7 @@ describe SlackRubyBot::Config do
37
37
  expect(SlackRubyBot::Config.send_gifs?).to be true
38
38
  end
39
39
  after do
40
- SlackRubyBot::Config.send_gifs = nil
40
+ SlackRubyBot::Config.reset!
41
41
  end
42
42
  end
43
43
  context 'set to true via SLACK_RUBY_BOT_SEND_GIFS' do
@@ -52,4 +52,16 @@ describe SlackRubyBot::Config do
52
52
  end
53
53
  end
54
54
  end
55
+ describe '#reset!' do
56
+ it 'sets all config attributes to nil' do
57
+ SlackRubyBot::Config::ATTRS.each do |attr|
58
+ SlackRubyBot::Config.send("#{attr}=", true)
59
+ expect(SlackRubyBot::Config.send(attr)).to be true
60
+ end
61
+ SlackRubyBot::Config.reset!
62
+ SlackRubyBot::Config::ATTRS.each do |attr|
63
+ expect(SlackRubyBot::Config.send(attr)).to be nil
64
+ end
65
+ end
66
+ end
55
67
  end
@@ -0,0 +1,68 @@
1
+ require 'spec_helper'
2
+
3
+ describe SlackRubyBot::Hooks::Message do
4
+ let(:server) { SlackRubyBot::Server.new }
5
+ describe '#child_command_classes' do
6
+ it 'returns only child command classes' do
7
+ child_command_classes = server.send(:child_command_classes)
8
+ expect(child_command_classes).to include SlackRubyBot::Bot
9
+ expect(child_command_classes).to_not include SlackRubyBot::Commands::Hi
10
+ end
11
+ end
12
+ describe '#built_in_command_classes' do
13
+ let(:built_in_command_classes) { server.send(:built_in_command_classes) }
14
+ it 'returns only built in command classes' do
15
+ expect(built_in_command_classes).to include SlackRubyBot::Commands::Hi
16
+ expect(built_in_command_classes).to include SlackRubyBot::Commands::Default
17
+ expect(built_in_command_classes).to include SlackRubyBot::Commands::Help
18
+ expect(built_in_command_classes).to_not include SlackRubyBot::Bot
19
+ end
20
+ it 'does not return unknown command class' do
21
+ expect(built_in_command_classes).to_not include SlackRubyBot::Commands::Unknown
22
+ end
23
+ end
24
+ describe '#message_to_self_not_allowed?' do
25
+ context 'with allow_message_loops set to true' do
26
+ before do
27
+ SlackRubyBot::Config.allow_message_loops = true
28
+ end
29
+ it do
30
+ expect(server.send(:message_to_self_not_allowed?)).to be false
31
+ end
32
+ after do
33
+ SlackRubyBot::Config.reset!
34
+ end
35
+ end
36
+ context 'with allow_message_loops set to false' do
37
+ before do
38
+ SlackRubyBot::Config.allow_message_loops = false
39
+ end
40
+ it do
41
+ expect(server.send(:message_to_self_not_allowed?)).to be true
42
+ end
43
+ after do
44
+ SlackRubyBot::Config.reset!
45
+ end
46
+ end
47
+ end
48
+ describe '#message_to_self?' do
49
+ let(:client) { Hashie::Mash.new(self: { 'id' => 'U0K8CKKT1' }) }
50
+ context 'with message to self' do
51
+ it do
52
+ expect(server.send(:message_to_self?, client, Hashie::Mash.new(user: 'U0K8CKKT1'))).to be true
53
+ end
54
+ end
55
+ context 'with message to another user' do
56
+ it do
57
+ expect(server.send(:message_to_self?, client, Hashie::Mash.new(user: 'U0K8CKKT2'))).to be false
58
+ end
59
+ end
60
+ end
61
+ describe '#message' do
62
+ let(:client) { Hashie::Mash.new(self: { 'id' => 'U0K8CKKT1' }) }
63
+ it 'invokes a command' do
64
+ expect(SlackRubyBot::Commands::Unknown).to receive(:invoke)
65
+ server.message(client, Hashie::Mash.new(user: 'U0K8CKKT2'))
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe SlackRubyBot::Loggable do
4
+ let! :class_with_logger do
5
+ Class.new(SlackRubyBot::Commands::Base) do
6
+ def public_logger
7
+ logger
8
+ end
9
+ end
10
+ end
11
+ describe 'logger for class' do
12
+ it do
13
+ expect(class_with_logger.logger).to be_kind_of Logger
14
+ end
15
+ it 'should be cached' do
16
+ first_logger = class_with_logger.logger
17
+ second_logger = class_with_logger.logger
18
+ expect(first_logger.object_id).to eq second_logger.object_id
19
+ end
20
+ end
21
+ describe 'logger for instance' do
22
+ it do
23
+ expect(class_with_logger.new.public_logger).to be_kind_of Logger
24
+ end
25
+ it 'should be cached' do
26
+ first_logger = class_with_logger.new.public_logger
27
+ second_logger = class_with_logger.new.public_logger
28
+ expect(first_logger.object_id).to eq second_logger.object_id
29
+ end
30
+ end
31
+ end
metadata CHANGED
@@ -1,153 +1,153 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-ruby-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.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: 2016-01-09 00:00:00.000000000 Z
11
+ date: 2016-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: slack-ruby-client
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.5.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.5.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faye-websocket
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: giphy
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.0.2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: 2.0.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rack-test
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: vcr
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - '>='
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: webmock
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - '>='
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - '>='
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
@@ -170,11 +170,11 @@ executables: []
170
170
  extensions: []
171
171
  extra_rdoc_files: []
172
172
  files:
173
- - ".gitignore"
174
- - ".rspec"
175
- - ".rubocop.yml"
176
- - ".rubocop_todo.yml"
177
- - ".travis.yml"
173
+ - .gitignore
174
+ - .rspec
175
+ - .rubocop.yml
176
+ - .rubocop_todo.yml
177
+ - .travis.yml
178
178
  - CHANGELOG.md
179
179
  - CONTRIBUTING.md
180
180
  - DEPLOYMENT.md
@@ -221,6 +221,7 @@ files:
221
221
  - lib/slack-ruby-bot/rspec/support/slack_ruby_bot_configure.rb
222
222
  - lib/slack-ruby-bot/rspec/support/vcr.rb
223
223
  - lib/slack-ruby-bot/server.rb
224
+ - lib/slack-ruby-bot/support/loggable.rb
224
225
  - lib/slack-ruby-bot/version.rb
225
226
  - lib/slack_ruby_bot.rb
226
227
  - screenshots/aliases.gif
@@ -233,6 +234,7 @@ files:
233
234
  - spec/slack-ruby-bot/app_spec.rb
234
235
  - spec/slack-ruby-bot/commands/about_spec.rb
235
236
  - spec/slack-ruby-bot/commands/aliases_spec.rb
237
+ - spec/slack-ruby-bot/commands/bot_message_spec.rb
236
238
  - spec/slack-ruby-bot/commands/bot_spec.rb
237
239
  - spec/slack-ruby-bot/commands/commands_precedence_spec.rb
238
240
  - spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb
@@ -254,8 +256,10 @@ files:
254
256
  - spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb
255
257
  - spec/slack-ruby-bot/commands/unknown_spec.rb
256
258
  - spec/slack-ruby-bot/config_spec.rb
259
+ - spec/slack-ruby-bot/hooks/message_spec.rb
257
260
  - spec/slack-ruby-bot/rspec/respond_with_error_spec.rb
258
261
  - spec/slack-ruby-bot/server_spec.rb
262
+ - spec/slack-ruby-bot/support/loggable_spec.rb
259
263
  - spec/slack-ruby-bot/version_spec.rb
260
264
  - spec/spec_helper.rb
261
265
  homepage: http://github.com/dblock/slack-ruby-bot
@@ -268,17 +272,17 @@ require_paths:
268
272
  - lib
269
273
  required_ruby_version: !ruby/object:Gem::Requirement
270
274
  requirements:
271
- - - ">="
275
+ - - '>='
272
276
  - !ruby/object:Gem::Version
273
277
  version: '0'
274
278
  required_rubygems_version: !ruby/object:Gem::Requirement
275
279
  requirements:
276
- - - ">="
280
+ - - '>='
277
281
  - !ruby/object:Gem::Version
278
282
  version: 1.3.6
279
283
  requirements: []
280
284
  rubyforge_project:
281
- rubygems_version: 2.4.8
285
+ rubygems_version: 2.4.5
282
286
  signing_key:
283
287
  specification_version: 4
284
288
  summary: The easiest way to write a Slack bot in Ruby.
@@ -286,6 +290,7 @@ test_files:
286
290
  - spec/slack-ruby-bot/app_spec.rb
287
291
  - spec/slack-ruby-bot/commands/about_spec.rb
288
292
  - spec/slack-ruby-bot/commands/aliases_spec.rb
293
+ - spec/slack-ruby-bot/commands/bot_message_spec.rb
289
294
  - spec/slack-ruby-bot/commands/bot_spec.rb
290
295
  - spec/slack-ruby-bot/commands/commands_precedence_spec.rb
291
296
  - spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb
@@ -307,7 +312,9 @@ test_files:
307
312
  - spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb
308
313
  - spec/slack-ruby-bot/commands/unknown_spec.rb
309
314
  - spec/slack-ruby-bot/config_spec.rb
315
+ - spec/slack-ruby-bot/hooks/message_spec.rb
310
316
  - spec/slack-ruby-bot/rspec/respond_with_error_spec.rb
311
317
  - spec/slack-ruby-bot/server_spec.rb
318
+ - spec/slack-ruby-bot/support/loggable_spec.rb
312
319
  - spec/slack-ruby-bot/version_spec.rb
313
320
  - spec/spec_helper.rb