slack-ruby-bot-server 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/CHANGELOG.md +5 -0
- data/Dangerfile +1 -0
- data/Gemfile +1 -0
- data/README.md +25 -1
- data/lib/slack-ruby-bot-server/ext/activerecord/slack-ruby-bot/commands/base.rb +1 -1
- data/lib/slack-ruby-bot-server/ext/mongoid/slack-ruby-bot/commands/base.rb +2 -2
- data/lib/slack-ruby-bot-server/version.rb +1 -1
- data/sample_apps/sample_app_activerecord/commands/help.rb +1 -1
- data/sample_apps/sample_app_activerecord/spec/commands/help_spec.rb +1 -1
- data/sample_apps/sample_app_mongoid/commands/help.rb +1 -1
- data/sample_apps/sample_app_mongoid/spec/commands/help_spec.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ba269cbf5d52a1ec63e186d89860b2d5fd3d2375126e93b0efcfb0db77233d2
|
4
|
+
data.tar.gz: f79f39c72303c00dcd90adc2229d95b98a8caff43a0cd1cfb2d40fd328e17214
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 619d8952361de54d239f127891f690460cc3a3e0d85ac69298a0a384d4caa52eb68bbf643e03f035c33723f8c1d3207e9ef7b17af76f0d47e0e0656b5d50fa79
|
7
|
+
data.tar.gz: 06a7f1c37a6c9ebd2b17aa6733790383c57ffdff9b0ca4b5344cc9701493fcbeb80d532bc134fbea52f69088e4007e0f7ee76a9cb3d2ab7ec1af082cc87024f3
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
github: [dblock]
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
### Changelog
|
2
2
|
|
3
|
+
#### 0.12.2 (2020/7/26)
|
4
|
+
|
5
|
+
* [#120](https://github.com/slack-ruby/slack-ruby-bot-server/pull/120): Removed GIFs - [@dblock](https://github.com/dblock).
|
6
|
+
* [#121](https://github.com/slack-ruby/slack-ruby-bot-server/pull/121): Added TOC - [@dblock](https://github.com/dblock).
|
7
|
+
|
3
8
|
#### 0.12.1 (2020/5/16)
|
4
9
|
|
5
10
|
* [#118](https://github.com/slack-ruby/slack-ruby-bot-server/pull/118): Do not fail to start on errors in `Team#purge!` - [@dblock](https://github.com/dblock).
|
data/Dangerfile
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -11,13 +11,36 @@ If you are not familiar with Slack bots or Slack API concepts, you might want to
|
|
11
11
|
|
12
12
|
A good [open-source demo](https://github.com/dblock/slack-strava) of a service built on top of this library is [Strava integration with Slack](https://slava.playplay.io).
|
13
13
|
|
14
|
+
# Table of Contents
|
15
|
+
|
16
|
+
- [What is this?](#what-is-this)
|
17
|
+
- [Stable Release](#stable-release)
|
18
|
+
- [Try Me](#try-me)
|
19
|
+
- [Run Your Own](#run-your-own)
|
20
|
+
- [MongoDB](#mongodb)
|
21
|
+
- [ActiveRecord](#activerecord)
|
22
|
+
- [Usage](#usage)
|
23
|
+
- [OAuth Code Grant](#oauth-code-grant)
|
24
|
+
- [API](#api)
|
25
|
+
- [App](#app)
|
26
|
+
- [Service Manager](#service-manager)
|
27
|
+
- [Lifecycle Callbacks](#lifecycle-callbacks)
|
28
|
+
- [Service Timers](#service-timers)
|
29
|
+
- [Extensions](#extensions)
|
30
|
+
- [Server Class](#server-class)
|
31
|
+
- [Service Class](#service-class)
|
32
|
+
- [HTML Templates](#html-templates)
|
33
|
+
- [Access Tokens](#access-tokens)
|
34
|
+
- [Example Bots Using Slack Ruby Bot Server](#example-bots-using-slack-ruby-bot-server)
|
35
|
+
- [Copyright & License](#copyright--license)
|
36
|
+
|
14
37
|
### What is this?
|
15
38
|
|
16
39
|
A library that contains a [Grape](http://github.com/ruby-grape/grape) API serving a [Slack Ruby Bot](https://github.com/slack-ruby/slack-ruby-bot) to multiple teams. This gem combines a web server, a RESTful API and multiple instances of [slack-ruby-bot](https://github.com/slack-ruby/slack-ruby-bot). It integrates with the [Slack Platform API](https://medium.com/slack-developer-blog/launch-platform-114754258b91#.od3y71dyo). Your customers can use a Slack button to install the bot.
|
17
40
|
|
18
41
|
### Stable Release
|
19
42
|
|
20
|
-
You're reading the documentation for the **
|
43
|
+
You're reading the documentation for the **stable** release of slack-ruby-bot-server, v0.12.2. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
|
21
44
|
|
22
45
|
### Try Me
|
23
46
|
|
@@ -222,6 +245,7 @@ end
|
|
222
245
|
|
223
246
|
A number of extensions use service manager callbacks and service timers to implement useful functionality.
|
224
247
|
|
248
|
+
* [slack-ruby-bot-server-events](https://github.com/slack-ruby/slack-ruby-bot-server-events): Easily handle Slack slash commands, interactive buttons and events.
|
225
249
|
* [slack-ruby-bot-server-mailchimp](https://github.com/slack-ruby/slack-ruby-bot-server-mailchimp): Subscribes new bot users to a Mailchimp mailing list.
|
226
250
|
* [slack-ruby-bot-server-stripe](https://github.com/slack-ruby/slack-ruby-bot-server-stripe): Enables paid bots with trial periods and commerce through Stripe.
|
227
251
|
|
@@ -9,7 +9,7 @@ module SlackRubyBot
|
|
9
9
|
rescue StandardError => e
|
10
10
|
logger.info "#{name.demodulize.upcase}: #{client.owner}, #{e.class}: #{e}"
|
11
11
|
logger.debug e.backtrace.join("\n")
|
12
|
-
client.say(channel: data.channel, text: e.message
|
12
|
+
client.say(channel: data.channel, text: e.message)
|
13
13
|
true
|
14
14
|
end
|
15
15
|
end
|
@@ -8,12 +8,12 @@ module SlackRubyBot
|
|
8
8
|
_invoke client, data
|
9
9
|
rescue Mongoid::Errors::Validations => e
|
10
10
|
logger.info "#{name.demodulize.upcase}: #{client.owner}, error - #{e.document.class}, #{e.document.errors.to_hash}"
|
11
|
-
client.say(channel: data.channel, text: e.document.errors.first[1]
|
11
|
+
client.say(channel: data.channel, text: e.document.errors.first[1])
|
12
12
|
true
|
13
13
|
rescue StandardError => e
|
14
14
|
logger.info "#{name.demodulize.upcase}: #{client.owner}, #{e.class}: #{e}"
|
15
15
|
logger.debug e.backtrace.join("\n")
|
16
|
-
client.say(channel: data.channel, text: e.message
|
16
|
+
client.say(channel: data.channel, text: e.message)
|
17
17
|
true
|
18
18
|
end
|
19
19
|
end
|
@@ -13,7 +13,7 @@ whoami - print your username
|
|
13
13
|
EOS
|
14
14
|
def self.call(client, data, _match)
|
15
15
|
client.say(channel: data.channel, text: [HELP, SlackRubyBotServer::INFO].join("\n"))
|
16
|
-
client.say(channel: data.channel
|
16
|
+
client.say(channel: data.channel)
|
17
17
|
logger.info "HELP: #{client.owner}, user=#{data.user}"
|
18
18
|
end
|
19
19
|
end
|
@@ -8,7 +8,7 @@ describe Help do
|
|
8
8
|
let(:message_hook) { SlackRubyBot::Hooks::Message.new }
|
9
9
|
it 'default' do
|
10
10
|
expect(client).to receive(:say).with(channel: 'channel', text: [Help::HELP, SlackRubyBotServer::INFO].join("\n"))
|
11
|
-
expect(client).to receive(:say).with(channel: 'channel'
|
11
|
+
expect(client).to receive(:say).with(channel: 'channel')
|
12
12
|
message_hook.call(client, Hashie::Mash.new(channel: 'channel', text: "#{SlackRubyBot.config.user} help"))
|
13
13
|
end
|
14
14
|
end
|
@@ -13,7 +13,7 @@ whoami - print your username
|
|
13
13
|
EOS
|
14
14
|
def self.call(client, data, _match)
|
15
15
|
client.say(channel: data.channel, text: [HELP, SlackRubyBotServer::INFO].join("\n"))
|
16
|
-
client.say(channel: data.channel
|
16
|
+
client.say(channel: data.channel)
|
17
17
|
logger.info "HELP: #{client.owner}, user=#{data.user}"
|
18
18
|
end
|
19
19
|
end
|
@@ -8,7 +8,7 @@ describe Help do
|
|
8
8
|
let(:message_hook) { SlackRubyBot::Hooks::Message.new }
|
9
9
|
it 'default' do
|
10
10
|
expect(client).to receive(:say).with(channel: 'channel', text: [Help::HELP, SlackRubyBotServer::INFO].join("\n"))
|
11
|
-
expect(client).to receive(:say).with(channel: 'channel'
|
11
|
+
expect(client).to receive(:say).with(channel: 'channel')
|
12
12
|
message_hook.call(client, Hashie::Mash.new(channel: 'channel', text: "#{SlackRubyBot.config.user} help"))
|
13
13
|
end
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack-ruby-bot-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
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: 2020-
|
11
|
+
date: 2020-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-websocket
|
@@ -150,13 +150,14 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 0.12.0
|
153
|
-
description:
|
153
|
+
description:
|
154
154
|
email:
|
155
155
|
- dblock@dblock.org
|
156
156
|
executables: []
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
+
- ".github/FUNDING.yml"
|
160
161
|
- ".gitignore"
|
161
162
|
- ".rspec"
|
162
163
|
- ".rubocop.yml"
|
@@ -264,7 +265,7 @@ files:
|
|
264
265
|
homepage: https://github.com/slack-ruby/slack-ruby-bot-server
|
265
266
|
licenses: []
|
266
267
|
metadata: {}
|
267
|
-
post_install_message:
|
268
|
+
post_install_message:
|
268
269
|
rdoc_options: []
|
269
270
|
require_paths:
|
270
271
|
- lib
|
@@ -279,8 +280,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
279
280
|
- !ruby/object:Gem::Version
|
280
281
|
version: '0'
|
281
282
|
requirements: []
|
282
|
-
rubygems_version: 3.1.
|
283
|
-
signing_key:
|
283
|
+
rubygems_version: 3.1.2
|
284
|
+
signing_key:
|
284
285
|
specification_version: 4
|
285
286
|
summary: A Grape API serving a Slack bot to multiple teams.
|
286
287
|
test_files: []
|