slack-ruby-bot 0.11.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.gitignore +3 -2
  4. data/.rubocop.yml +14 -1
  5. data/.rubocop_todo.yml +14 -42
  6. data/.travis.yml +11 -13
  7. data/CHANGELOG.md +39 -6
  8. data/CONTRIBUTING.md +5 -1
  9. data/DEPLOYMENT.md +63 -9
  10. data/Dangerfile +4 -0
  11. data/Gemfile +11 -7
  12. data/LICENSE.md +1 -1
  13. data/MIGRATION.md +13 -0
  14. data/README.md +133 -65
  15. data/Rakefile +2 -0
  16. data/TUTORIAL.md +23 -0
  17. data/UPGRADING.md +50 -0
  18. data/examples/inventory/Gemfile +2 -0
  19. data/examples/inventory/inventorybot.rb +5 -1
  20. data/examples/market/Gemfile +4 -3
  21. data/examples/market/marketbot.rb +22 -15
  22. data/examples/minimal/Gemfile +3 -1
  23. data/examples/minimal/pongbot.rb +2 -0
  24. data/examples/weather/Gemfile +2 -0
  25. data/examples/weather/weatherbot.rb +2 -0
  26. data/lib/config/application.rb +4 -2
  27. data/lib/config/boot.rb +2 -0
  28. data/lib/config/environment.rb +3 -1
  29. data/lib/slack-ruby-bot.rb +3 -1
  30. data/lib/slack-ruby-bot/about.rb +3 -1
  31. data/lib/slack-ruby-bot/app.rb +18 -12
  32. data/lib/slack-ruby-bot/bot.rb +3 -1
  33. data/lib/slack-ruby-bot/client.rb +25 -23
  34. data/lib/slack-ruby-bot/commands.rb +2 -0
  35. data/lib/slack-ruby-bot/commands/about.rb +3 -1
  36. data/lib/slack-ruby-bot/commands/base.rb +13 -21
  37. data/lib/slack-ruby-bot/commands/help.rb +10 -8
  38. data/lib/slack-ruby-bot/commands/hi.rb +3 -1
  39. data/lib/slack-ruby-bot/commands/support/attrs.rb +2 -0
  40. data/lib/slack-ruby-bot/commands/support/help.rb +4 -0
  41. data/lib/slack-ruby-bot/commands/support/match.rb +4 -3
  42. data/lib/slack-ruby-bot/commands/unknown.rb +3 -1
  43. data/lib/slack-ruby-bot/config.rb +7 -7
  44. data/lib/slack-ruby-bot/hooks.rb +2 -0
  45. data/lib/slack-ruby-bot/hooks/hello.rb +22 -3
  46. data/lib/slack-ruby-bot/hooks/hook_support.rb +2 -6
  47. data/lib/slack-ruby-bot/hooks/message.rb +11 -10
  48. data/lib/slack-ruby-bot/hooks/set.rb +3 -1
  49. data/lib/slack-ruby-bot/mvc.rb +2 -0
  50. data/lib/slack-ruby-bot/mvc/controller/base.rb +4 -3
  51. data/lib/slack-ruby-bot/mvc/model/base.rb +2 -0
  52. data/lib/slack-ruby-bot/mvc/mvc.rb +2 -0
  53. data/lib/slack-ruby-bot/mvc/view/base.rb +2 -0
  54. data/lib/slack-ruby-bot/rspec.rb +3 -1
  55. data/lib/slack-ruby-bot/rspec/support/bots_for_tests.rb +2 -0
  56. data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/it_behaves_like_a_slack_bot.rb +4 -1
  57. data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/not_respond.rb +3 -5
  58. data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_error.rb +3 -7
  59. data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb +15 -14
  60. data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_messages.rb +26 -19
  61. data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/start_typing.rb +32 -0
  62. data/lib/slack-ruby-bot/rspec/support/slack_api_key.rb +3 -1
  63. data/lib/slack-ruby-bot/rspec/support/slack_ruby_bot_configure.rb +2 -0
  64. data/lib/slack-ruby-bot/rspec/support/spec_helpers.rb +2 -0
  65. data/lib/slack-ruby-bot/server.rb +5 -28
  66. data/lib/slack-ruby-bot/support/loggable.rb +2 -0
  67. data/lib/slack-ruby-bot/version.rb +3 -1
  68. data/lib/slack_ruby_bot.rb +2 -0
  69. data/screenshots/create-classic-app.png +0 -0
  70. data/slack-ruby-bot.gemspec +6 -3
  71. data/spec/slack-ruby-bot/app_spec.rb +64 -1
  72. data/spec/slack-ruby-bot/client_spec.rb +103 -28
  73. data/spec/slack-ruby-bot/commands/about_spec.rb +2 -0
  74. data/spec/slack-ruby-bot/commands/aliases_spec.rb +2 -0
  75. data/spec/slack-ruby-bot/commands/attachment_spec.rb +2 -0
  76. data/spec/slack-ruby-bot/commands/bot_message_spec.rb +2 -0
  77. data/spec/slack-ruby-bot/commands/bot_messages_spec.rb +26 -0
  78. data/spec/slack-ruby-bot/commands/bot_spec.rb +2 -0
  79. data/spec/slack-ruby-bot/commands/commands_command_classes_spec.rb +2 -0
  80. data/spec/slack-ruby-bot/commands/commands_permitted_spec.rb +2 -0
  81. data/spec/slack-ruby-bot/commands/commands_precedence_spec.rb +2 -0
  82. data/spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb +2 -0
  83. data/spec/slack-ruby-bot/commands/commands_regexp_spec.rb +2 -0
  84. data/spec/slack-ruby-bot/commands/commands_spaces_spec.rb +2 -0
  85. data/spec/slack-ruby-bot/commands/commands_spec.rb +2 -0
  86. data/spec/slack-ruby-bot/commands/commands_with_block_spec.rb +2 -0
  87. data/spec/slack-ruby-bot/commands/commands_with_expression_spec.rb +2 -0
  88. data/spec/slack-ruby-bot/commands/direct_messages_spec.rb +2 -0
  89. data/spec/slack-ruby-bot/commands/empty_text_spec.rb +2 -0
  90. data/spec/slack-ruby-bot/commands/help_spec.rb +15 -13
  91. data/spec/slack-ruby-bot/commands/hi_spec.rb +2 -0
  92. data/spec/slack-ruby-bot/commands/match_spec.rb +2 -0
  93. data/spec/slack-ruby-bot/commands/message_loop_spec.rb +2 -0
  94. data/spec/slack-ruby-bot/commands/nil_message_spec.rb +2 -0
  95. data/spec/slack-ruby-bot/commands/non_breaking_space_spec.rb +29 -0
  96. data/spec/slack-ruby-bot/commands/not_implemented_spec.rb +2 -0
  97. data/spec/slack-ruby-bot/commands/operators_spec.rb +2 -0
  98. data/spec/slack-ruby-bot/commands/operators_with_block_spec.rb +2 -0
  99. data/spec/slack-ruby-bot/commands/scan_spec.rb +2 -0
  100. data/spec/slack-ruby-bot/commands/send_message_spec.rb +2 -0
  101. data/spec/slack-ruby-bot/commands/support/attrs_spec.rb +2 -0
  102. data/spec/slack-ruby-bot/commands/support/help_spec.rb +2 -0
  103. data/spec/slack-ruby-bot/commands/support/match_spec.rb +2 -0
  104. data/spec/slack-ruby-bot/commands/unknown_spec.rb +2 -0
  105. data/spec/slack-ruby-bot/config_spec.rb +2 -57
  106. data/spec/slack-ruby-bot/hooks/hello_spec.rb +51 -0
  107. data/spec/slack-ruby-bot/hooks/hook_support_spec.rb +2 -5
  108. data/spec/slack-ruby-bot/hooks/message_spec.rb +8 -35
  109. data/spec/slack-ruby-bot/hooks/set_spec.rb +2 -0
  110. data/spec/slack-ruby-bot/mvc/controller/controller_to_command_spec.rb +2 -0
  111. data/spec/slack-ruby-bot/rspec/respond_with_error_spec.rb +2 -0
  112. data/spec/slack-ruby-bot/rspec/respond_with_slack_message_spec.rb +20 -0
  113. data/spec/slack-ruby-bot/rspec/respond_with_slack_messages_spec.rb +36 -0
  114. data/spec/slack-ruby-bot/rspec/start_typing_spec.rb +36 -0
  115. data/spec/slack-ruby-bot/server_spec.rb +6 -33
  116. data/spec/slack-ruby-bot/support/loggable_spec.rb +2 -0
  117. data/spec/slack-ruby-bot/version_spec.rb +2 -0
  118. data/spec/spec_helper.rb +3 -6
  119. data/{lib/slack-ruby-bot/rspec → spec}/support/fixtures/slack/migration_in_progress.yml +0 -0
  120. data/{lib/slack-ruby-bot/rspec → spec}/support/vcr.rb +2 -0
  121. metadata +28 -29
  122. data/lib/initializers/giphy.rb +0 -8
  123. data/lib/initializers/giphy_client.rb +0 -39
  124. data/lib/slack-ruby-bot/rspec/support/fixtures/slack/giphy_burrito.yml +0 -69
  125. data/lib/slack-ruby-bot/rspec/support/fixtures/slack/giphy_client_burrito.yml +0 -71
  126. data/lib/slack-ruby-bot/rspec/support/fixtures/slack/giphy_client_burrito_rated_y.yml +0 -71
  127. data/screenshots/register-bot.png +0 -0
  128. data/spec/slack-ruby-bot/commands/send_gif_spec.rb +0 -25
  129. data/spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb +0 -38
  130. data/spec/slack-ruby-bot/initializers/giphy_client_spec.rb +0 -28
  131. data/spec/slack-ruby-bot/initializers/giphy_spec.rb +0 -18
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe SlackRubyBot::Hooks::Set do
2
4
  let(:client) { Slack::RealTime::Client.new }
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe SlackRubyBot::MVC::Controller::Base, 'initialization' do
2
4
  let(:model) { double('model') }
