ruboty-slack_rtm 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruboty/slack_rtm/client.rb +13 -0
- data/lib/ruboty/slack_rtm/version.rb +1 -1
- 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: 2218b772e2fa2261ad14b39a355c5f7ff68a2ee7
|
4
|
+
data.tar.gz: c2966f8409a876bfc8162279c4e23435bf309915
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8b480dc2c46448438cdff2bd8d69713b460e86c2e393a9dde31a5e551c4bb790f4a50aabc1607f01d80b99fa061c494f90706e2d18dedd1ea93116bae9e57c0
|
7
|
+
data.tar.gz: e47b507a2f9129d6f2033f25945529ef4fd1e956155e8507ed06c8db6929ece40543dad4644a664af9c6da48e45e2931b3bf7a57f8e788e72fb40c42f43dc5f5
|
@@ -21,11 +21,24 @@ module Ruboty
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def main_loop
|
24
|
+
keep_connection
|
25
|
+
|
24
26
|
loop do
|
25
27
|
message = @queue.deq
|
26
28
|
@client.send(message)
|
27
29
|
end
|
28
30
|
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def keep_connection
|
35
|
+
Thread.start do
|
36
|
+
loop do
|
37
|
+
sleep(30)
|
38
|
+
@client.send(type: 'ping')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
29
42
|
end
|
30
43
|
end
|
31
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-slack_rtm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Kusano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|