ruboty-slack_rtm 2.1.0 → 2.2.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 +10 -1
- data/lib/ruboty/slack_rtm/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bd0c0364ece9e2ebd2f1ce6a41a4311f73123fd
|
4
|
+
data.tar.gz: 4de299278c057094dd8cf13cbffe76ca13ced802
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c24921dd9b60bd12ff632f9ff5f43149fe10e65623b9569df3c9edfd10ea091d698094d3355d869ae99243b78f2961d7006a5a2bda2c424942edde88c0cd54b
|
7
|
+
data.tar.gz: 0a2d3cc76986ed21306b069b8fb10cfd846f2c18922b228279f92b8bf5c733e5e8e5490dd04c33b86a105d3c48b980cb80988fca8490b24377672bbd9ad4920e
|
@@ -5,7 +5,8 @@ module Ruboty
|
|
5
5
|
module SlackRTM
|
6
6
|
class Client
|
7
7
|
def initialize(websocket_url:)
|
8
|
-
@client =
|
8
|
+
@client = create_client(websocket_url.to_s)
|
9
|
+
|
9
10
|
@queue = Queue.new
|
10
11
|
end
|
11
12
|
|
@@ -31,6 +32,14 @@ module Ruboty
|
|
31
32
|
|
32
33
|
private
|
33
34
|
|
35
|
+
def create_client(url)
|
36
|
+
WebSocket::Client::Simple.connect(url).tap do |client|
|
37
|
+
client.on(:error) do |err|
|
38
|
+
Ruboty.logger.error("#{err.class}: #{err.message}\n#{err.backtrace.join("\n")}")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
34
43
|
def keep_connection
|
35
44
|
Thread.start do
|
36
45
|
loop do
|
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.2.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-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
134
|
rubyforge_project:
|
135
|
-
rubygems_version: 2.
|
135
|
+
rubygems_version: 2.6.3
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: Slack real time messaging adapter for Ruboty
|