3
5
  let(:view) { double('view') }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe RSpec do
2
4
  let! :command do
3
5
  Class.new(SlackRubyBot::Commands::Base) do
@@ -1,6 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe RSpec do
2
4
  let! :command do
3
5
  Class.new(SlackRubyBot::Commands::Base) do
6
+ command 'no message' do |client, data, _match|
7
+ end
4
8
  command 'single message with as_user' do |client, data, _match|
5
9
  client.say(text: 'single response', channel: data.channel, as_user: true)
6
10
  end
@@ -25,6 +29,22 @@ describe RSpec do
25
29
  expect(message: "#{SlackRubyBot.config.user} single message")
26
30
  .to respond_with_slack_message(/single response/i)
27
31
  end
32
+ it 'respond with any message' do
33
+ expect(message: "#{SlackRubyBot.config.user} single message")
34
+ .to respond_with_slack_message
35
+ end
36
+ it 'correctly reports error' do
37
+ expect do
38
+ expect(message: "#{SlackRubyBot.config.user} single message")
39
+ .to respond_with_slack_message('another response')
40
+ end.to raise_error RSpec::Expectations::ExpectationNotMetError, "expected to receive message with text: another response once,\n received:[{:text=>\"single response\", :channel=>\"channel\"}]"
41
+ end
42
+ it 'correctly reports error without message' do
43
+ expect do
44
+ expect(message: "#{SlackRubyBot.config.user} no message")
45
+ .to respond_with_slack_message('another response')
46
+ end.to raise_error RSpec::Expectations::ExpectationNotMetError, "expected to receive message with text: another response once,\n received:none"
47
+ end
28
48
  it 'respond_with_single_message_using_partial_regex_match' do
