sinatra-websocketio 0.2.8 → 0.2.9

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: 105841f611ba1b177e4fdbc27523e9ede7e5f9a8
4
- data.tar.gz: 333f97849781148127d4d473c04910c8c58b92ba
3
+ metadata.gz: f1416c915c6dafcf271982799675187ac2fc5b4f
4
+ data.tar.gz: 513c07b5cb3e00046410096232b1b8b0467e7d8a
5
5
  SHA512:
6
- metadata.gz: cbd2fcd973e3574635a596eaef49559cf507e05d1ea57e23dce2e60fbf957efc90449115120a3879172ef07c8dc697fba8b9226cdb19652d721e2010647fc36b
7
- data.tar.gz: 7f790256313ad4ff10130e8658afeb9b0c722a1574c5530e083093195535ca6c95bda06b1601f4e7a39a03e68045868088105a581c96dcc5e69aa08381bca479
6
+ metadata.gz: abffe18f4453b454193320a29682713457194289175852267d7f3981daebfe575ecd0abf250bd01f8f592c3dfc9cf048e4603e760c737d384bfafd04ded130da
7
+ data.tar.gz: 0d904cad61245d1879ef440a058784201421d437bf809b0f463538946fb7d75cd7b1f3229a016f50c06590e12420b473d2747fafa880391f40e706b25653c553
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.2.9 2013-05-15
2
+
3
+ * push "__heartbeat" in Ruby Client for detecting disconnect event
4
+
1
5
  === 0.2.8 2013-04-18
2
6
 
3
7
  * set default websocket port 9000
@@ -26,6 +26,15 @@ module Sinatra
26
26
  @session = session_id
27
27
  emit :connect, @session
28
28
  end
29
+
30
+ on :connect do
31
+ @thread_heartbeat = Thread.new do
32
+ while @connecting
33
+ push :__heartbeat, {:time => Time.now.to_i}
34
+ sleep 10
35
+ end
36
+ end
37
+ end
29
38
  end
30
39
 
31
40
  def connect
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module WebSocketIO
3
- VERSION = "0.2.8"
3
+ VERSION = "0.2.9"
4
4
  end
5
5
  end
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.2.8
4
+ version: 0.2.9
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-04-17 00:00:00.000000000 Z
11
+ date: 2013-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest