socket.io-client-simple 1.1.3 → 1.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: 97c578c13a31022b7dbe7bc656a1b992a561ed18
4
- data.tar.gz: 04f8ea6b3d2d5b62f745b42b7912b1b9f62a6ecf
3
+ metadata.gz: 0e6d673e30e37562235d4edb27d7791ae7b6778c
4
+ data.tar.gz: 382a19c571e2f9e94c824541bfff09003575916b
5
5
  SHA512:
6
- metadata.gz: 347b45e33ae292e75ec83a38a43d5048b3f20cd1972c770f9b119bfc24ddd465ab49d58432d4130d5ffe2640ea52679d5e2d8b98486dbbc8db70d765d9340741
7
- data.tar.gz: 638e57f589105f2f930c8bf2a27c0b0bc0ccae3435e4c4f4f9448f56533d6d8d841fd3cd7a1a00c092a06e4cc27fa1aaed72b21254a7a1daca126b7745937c05
6
+ metadata.gz: 075786363f386f74e492bfe9b148ec90a70a1ad810c5acb12714d11ae26d187454b61aa75bb9b4f8f81aa5f5de8162e640095011613c919435ba0d851c58c35d
7
+ data.tar.gz: 69033e6a0c40d6598d1c634f964bef246528d035df134805cec14ccbbbe5be751b5ce3de97abde4ed56a83731a339518edbfbbd1dd72bc5068c64cabcab0c176
data/.gitignore CHANGED
@@ -19,3 +19,4 @@ test/version_tmp
19
19
  tmp
20
20
  node_modules
21
21
  *.log
22
+ vendor
@@ -1,8 +1,9 @@
1
+ sudo: false
1
2
  language: ruby
2
3
  node_js:
3
- - '0.10'
4
+ - '5.4.1'
4
5
  rvm:
5
- - '2.1.2'
6
+ - '2.2.2'
6
7
  before_script:
7
8
  - npm install
8
9
  notifications:
@@ -1,25 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- socket.io-client-simple (1.1.2)
4
+ socket.io-client-simple (1.2.0)
5
5
  event_emitter
6
6
  httparty
7
7
  json
8
- websocket-client-simple (>= 0.2.1)
8
+ websocket-client-simple (>= 0.2.5)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
13
  event_emitter (0.2.5)
14
- httparty (0.13.3)
14
+ httparty (0.13.7)
15
15
  json (~> 1.8)
16
16
  multi_xml (>= 0.5.2)
17
- json (1.8.2)
18
- minitest (5.5.1)
17
+ json (1.8.3)
18
+ minitest (5.8.4)
19
19
  multi_xml (0.5.5)
20
- rake (10.4.2)
21
- websocket (1.2.1)
22
- websocket-client-simple (0.2.2)
20
+ rake (10.5.0)
21
+ websocket (1.2.2)
22
+ websocket-client-simple (0.2.5)
23
23
  event_emitter
24
24
  websocket
25
25
 
@@ -31,3 +31,6 @@ DEPENDENCIES
31
31
  minitest
32
32
  rake
33
33
  socket.io-client-simple!
34
+
35
+ BUNDLED WITH
36
+ 1.11.2
@@ -1,4 +1,9 @@
1
- === 1.1.3 2014-02-03
1
+ === 1.2.0 2016-02-19
2
+
3
+ * add "disconnect" method #16
4
+ * thank you for contributing @julianbei
5
+
6
+ === 1.1.3 2015-02-03
2
7
 
3
8
  * update for socket.io 1.3.x
4
9
 
@@ -120,6 +120,12 @@ module SocketIO
120
120
  @websocket.send "42#{data.to_json}"
121
121
  end
122
122
 
123
+ def disconnect
124
+ @auto_reconnection = false
125
+ @websocket.close
126
+ @state = :disconnect
127
+ end
128
+
123
129
  end
124
130
 
125
131
  end
@@ -1,7 +1,7 @@
1
1
  module SocketIO
2
2
  module Client
3
3
  module Simple
4
- VERSION = "1.1.3"
4
+ VERSION = "1.2.0"
5
5
  end
6
6
  end
7
7
  end
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "minitest"
24
24
 
25
25
  spec.add_dependency "json"
26
- spec.add_dependency "websocket-client-simple", '>= 0.2.1'
26
+ spec.add_dependency "websocket-client-simple", '>= 0.2.5'
27
27
  spec.add_dependency "httparty"
28
28
  spec.add_dependency "event_emitter"
29
29
  end
@@ -48,4 +48,13 @@ class TestSocketIOClientSimple < MiniTest::Test
48
48
  assert_equal result, user
49
49
  end
50
50
 
51
+ def test_disconnect
52
+ socket = SocketIO::Client::Simple.connect TestServer.url
53
+
54
+ socket.on :connect do
55
+ socket.disconnect
56
+ end
57
+ sleep 0.5
58
+ assert_equal socket.open?, false
59
+ end
51
60
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socket.io-client-simple
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.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: 2015-02-02 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.2.1
75
+ version: 0.2.5
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 0.2.1
82
+ version: 0.2.5
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: httparty
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.2.2
158
+ rubygems_version: 2.4.5
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: A simple ruby client for Node.js's Socket.IO v1.1.x, Supports only WebSocket.