29
49
  expect(message: "#{SlackRubyBot.config.user} single message")
30
50
  .to respond_with_slack_message(/si[n|N]gle/)
@@ -1,6 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe RSpec do
2
4
  let! :command do
3
5
  Class.new(SlackRubyBot::Commands::Base) do
6
+ command 'do not respond' do |client, data, _match|
7
+ end
8
+ command 'respond once' do |client, data, _match|
9
+ client.say(text: 'response', channel: data.channel, as_user: true)
10
+ end
4
11
  command 'respond with as_user' do |client, data, _match|
5
12
  5.times do |i|
6
13
  client.say(text: "response #{i}", channel: data.channel, as_user: true)
@@ -29,6 +36,26 @@ describe RSpec do
29
36
  expect(message: "#{SlackRubyBot.config.user} respond 5 times")
30
37
  .to respond_with_slack_messages(expected_responses)
31
38
  end
39
+ it 'respond with multiple messages' do
40
+ expect(message: "#{SlackRubyBot.config.user} respond 5 times")
41
+ .to respond_with_slack_messages
42
+ end
43
+ it 'respond once' do
44
+ expect do
45
+ expect(message: "#{SlackRubyBot.config.user} respond once")
46
+ .to respond_with_slack_messages
47
+ end.to raise_error RSpec::Expectations::ExpectationNotMetError, 'Expected to receive multiple messages, got 1'
48
+ end
49
+ it 'do not respond' do
50
+ expect(message: "#{SlackRubyBot.config.user} do not respond")
51
+ .to_not respond_with_slack_messages
52
+ end
53
+ it 'correctly reports error on do not respond' do
54
+ expect do
55
+ expect(message: "#{SlackRubyBot.config.user} do not respond")
56
+ .to respond_with_slack_messages
57
+ end.to raise_error RSpec::Expectations::ExpectationNotMetError, 'Expected to receive multiple messages, got none'
58
+ end
32
59
  it 'respond_with_multiple_messages_using_string_matches' do
