sinatra-websocketio 0.2.9 → 0.3.0
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/History.txt +4 -0
- data/lib/sinatra-websocketio/version.rb +1 -1
- data/lib/sinatra/websocketio/client.rb +8 -7
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b83dc719bf8ed37455c090ba2287913f329aced2
|
4
|
+
data.tar.gz: 47d6068f5cc0d471615b4f722592e47e9a977d4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49abc41bf2af0cbb67b8e324c36c2f70fb1adc7fb9a4f56db05537ae124a03643936488c66197af4514a4b99274875184dc64fe178b0726b5a8b5d983d1e8563
|
7
|
+
data.tar.gz: 1af7b11d20f46cd4acb4c1aca348d6184c15df88095dad24e811802b40c0e903310413d424c957330bae95dce32571e7aeeabdf6117b007e632da1d18602c7f3
|
data/History.txt
CHANGED
@@ -31,7 +31,7 @@ module Sinatra
|
|
31
31
|
@thread_heartbeat = Thread.new do
|
32
32
|
while @connecting
|
33
33
|
push :__heartbeat, {:time => Time.now.to_i}
|
34
|
-
sleep
|
34
|
+
sleep 5
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -44,10 +44,13 @@ module Sinatra
|
|
44
44
|
url = @session ? "#{@url}/session=#{@session}" : @url
|
45
45
|
@websocket = nil
|
46
46
|
begin
|
47
|
-
@
|
47
|
+
Timeout::timeout @timeout do
|
48
|
+
@websocket = WebSocket::Client::Simple::Client.new url
|
49
|
+
end
|
48
50
|
rescue StandardError, Timeout::Error => e
|
51
|
+
this.emit :error, e
|
49
52
|
Thread.new do
|
50
|
-
|
53
|
+
sleep 5
|
51
54
|
connect
|
52
55
|
end
|
53
56
|
end
|
@@ -68,10 +71,8 @@ module Sinatra
|
|
68
71
|
this.emit :disconnect, e
|
69
72
|
end
|
70
73
|
if this.running
|
71
|
-
|
72
|
-
|
73
|
-
this.connect
|
74
|
-
end
|
74
|
+
sleep 1
|
75
|
+
this.connect
|
75
76
|
end
|
76
77
|
end
|
77
78
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-websocketio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Hashimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -245,3 +245,4 @@ test_files:
|
|
245
245
|
- test/app/main.rb
|
246
246
|
- test/test_helper.rb
|
247
247
|
- test/test_websocketio.rb
|
248
|
+
has_rdoc:
|