slack-ruby-bot 0.5.0 → 0.5.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 +5 -1
- data/README.md +7 -1
- data/TUTORIAL.md +2 -0
- data/lib/slack-ruby-bot/app.rb +1 -1
- data/lib/slack-ruby-bot/server.rb +7 -1
- data/lib/slack-ruby-bot/version.rb +1 -1
- data/spec/slack-ruby-bot/app_spec.rb +7 -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: 692c967d9fd9953f4279e4596fb01bd43b280914
|
4
|
+
data.tar.gz: 8c24ae4ccdee5c0667e97094ac527d3f28c75a25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25b5ad5e407f6cb817dae5e9f6516cec650d0feb34397d17e05b2ec2ed6291d7321968dad1b44f330efb1ddc47f4e995d7bb5100be6f5acd4713055e507963c6
|
7
|
+
data.tar.gz: 2e545f8960023ae2b79874a400083eb3601bcbea361776177da09ebdd16acf2281e831fa64ac3610e14a577eafab11fa1f790a57ade80b5fb5d62c04e1b133ca
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
### 0.5.1 (12/23/2015)
|
2
|
+
|
3
|
+
* Fix: restart sync vs. async - [@dblock](https://github.com/dblock).
|
4
|
+
* [#33](https://github.com/dblock/slack-ruby-bot/pull/33): `SlackRubyBot::App.instance` now creates an instance of the class on which it is called - [@dmvt](https://github.com/dmvt).
|
5
|
+
|
1
6
|
### 0.5.0 (12/7/2015)
|
2
7
|
|
3
8
|
* Disable animated GIFs via `SlackRubyBot::Config.send_gifs` or ENV['SLACK_RUBY_BOT_SEND_GIFS'] - [@dblock](https://github.com/dblock).
|
@@ -58,4 +63,3 @@
|
|
58
63
|
### 0.1.0 (6/2/2015)
|
59
64
|
|
60
65
|
* Initial public release - [@dblock](https://github.com/dblock).
|
61
|
-
|
data/README.md
CHANGED
@@ -9,9 +9,15 @@ A generic Slack bot framework written in Ruby on top of [slack-ruby-client](http
|
|
9
9
|
|
10
10
|

|
11
11
|
|
12
|
+
## Useful to Me?
|
13
|
+
|
14
|
+
* If you are just trying to send messages to Slack, use [slack-ruby-client](https://github.com/dblock/slack-ruby-client), which this library is built on top of.
|
15
|
+
* If you're trying to roll out a full service with Slack button integration, check out [slack-bot-server](https://github.com/dblock/slack-bot-server), which uses this library.
|
16
|
+
* Otherwise, this piece of the puzzle will help you create a single bot instance for one team.
|
17
|
+
|
12
18
|
## Stable Release
|
13
19
|
|
14
|
-
You're reading the documentation for the
|
20
|
+
You're reading the documentation for the **stable** release of slack-ruby-bot 0.5.1.
|
15
21
|
|
16
22
|
## Usage
|
17
23
|
|
data/TUTORIAL.md
CHANGED
data/lib/slack-ruby-bot/app.rb
CHANGED
@@ -42,11 +42,13 @@ module SlackRubyBot
|
|
42
42
|
|
43
43
|
def start!
|
44
44
|
@stopping = false
|
45
|
+
@async = false
|
45
46
|
client.start!
|
46
47
|
end
|
47
48
|
|
48
49
|
def start_async
|
49
50
|
@stopping = false
|
51
|
+
@async = true
|
50
52
|
client.start_async
|
51
53
|
end
|
52
54
|
|
@@ -56,7 +58,11 @@ module SlackRubyBot
|
|
56
58
|
end
|
57
59
|
|
58
60
|
def restart!(wait = 1)
|
59
|
-
|
61
|
+
if @async
|
62
|
+
start_async
|
63
|
+
else
|
64
|
+
start!
|
65
|
+
end
|
60
66
|
rescue StandardError => e
|
61
67
|
sleep wait
|
62
68
|
logger.error "#{e.message}, reconnecting in #{wait} second(s)."
|
@@ -5,4 +5,11 @@ describe SlackRubyBot::App do
|
|
5
5
|
SlackRubyBot::App.new
|
6
6
|
end
|
7
7
|
it_behaves_like 'a slack ruby bot'
|
8
|
+
|
9
|
+
describe '.instance' do
|
10
|
+
it 'creates an instance of the App subclass' do
|
11
|
+
klass = Class.new(SlackRubyBot::App)
|
12
|
+
expect(klass.instance.class).to be klass
|
13
|
+
end
|
14
|
+
end
|
8
15
|
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.5.
|
4
|
+
version: 0.5.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: 2015-12-
|
11
|
+
date: 2015-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|