33
60
  expected_responses = []
34
61
  5.times { |i| expected_responses.push("response #{i}") }
@@ -41,6 +68,15 @@ describe RSpec do
41
68
  expect(message: "#{SlackRubyBot.config.user} respond 5 times")
42
69
  .not_to respond_with_slack_messages(expected_responses)
43
70
  end
71
+ it 'correctly reports error' do
72
+ expect do
73
+ expected_responses = []
74
+ 6.times { |i| expected_responses.push("response #{i}") }
75
+ expect(message: "#{SlackRubyBot.config.user} respond 5 times")
76
+ .to respond_with_slack_messages(expected_responses)
77
+ end.to raise_error RSpec::Expectations::ExpectationNotMetError, 'Expected text: response 5, got none'
78
+ end
79
+
44
80
  it 'respond_with_multiple_messages_using_string_matches_with_extra_arg' do
45
81
  expected_responses = []
46
82
  5.times { |i| expected_responses.push("response #{i}") }
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ describe RSpec do
4
+ let! :command do
5
+ Class.new(SlackRubyBot::Commands::Base) do
6
+ command 'types on the correct channel' do |client, data, _match|
7
+ client.typing(channel: data.channel)
8
+ end
9
+ command 'types on another channel' do |client, _data, _match|
10
+ client.typing(channel: 'another')
11
+ end
12
+ end
13
+ end
14
+
15
+ def app
16
+ SlackRubyBot::App.new
17
+ end
18
+ it 'types on any channel' do
19
+ expect(message: "#{SlackRubyBot.config.user} types on the correct channel", channel: 'channel')
20
+ .to start_typing
21
+ end
22
+ it 'types on another channel' do
23
+ expect(message: "#{SlackRubyBot.config.user} types on another channel", channel: 'channel')
24
+ .to start_typing(channel: 'another')
25
+ end
26
+ it 'types an invalid channel' do
27
+ expect(message: "#{SlackRubyBot.config.user} types on another channel", channel: 'channel')
28
+ .to_not start_typing(channel: 'invalid')
29
+ end
30
+ it 'correctly reports error' do
31
+ expect do
32
+ expect(message: "#{SlackRubyBot.config.user} types on another channel", channel: 'channel')
33
+ .to start_typing(channel: 'invalid')
34
+ end.to raise_error RSpec::Expectations::ExpectationNotMetError, "expected to receive typing with: {:channel=>\"invalid\"} once,\n received:{:channel=>\"another\"}"
35
+ end
36
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe SlackRubyBot::Server do
2
4
  let(:logger) { subject.send :logger }
