bixby-common 0.4.3 → 0.4.4
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/VERSION +1 -1
- data/bixby-common.gemspec +2 -2
- data/lib/bixby-common/websocket/client.rb +8 -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: ab49bbeea61a049b16a3052cf226339fe4ac645a
|
4
|
+
data.tar.gz: 80ed512df18cbce6fe9f90e57fab0f1a315de3f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59e70fb49c063504490f264c1a7cd50db08a2b3da32795150faf4d9458b8f8d36a6fa710bf90a029214129218b79ce57beb2dcb35e13bb250afc9d21b72c2593
|
7
|
+
data.tar.gz: 45766f490d69f003c228f37a88357d1941b3ebbc3c3ce16894fd545702b8f05ddca9e4e03ed5ccdf712b2f6b5530d5ab0e7623788ed912747aa73e0b2da2e3f4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4
|
data/bixby-common.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "bixby-common"
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Chetan Sarva"]
|
12
|
-
s.date = "2013-09-
|
12
|
+
s.date = "2013-09-10"
|
13
13
|
s.description = "Bixby Common files/libs"
|
14
14
|
s.email = "chetan@pixelcop.net"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -30,6 +30,7 @@ module Bixby
|
|
30
30
|
@exiting = true
|
31
31
|
end
|
32
32
|
|
33
|
+
logger.debug "connecting to #{@url}"
|
33
34
|
EM.run {
|
34
35
|
connect()
|
35
36
|
}
|
@@ -46,11 +47,13 @@ module Bixby
|
|
46
47
|
# Connect to the WebSocket endpoint given by @url. Will attempt to keep
|
47
48
|
# the connection open forever, reconnecting as needed.
|
48
49
|
def connect
|
50
|
+
|
49
51
|
@ws = Faye::WebSocket::Client.new(@url, nil, :ping => 60)
|
50
52
|
@api = Bixby::WebSocket::APIChannel.new(@ws, @handler)
|
51
53
|
|
52
54
|
ws.on :open do |e|
|
53
55
|
begin
|
56
|
+
logger.info "connected to manager at #{@url}"
|
54
57
|
api.open(e)
|
55
58
|
@tries = 0
|
56
59
|
|
@@ -78,6 +81,11 @@ module Bixby
|
|
78
81
|
|
79
82
|
ws.on :close do |e|
|
80
83
|
begin
|
84
|
+
if api.connected? then
|
85
|
+
logger.info "lost connection to manager"
|
86
|
+
else
|
87
|
+
logger.debug "failed to connect"
|
88
|
+
end
|
81
89
|
api.close(e)
|
82
90
|
backoff()
|
83
91
|
connect()
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bixby-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chetan Sarva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faye-websocket
|