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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2218b772e2fa2261ad14b39a355c5f7ff68a2ee7
4
- data.tar.gz: c2966f8409a876bfc8162279c4e23435bf309915
3
+ metadata.gz: 8bd0c0364ece9e2ebd2f1ce6a41a4311f73123fd
4
+ data.tar.gz: 4de299278c057094dd8cf13cbffe76ca13ced802
5
5
  SHA512:
6
- metadata.gz: f8b480dc2c46448438cdff2bd8d69713b460e86c2e393a9dde31a5e551c4bb790f4a50aabc1607f01d80b99fa061c494f90706e2d18dedd1ea93116bae9e57c0
7
- data.tar.gz: e47b507a2f9129d6f2033f25945529ef4fd1e956155e8507ed06c8db6929ece40543dad4644a664af9c6da48e45e2931b3bf7a57f8e788e72fb40c42f43dc5f5
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 = WebSocket::Client::Simple.connect(websocket_url.to_s)
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
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module SlackRTM
3
- VERSION = '2.1.0'
3
+ VERSION = '2.2.0'
4
4
  end
5
5
  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.1.0
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-20 00:00:00.000000000 Z
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.5.1
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