3
5
  let(:client) { Slack::RealTime::Client.new }
@@ -13,18 +15,6 @@ describe SlackRubyBot::Server do
13
15
  expect(server.send(:client).token).to eq 'token'
14
16
  end
15
17
 
16
- it 'send_gifs is false without giphy', unless: WithGiphy.env? do
17
- server = SlackRubyBot::Server.new(send_gifs: true)
18
- expect(server.send(:client).send_gifs?).to be false
19
- end
20
-
21
- it 'send_gifs', if: WithGiphy.env? do
22
- server = SlackRubyBot::Server.new(send_gifs: true)
23
- expect(server.send(:client).send_gifs?).to be true
24
- server = SlackRubyBot::Server.new(send_gifs: false)
25
- expect(server.send(:client).send_gifs?).to be false
26
- end
27
-
28
18
  it 'aliases' do
29
19
  server = SlackRubyBot::Server.new(aliases: %w[foo bar])
30
20
  expect(server.send(:client).aliases).to eq %w[foo bar]
@@ -38,16 +28,16 @@ describe SlackRubyBot::Server do
38
28
  end
39
29
  it 'creates a client with a token' do
40
30
  expect(client).to receive(:start!) { raise 'expected' }
41
- expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs: nil, aliases: nil).and_return(client)
31
+ expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', aliases: nil).and_return(client)
42
32
  expect { subject.start! }.to raise_error RuntimeError, 'expected'
43
33
  end
44
34
  it 'asynchronously creates a client with a token' do
45
35
  expect(client).to receive(:start_async) { raise 'expected' }
46
- expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs: nil, aliases: nil).and_return(client)
36
+ expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', aliases: nil).and_return(client)
47
37
  expect { subject.start_async }.to raise_error RuntimeError, 'expected'
48
38
  end
49
39
  it 'stops client' do
50
- expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs: nil, aliases: nil).and_return(client)
40
+ expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', aliases: nil).and_return(client)
51
41
  expect(subject.send(:client)).to_not be nil
52
42
  expect(client).to receive(:started?).and_return(true)
53
43
  subject.stop!
@@ -66,7 +56,7 @@ describe SlackRubyBot::Server do
66
56
  subject.run
67
57
  end.to raise_error Slack::Web::Api::Error, 'unknown'
68
58
  end
69
- [Faraday::Error::ConnectionFailed, Faraday::Error::TimeoutError, Faraday::Error::SSLError].each do |err|
59
+ [Faraday::ConnectionFailed, Faraday::TimeoutError, Faraday::SSLError].each do |err|
70
60
  it err.to_s do
71
61
  expect(client).to receive(:start!) { raise err, 'Faraday' }
72
62
  expect(client).to receive(:start!) { raise 'unknown' }
@@ -94,21 +84,4 @@ describe SlackRubyBot::Server do
94
84
  end
95
85
  end
96
86
  end
97
- context '#restart!' do
98
- subject do
99
- SlackRubyBot::Server.new(token: 'token')
100
- end
101
- it 'reloads server after disconnection' do
102
- expect(subject).to receive(:restart!)
103
- subject.send(:client).send(:callbacks)['close'].first.call
104
- expect(subject.instance_variable_get(:@stopping)).to be_falsy
105
- end
106
- it 'does not reload server for inactive account' do
107
- stopping = -> { subject.instance_variable_get :@stopping }
108
- allow(subject).to receive(:start!) { raise StandardError, 'account_inactive' }
109
- expect(stopping.call).to be_falsy
110
- subject.restart!
111
- expect(stopping.call).to be true
112
- end
113
- end
114
87
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe SlackRubyBot::Loggable do
2
4
  let!(:class_with_logger) { Class.new SlackRubyBot::Commands::Base }
