statscloud.io-ruby-socket.io-client-simple 1.2.1.pre.2 → 1.2.1.pre.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d38d58863ad968f43e336170f525090aa616de26b376ceb55497a8d911c9dec5
|
4
|
+
data.tar.gz: 9b78576f1ae83f21a2cfbaa5cc9aa70b39dfc07a10a7d60975e25843e92aa630
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 391628ba2aaa18b29026a75d7b2d481c9dc56404702c44928c141ee602dba2d7c7f6de10faa73ab710cec6b59420f5ceb155e0d6e99ede8fc565be23fa4809a6
|
7
|
+
data.tar.gz: 66c459697160a5dbdcdf1bcda57f8f8abf151bdd657cb1fed3863de6e2ec6bb898009fb6bcf7c2b6abc33c26a5cf4fafec580b8d25e587d060356e549f131ba8
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
statscloud.io-ruby-socket.io-client-simple (1.2.1.pre.
|
4
|
+
statscloud.io-ruby-socket.io-client-simple (1.2.1.pre.3)
|
5
5
|
event_emitter
|
6
6
|
httparty
|
7
7
|
json
|
@@ -11,9 +11,13 @@ GEM
|
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
13
|
event_emitter (0.2.6)
|
14
|
-
httparty (0.16.
|
14
|
+
httparty (0.16.3)
|
15
|
+
mime-types (~> 3.0)
|
15
16
|
multi_xml (>= 0.5.2)
|
16
17
|
json (2.1.0)
|
18
|
+
mime-types (3.2.2)
|
19
|
+
mime-types-data (~> 3.2015)
|
20
|
+
mime-types-data (3.2018.0812)
|
17
21
|
minitest (5.8.4)
|
18
22
|
multi_xml (0.6.0)
|
19
23
|
rake (10.5.0)
|
@@ -32,4 +36,4 @@ DEPENDENCIES
|
|
32
36
|
statscloud.io-ruby-socket.io-client-simple!
|
33
37
|
|
34
38
|
BUNDLED WITH
|
35
|
-
1.
|
39
|
+
1.17.1
|
@@ -16,7 +16,7 @@ module StatsCloudIO
|
|
16
16
|
attr_accessor :auto_reconnection, :websocket, :url, :reconnecting, :state,
|
17
17
|
:session_id, :ping_interval, :ping_timeout, :last_pong_at, :last_ping_at
|
18
18
|
|
19
|
-
def initialize(url, opts={})
|
19
|
+
def initialize(url, opts = {})
|
20
20
|
@url = url
|
21
21
|
@opts = opts
|
22
22
|
@opts[:transport] = :websocket
|
@@ -34,10 +34,12 @@ module StatsCloudIO
|
|
34
34
|
@last_ping_at = Time.now.to_i
|
35
35
|
end
|
36
36
|
end
|
37
|
-
if @
|
38
|
-
@websocket.
|
39
|
-
|
40
|
-
|
37
|
+
if @session_id && Time.now.to_i - @last_pong_at > @ping_timeout/100
|
38
|
+
if @websocket.open?
|
39
|
+
@websocket.close
|
40
|
+
@state = :disconnect
|
41
|
+
__emit :disconnect
|
42
|
+
end
|
41
43
|
reconnect
|
42
44
|
end
|
43
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statscloud.io-ruby-socket.io-client-simple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.1.pre.
|
4
|
+
version: 1.2.1.pre.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Hashimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|