socket.io-client-simple 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/History.txt +4 -0
- data/README.md +1 -1
- data/lib/socket.io-client-simple/client.rb +2 -2
- data/lib/socket.io-client-simple/version.rb +1 -1
- data/package.json +2 -2
- data/socket.io-client-simple.gemspec +1 -1
- data/test/test_socket.io.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6293cae06f3938964054ea93f5837c3ee3fe920a
|
4
|
+
data.tar.gz: 103d3bd06faea135bdcba6c59e96a47de8c8e0df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff36295267269bb7f87e5748eecdce1d6e02ef5c279ddef9481e81792ffec5f940cc342accafb91fe51710210da2ce9da3dd671b757291854f59b4a768e86362
|
7
|
+
data.tar.gz: 3120faf19a55589c9a8eae733b58a4c069a3c5b5a67985da176f6bb189dcb0eab354658b516295e9c81c8a7ee58ee0f1c42b049c32c13aa0ea3a91e6bf33bc56
|
data/Gemfile.lock
CHANGED
data/History.txt
CHANGED
data/README.md
CHANGED
@@ -63,7 +63,7 @@ module SocketIO
|
|
63
63
|
|
64
64
|
@websocket.on :message do |msg|
|
65
65
|
next unless msg.data =~ /^\d+/
|
66
|
-
code, body = msg.data.
|
66
|
+
code, body = msg.data.scan(/^(\d+)(.*)$/)[0]
|
67
67
|
code = code.to_i
|
68
68
|
case code
|
69
69
|
when 0 ## socket.io connect
|
@@ -107,7 +107,7 @@ module SocketIO
|
|
107
107
|
return unless open?
|
108
108
|
return unless @state == :connect
|
109
109
|
data.unshift event_name
|
110
|
-
@websocket.send "42#{data.to_json}"
|
110
|
+
@websocket.send "42#{data.to_json}"
|
111
111
|
end
|
112
112
|
|
113
113
|
end
|
data/package.json
CHANGED
@@ -6,8 +6,8 @@
|
|
6
6
|
"license": "MIT",
|
7
7
|
"homepage": "https://github.com/shokai/ruby-socket.io-client-simple",
|
8
8
|
"dependencies": {
|
9
|
-
"socket.io": "
|
10
|
-
"socket.io-client": "
|
9
|
+
"socket.io": "^1.1",
|
10
|
+
"socket.io-client": "^1.1",
|
11
11
|
"coffee-script": "*"
|
12
12
|
},
|
13
13
|
"devDependencies": {},
|
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = SocketIO::Client::Simple::VERSION
|
9
9
|
spec.authors = ["Sho Hashimoto"]
|
10
10
|
spec.email = ["hashimoto@shokai.org"]
|
11
|
-
spec.description = "A simple ruby client for Node.js's Socket.IO v1.
|
11
|
+
spec.description = "A simple ruby client for Node.js's Socket.IO v1.1.x, Supports only WebSocket."
|
12
12
|
spec.summary = spec.description
|
13
13
|
spec.homepage = "https://github.com/shokai/ruby-socket.io-client-simple"
|
14
14
|
spec.license = "MIT"
|
data/test/test_socket.io.rb
CHANGED
@@ -21,7 +21,7 @@ class TestSocketIOClientSimple < MiniTest::Test
|
|
21
21
|
result = data
|
22
22
|
end
|
23
23
|
|
24
|
-
post_data = {"msg" => "hello", "at" => Time.now.to_s}
|
24
|
+
post_data = {"msg" => "hello", "at" => Time.now.to_s, "あいさつ" => "こんにちは"}
|
25
25
|
socket.on :connect do
|
26
26
|
socket.emit :chat, post_data
|
27
27
|
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.
|
4
|
+
version: 1.1.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: 2014-
|
11
|
+
date: 2014-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description: A simple ruby client for Node.js's Socket.IO v1.
|
111
|
+
description: A simple ruby client for Node.js's Socket.IO v1.1.x, Supports only WebSocket.
|
112
112
|
email:
|
113
113
|
- hashimoto@shokai.org
|
114
114
|
executables: []
|
@@ -155,10 +155,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
157
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.
|
158
|
+
rubygems_version: 2.2.2
|
159
159
|
signing_key:
|
160
160
|
specification_version: 4
|
161
|
-
summary: A simple ruby client for Node.js's Socket.IO v1.
|
161
|
+
summary: A simple ruby client for Node.js's Socket.IO v1.1.x, Supports only WebSocket.
|
162
162
|
test_files:
|
163
163
|
- test/server.rb
|
164
164
|
- test/test_helper.rb
|