3
5
  let!(:child_class_with_logger) { Class.new class_with_logger }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe SlackRubyBot do
2
4
  it 'has a version' do
3
5
  expect(SlackRubyBot::VERSION).to_not be nil
@@ -1,8 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'slack-ruby-bot/rspec'
2
4
  require 'webmock/rspec'
3
-
4
- module WithGiphy
5
- def self.env?
6
- ENV.key?('WITH_GIPHY') || ENV.key?('WITH_GIPHY_CLIENT')
7
- end
8
- end
5
+ require_relative 'support/vcr'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'vcr'
2
4
 
3
5
  VCR.configure do |config|
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.11.2
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-01 00:00:00.000000000 Z
11
+ date: 2020-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.6.0
33
+ version: 0.14.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
- version: 0.6.0
40
+ version: 0.14.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack-test
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.58.2
89
+ version: 0.80.1
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
- version: 0.58.2
96
+ version: 0.80.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: vcr
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -122,12 +122,13 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description:
125
+ description:
126
126
  email: dblock@dblock.org
127
127
  executables: []
128
128
  extensions: []
129
129
  extra_rdoc_files: []
130
130
  files:
131
+ - ".github/FUNDING.yml"
131
132
  - ".gitignore"
132
133
  - ".rspec"
133
134
  - ".rubocop.yml"
@@ -139,6 +140,7 @@ files:
139
140
  - Dangerfile
140
141
  - Gemfile
141
142
  - LICENSE.md
143
+ - MIGRATION.md
142
144
  - README.md
143
145
  - RELEASING.md
144
146
  - Rakefile
@@ -159,8 +161,6 @@ files:
159
161
  - lib/config/application.rb
160
162
  - lib/config/boot.rb
161
163
  - lib/config/environment.rb
162
- - lib/initializers/giphy.rb
163
- - lib/initializers/giphy_client.rb
164
164
  - lib/slack-ruby-bot.rb
165
165
  - lib/slack-ruby-bot/about.rb
166
166
  - lib/slack-ruby-bot/app.rb
@@ -188,29 +188,25 @@ files:
188
188
  - lib/slack-ruby-bot/mvc/view/base.rb
189
189
  - lib/slack-ruby-bot/rspec.rb
190
190
  - lib/slack-ruby-bot/rspec/support/bots_for_tests.rb
191
- - lib/slack-ruby-bot/rspec/support/fixtures/slack/giphy_burrito.yml
192
- - lib/slack-ruby-bot/rspec/support/fixtures/slack/giphy_client_burrito.yml
193
- - lib/slack-ruby-bot/rspec/support/fixtures/slack/giphy_client_burrito_rated_y.yml
194
- - lib/slack-ruby-bot/rspec/support/fixtures/slack/migration_in_progress.yml
195
191
  - lib/slack-ruby-bot/rspec/support/slack-ruby-bot/it_behaves_like_a_slack_bot.rb
196
192
  - lib/slack-ruby-bot/rspec/support/slack-ruby-bot/not_respond.rb
197
193
  - lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_error.rb
198
194
  - lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb
199
195
  - lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_messages.rb
196
+ - lib/slack-ruby-bot/rspec/support/slack-ruby-bot/start_typing.rb
200
197
  - lib/slack-ruby-bot/rspec/support/slack_api_key.rb
201
198
  - lib/slack-ruby-bot/rspec/support/slack_ruby_bot_configure.rb
202
199
  - lib/slack-ruby-bot/rspec/support/spec_helpers.rb
203
- - lib/slack-ruby-bot/rspec/support/vcr.rb
204
200
  - lib/slack-ruby-bot/server.rb
205
201
  - lib/slack-ruby-bot/support/loggable.rb
206
202
  - lib/slack-ruby-bot/version.rb
207
203
  - lib/slack_ruby_bot.rb
208
204
  - screenshots/aliases.gif
205
+ - screenshots/create-classic-app.png
209
206
  - screenshots/demo.gif
210
207
  - screenshots/dms.gif
211
208
  - screenshots/help.png
212
209
  - screenshots/market.gif
213
- - screenshots/register-bot.png
214
210
  - screenshots/weather.gif
215
211
  - slack-ruby-bot.gemspec
216
212
  - slack.png
@@ -220,6 +216,7 @@ files:
220
216
  - spec/slack-ruby-bot/commands/aliases_spec.rb
221
217
  - spec/slack-ruby-bot/commands/attachment_spec.rb
222
218
  - spec/slack-ruby-bot/commands/bot_message_spec.rb
219
+ - spec/slack-ruby-bot/commands/bot_messages_spec.rb
223
220
  - spec/slack-ruby-bot/commands/bot_spec.rb
224
221
  - spec/slack-ruby-bot/commands/commands_command_classes_spec.rb
225
222
  - spec/slack-ruby-bot/commands/commands_permitted_spec.rb
@@ -237,36 +234,37 @@ files:
237
234
  - spec/slack-ruby-bot/commands/match_spec.rb
238
235
  - spec/slack-ruby-bot/commands/message_loop_spec.rb
239
236
  - spec/slack-ruby-bot/commands/nil_message_spec.rb
237
+ - spec/slack-ruby-bot/commands/non_breaking_space_spec.rb
240
238
  - spec/slack-ruby-bot/commands/not_implemented_spec.rb
241
239
  - spec/slack-ruby-bot/commands/operators_spec.rb
242
240
  - spec/slack-ruby-bot/commands/operators_with_block_spec.rb
243
241
  - spec/slack-ruby-bot/commands/scan_spec.rb
244
- - spec/slack-ruby-bot/commands/send_gif_spec.rb
245
242
  - spec/slack-ruby-bot/commands/send_message_spec.rb
246
- - spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb
247
243
  - spec/slack-ruby-bot/commands/support/attrs_spec.rb
248
244
  - spec/slack-ruby-bot/commands/support/help_spec.rb
249
245
  - spec/slack-ruby-bot/commands/support/match_spec.rb
250
246
  - spec/slack-ruby-bot/commands/unknown_spec.rb
251
247
  - spec/slack-ruby-bot/config_spec.rb
248
+ - spec/slack-ruby-bot/hooks/hello_spec.rb
252
249
  - spec/slack-ruby-bot/hooks/hook_support_spec.rb
253
250
  - spec/slack-ruby-bot/hooks/message_spec.rb
254
251
  - spec/slack-ruby-bot/hooks/set_spec.rb
255
- - spec/slack-ruby-bot/initializers/giphy_client_spec.rb
256
- - spec/slack-ruby-bot/initializers/giphy_spec.rb
257
252
  - spec/slack-ruby-bot/mvc/controller/controller_to_command_spec.rb
258
253
  - spec/slack-ruby-bot/rspec/respond_with_error_spec.rb
259
254
  - spec/slack-ruby-bot/rspec/respond_with_slack_message_spec.rb
260
255
  - spec/slack-ruby-bot/rspec/respond_with_slack_messages_spec.rb
256
+ - spec/slack-ruby-bot/rspec/start_typing_spec.rb
261
257
  - spec/slack-ruby-bot/server_spec.rb
262
258
  - spec/slack-ruby-bot/support/loggable_spec.rb
263
259
  - spec/slack-ruby-bot/version_spec.rb
264
260
  - spec/spec_helper.rb
261
+ - spec/support/fixtures/slack/migration_in_progress.yml
262
+ - spec/support/vcr.rb
265
263
  homepage: https://github.com/slack-ruby/slack-ruby-bot
266
264
  licenses:
267
265
  - MIT
268
266
  metadata: {}
269
- post_install_message:
267
+ post_install_message:
270
268
  rdoc_options: []
271
269
  require_paths:
272
270
  - lib
@@ -274,16 +272,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
274
272
  requirements:
275
273
  - - ">="
276
274
  - !ruby/object:Gem::Version
277
- version: '0'
275
+ version: '2.3'
278
276
  required_rubygems_version: !ruby/object:Gem::Requirement
279
277
  requirements:
280
278
  - - ">="
281
279
  - !ruby/object:Gem::Version
282
280
  version: 1.3.6
283
281
  requirements: []
284
- rubyforge_project:
285
- rubygems_version: 2.7.6
286
- signing_key:
282
+ rubygems_version: 3.1.2
283
+ signing_key:
287
284
  specification_version: 4
288
285
  summary: The easiest way to write a Slack bot in Ruby.
289
286
  test_files:
@@ -293,6 +290,7 @@ test_files:
293
290
  - spec/slack-ruby-bot/commands/aliases_spec.rb
294
291
  - spec/slack-ruby-bot/commands/attachment_spec.rb
295
292
  - spec/slack-ruby-bot/commands/bot_message_spec.rb
293
+ - spec/slack-ruby-bot/commands/bot_messages_spec.rb
296
294
  - spec/slack-ruby-bot/commands/bot_spec.rb
297
295
  - spec/slack-ruby-bot/commands/commands_command_classes_spec.rb
298
296
  - spec/slack-ruby-bot/commands/commands_permitted_spec.rb
@@ -310,28 +308,29 @@ test_files:
310
308
  - spec/slack-ruby-bot/commands/match_spec.rb
311
309
  - spec/slack-ruby-bot/commands/message_loop_spec.rb
312
310
  - spec/slack-ruby-bot/commands/nil_message_spec.rb
311
+ - spec/slack-ruby-bot/commands/non_breaking_space_spec.rb
313
312
  - spec/slack-ruby-bot/commands/not_implemented_spec.rb
314
313
  - spec/slack-ruby-bot/commands/operators_spec.rb
315
314
  - spec/slack-ruby-bot/commands/operators_with_block_spec.rb
316
315
  - spec/slack-ruby-bot/commands/scan_spec.rb
317
- - spec/slack-ruby-bot/commands/send_gif_spec.rb
318
316
  - spec/slack-ruby-bot/commands/send_message_spec.rb
319
- - spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb
320
317
  - spec/slack-ruby-bot/commands/support/attrs_spec.rb
321
318
  - spec/slack-ruby-bot/commands/support/help_spec.rb
322
319
  - spec/slack-ruby-bot/commands/support/match_spec.rb
323
320
  - spec/slack-ruby-bot/commands/unknown_spec.rb
324
321
  - spec/slack-ruby-bot/config_spec.rb
322
+ - spec/slack-ruby-bot/hooks/hello_spec.rb
325
323
  - spec/slack-ruby-bot/hooks/hook_support_spec.rb
326
324
  - spec/slack-ruby-bot/hooks/message_spec.rb
327
325
  - spec/slack-ruby-bot/hooks/set_spec.rb
328
- - spec/slack-ruby-bot/initializers/giphy_client_spec.rb
329
- - spec/slack-ruby-bot/initializers/giphy_spec.rb
330
326
  - spec/slack-ruby-bot/mvc/controller/controller_to_command_spec.rb
331
327
  - spec/slack-ruby-bot/rspec/respond_with_error_spec.rb
332
328
  - spec/slack-ruby-bot/rspec/respond_with_slack_message_spec.rb
333
329
  - spec/slack-ruby-bot/rspec/respond_with_slack_messages_spec.rb
330
+ - spec/slack-ruby-bot/rspec/start_typing_spec.rb
334
331
  - spec/slack-ruby-bot/server_spec.rb
335
332
  - spec/slack-ruby-bot/support/loggable_spec.rb
336
333
  - spec/slack-ruby-bot/version_spec.rb
337
334
  - spec/spec_helper.rb
335
+ - spec/support/fixtures/slack/migration_in_progress.yml
336
+ - spec/support/vcr.rb