em-websocket 0.4.0 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.rdoc +35 -1
- data/Gemfile +6 -0
- data/LICENCE +7 -0
- data/README.md +49 -7
- data/em-websocket.gemspec +2 -8
- data/examples/test.html +3 -1
- data/lib/em-websocket/close03.rb +3 -0
- data/lib/em-websocket/close05.rb +3 -0
- data/lib/em-websocket/close06.rb +3 -0
- data/lib/em-websocket/close75.rb +2 -1
- data/lib/em-websocket/connection.rb +118 -26
- data/lib/em-websocket/framing03.rb +3 -2
- data/lib/em-websocket/framing05.rb +3 -2
- data/lib/em-websocket/framing07.rb +16 -4
- data/lib/em-websocket/framing76.rb +1 -4
- data/lib/em-websocket/handler.rb +31 -3
- data/lib/em-websocket/handler76.rb +2 -0
- data/lib/em-websocket/handshake.rb +23 -4
- data/lib/em-websocket/handshake04.rb +10 -6
- data/lib/em-websocket/handshake75.rb +11 -1
- data/lib/em-websocket/handshake76.rb +4 -0
- data/lib/em-websocket/masking04.rb +1 -5
- data/lib/em-websocket/message_processor_03.rb +6 -3
- data/lib/em-websocket/message_processor_06.rb +30 -9
- data/lib/em-websocket/version.rb +1 -1
- data/lib/em-websocket/websocket.rb +7 -0
- data/spec/helper.rb +67 -52
- data/spec/integration/common_spec.rb +49 -32
- data/spec/integration/draft03_spec.rb +83 -57
- data/spec/integration/draft05_spec.rb +14 -12
- data/spec/integration/draft06_spec.rb +67 -7
- data/spec/integration/draft13_spec.rb +29 -20
- data/spec/integration/draft75_spec.rb +44 -40
- data/spec/integration/draft76_spec.rb +58 -46
- data/spec/integration/gte_03_examples.rb +42 -0
- data/spec/integration/shared_examples.rb +93 -0
- data/spec/unit/framing_spec.rb +24 -4
- data/spec/unit/handshake_spec.rb +24 -1
- data/spec/unit/masking_spec.rb +2 -0
- metadata +18 -107
@@ -1,5 +1,6 @@
|
|
1
|
+
# encoding: BINARY
|
2
|
+
|
1
3
|
require 'helper'
|
2
|
-
require 'integration/shared_examples'
|
3
4
|
|
4
5
|
describe "WebSocket server draft76" do
|
5
6
|
include EM::SpecHelper
|
@@ -33,46 +34,37 @@ describe "WebSocket server draft76" do
|
|
33
34
|
:body => "8jKS\'y:G*Co,Wxa-"
|
34
35
|
}
|
35
36
|
end
|
36
|
-
|
37
|
-
it_behaves_like "a websocket server" do
|
38
|
-
let(:version) { 76 }
|
39
37
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
38
|
+
def start_client
|
39
|
+
client = EM.connect('0.0.0.0', 12345, FakeWebSocketClient)
|
40
|
+
client.send_data(format_request(@request))
|
41
|
+
yield client if block_given?
|
42
|
+
return client
|
43
|
+
end
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
client.send_data(format_request(@request))
|
49
|
-
yield client if block_given?
|
50
|
-
end
|
45
|
+
it_behaves_like "a websocket server" do
|
46
|
+
let(:version) { 76 }
|
51
47
|
end
|
52
48
|
|
53
49
|
it "should send back the correct handshake response" do
|
54
50
|
em {
|
55
|
-
|
56
|
-
|
57
|
-
# Create a fake client which sends draft 76 handshake
|
58
|
-
connection = EM.connect('0.0.0.0', 12345, FakeWebSocketClient)
|
59
|
-
connection.send_data(format_request(@request))
|
51
|
+
start_server
|
60
52
|
|
61
|
-
|
62
|
-
connection.
|
63
|
-
|
64
|
-
|
53
|
+
start_client { |connection|
|
54
|
+
connection.onopen {
|
55
|
+
connection.handshake_response.lines.sort.
|
56
|
+
should == format_response(@response).lines.sort
|
57
|
+
done
|
58
|
+
}
|
65
59
|
}
|
66
60
|
}
|
67
61
|
end
|
68
62
|
|
69
63
|
it "should send closing frame back and close the connection after recieving closing frame" do
|
70
64
|
em {
|
71
|
-
|
65
|
+
start_server
|
72
66
|
|
73
|
-
|
74
|
-
connection = EM.connect('0.0.0.0', 12345, FakeWebSocketClient)
|
75
|
-
connection.send_data(format_request(@request))
|
67
|
+
connection = start_client
|
76
68
|
|
77
69
|
# Send closing frame after handshake complete
|
78
70
|
connection.onopen {
|
@@ -91,16 +83,14 @@ describe "WebSocket server draft76" do
|
|
91
83
|
|
92
84
|
it "should ignore any data received after the closing frame" do
|
93
85
|
em {
|
94
|
-
|
86
|
+
start_server { |ws|
|
95
87
|
# Fail if foobar message is received
|
96
88
|
ws.onmessage { |msg|
|
97
89
|
fail
|
98
90
|
}
|
99
91
|
}
|
100
92
|
|
101
|
-
|
102
|
-
connection = EM.connect('0.0.0.0', 12345, FakeWebSocketClient)
|
103
|
-
connection.send_data(format_request(@request))
|
93
|
+
connection = start_client
|
104
94
|
|
105
95
|
# Send closing frame after handshake complete, followed by another msg
|
106
96
|
connection.onopen {
|
@@ -116,15 +106,13 @@ describe "WebSocket server draft76" do
|
|
116
106
|
|
117
107
|
it "should accept null bytes within the frame after a line return" do
|
118
108
|
em {
|
119
|
-
|
109
|
+
start_server { |ws|
|
120
110
|
ws.onmessage { |msg|
|
121
111
|
msg.should == "\n\000"
|
122
112
|
}
|
123
113
|
}
|
124
114
|
|
125
|
-
|
126
|
-
connection = EM.connect('0.0.0.0', 12345, FakeWebSocketClient)
|
127
|
-
connection.send_data(format_request(@request))
|
115
|
+
connection = start_client
|
128
116
|
|
129
117
|
# Send closing frame after handshake complete
|
130
118
|
connection.onopen {
|
@@ -140,7 +128,7 @@ describe "WebSocket server draft76" do
|
|
140
128
|
|
141
129
|
it "should handle unreasonable frame lengths by calling onerror callback" do
|
142
130
|
em {
|
143
|
-
|
131
|
+
start_server { |server|
|
144
132
|
server.onerror { |error|
|
145
133
|
error.should be_an_instance_of EM::WebSocket::WSMessageTooBigError
|
146
134
|
error.message.should == "Frame length too long (1180591620717411303296 bytes)"
|
@@ -148,9 +136,7 @@ describe "WebSocket server draft76" do
|
|
148
136
|
}
|
149
137
|
}
|
150
138
|
|
151
|
-
|
152
|
-
client = EM.connect('0.0.0.0', 12345, FakeWebSocketClient)
|
153
|
-
client.send_data(format_request(@request))
|
139
|
+
client = start_client
|
154
140
|
|
155
141
|
# This particular frame indicates a message length of
|
156
142
|
# 1180591620717411303296 bytes. Such a message would previously cause
|
@@ -164,7 +150,7 @@ describe "WebSocket server draft76" do
|
|
164
150
|
|
165
151
|
it "should handle impossible frames by calling onerror callback" do
|
166
152
|
em {
|
167
|
-
|
153
|
+
start_server { |server|
|
168
154
|
server.onerror { |error|
|
169
155
|
error.should be_an_instance_of EM::WebSocket::WSProtocolError
|
170
156
|
error.message.should == "Invalid frame received"
|
@@ -172,9 +158,7 @@ describe "WebSocket server draft76" do
|
|
172
158
|
}
|
173
159
|
}
|
174
160
|
|
175
|
-
|
176
|
-
client = EM.connect('0.0.0.0', 12345, FakeWebSocketClient)
|
177
|
-
client.send_data(format_request(@request))
|
161
|
+
client = start_client
|
178
162
|
|
179
163
|
client.onopen {
|
180
164
|
client.send_data("foobar") # Does not start with \x00 or \xff
|
@@ -184,10 +168,10 @@ describe "WebSocket server draft76" do
|
|
184
168
|
|
185
169
|
it "should handle invalid http requests by raising HandshakeError passed to onerror callback" do
|
186
170
|
em {
|
187
|
-
|
171
|
+
start_server { |server|
|
188
172
|
server.onerror { |error|
|
189
173
|
error.should be_an_instance_of EM::WebSocket::HandshakeError
|
190
|
-
error.message.should == "Invalid HTTP header: Could not parse data entirely"
|
174
|
+
error.message.should == "Invalid HTTP header: Could not parse data entirely (1 != 29)"
|
191
175
|
done
|
192
176
|
}
|
193
177
|
}
|
@@ -199,7 +183,7 @@ describe "WebSocket server draft76" do
|
|
199
183
|
|
200
184
|
it "should handle handshake request split into two TCP packets" do
|
201
185
|
em {
|
202
|
-
|
186
|
+
start_server
|
203
187
|
|
204
188
|
# Create a fake client which sends draft 76 handshake
|
205
189
|
connection = EM.connect('0.0.0.0', 12345, FakeWebSocketClient)
|
@@ -219,4 +203,32 @@ describe "WebSocket server draft76" do
|
|
219
203
|
end
|
220
204
|
}
|
221
205
|
end
|
206
|
+
|
207
|
+
it "should report that close codes are not supported" do
|
208
|
+
em {
|
209
|
+
start_server { |ws|
|
210
|
+
ws.onopen {
|
211
|
+
ws.supports_close_codes?.should == false
|
212
|
+
done
|
213
|
+
}
|
214
|
+
}
|
215
|
+
start_client
|
216
|
+
}
|
217
|
+
end
|
218
|
+
|
219
|
+
it "should call onclose when the server closes the connection [antiregression]" do
|
220
|
+
em {
|
221
|
+
start_server { |ws|
|
222
|
+
ws.onopen {
|
223
|
+
EM.add_timer(0.1) {
|
224
|
+
ws.close()
|
225
|
+
}
|
226
|
+
}
|
227
|
+
ws.onclose {
|
228
|
+
done
|
229
|
+
}
|
230
|
+
}
|
231
|
+
start_client
|
232
|
+
}
|
233
|
+
end
|
222
234
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
shared_examples_for "a WebSocket server drafts 3 and above" do
|
2
|
+
it "should force close connections after a timeout if close handshake is not sent by the client" do
|
3
|
+
em {
|
4
|
+
server_onerror_fired = false
|
5
|
+
server_onclose_fired = false
|
6
|
+
client_got_close_handshake = false
|
7
|
+
|
8
|
+
start_server(:close_timeout => 0.1) { |ws|
|
9
|
+
ws.onopen {
|
10
|
+
# 1: Send close handshake to client
|
11
|
+
EM.next_tick { ws.close(4999, "Close message") }
|
12
|
+
}
|
13
|
+
|
14
|
+
ws.onerror { |e|
|
15
|
+
# 3: Client should receive onerror
|
16
|
+
e.class.should == EM::WebSocket::WSProtocolError
|
17
|
+
e.message.should == "Close handshake un-acked after 0.1s, closing tcp connection"
|
18
|
+
server_onerror_fired = true
|
19
|
+
}
|
20
|
+
|
21
|
+
ws.onclose {
|
22
|
+
server_onclose_fired = true
|
23
|
+
}
|
24
|
+
}
|
25
|
+
start_client { |client|
|
26
|
+
client.onmessage { |msg|
|
27
|
+
# 2: Client does not respond to close handshake (the fake client
|
28
|
+
# doesn't understand them at all hence this is in onmessage)
|
29
|
+
msg.should =~ /Close message/ if version >= 6
|
30
|
+
client_got_close_handshake = true
|
31
|
+
}
|
32
|
+
|
33
|
+
client.onclose {
|
34
|
+
server_onerror_fired.should == true
|
35
|
+
server_onclose_fired.should == true
|
36
|
+
client_got_close_handshake.should == true
|
37
|
+
done
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
end
|
42
|
+
end
|
@@ -29,6 +29,99 @@ shared_examples_for "a websocket server" do
|
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
32
|
+
it "should expose the remote IP address" do
|
33
|
+
em {
|
34
|
+
start_server { |ws|
|
35
|
+
ws.onopen {
|
36
|
+
ws.remote_ip.should == "127.0.0.1"
|
37
|
+
done
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
start_client
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should send messages successfully" do
|
46
|
+
em {
|
47
|
+
start_server { |ws|
|
48
|
+
ws.onmessage { |message|
|
49
|
+
message.should == "hello server"
|
50
|
+
done
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
start_client { |client|
|
55
|
+
client.onopen {
|
56
|
+
client.send("hello server")
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should allow connection to be closed with valid close code" do
|
63
|
+
em {
|
64
|
+
start_server { |ws|
|
65
|
+
ws.onopen {
|
66
|
+
ws.close(4004, "Bye bye")
|
67
|
+
done
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
start_client
|
72
|
+
# TODO: Use a real client which understands how to respond to closing
|
73
|
+
# handshakes, sending the handshake currently untested
|
74
|
+
}
|
75
|
+
end
|
76
|
+
|
77
|
+
it "should raise error if if invalid close code is used" do
|
78
|
+
em {
|
79
|
+
start_server { |ws|
|
80
|
+
ws.onopen {
|
81
|
+
lambda {
|
82
|
+
ws.close(2000)
|
83
|
+
}.should raise_error("Application code may only use codes from 1000, 3000-4999")
|
84
|
+
done
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
start_client
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
it "should call onclose with was_clean set to false if connection closed without closing handshake by server" do
|
93
|
+
em {
|
94
|
+
start_server { |ws|
|
95
|
+
ws.onopen {
|
96
|
+
# Close tcp connection (no close handshake)
|
97
|
+
ws.close_connection
|
98
|
+
}
|
99
|
+
ws.onclose { |event|
|
100
|
+
event.should == {:code => 1006, :was_clean => false}
|
101
|
+
done
|
102
|
+
}
|
103
|
+
}
|
104
|
+
start_client
|
105
|
+
}
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should call onclose with was_clean set to false if connection closed without closing handshake by client" do
|
109
|
+
em {
|
110
|
+
start_server { |ws|
|
111
|
+
ws.onclose { |event|
|
112
|
+
event.should == {:code => 1006, :was_clean => false}
|
113
|
+
done
|
114
|
+
}
|
115
|
+
}
|
116
|
+
start_client { |client|
|
117
|
+
client.onopen {
|
118
|
+
# Close tcp connection (no close handshake)
|
119
|
+
client.close_connection
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
123
|
+
end
|
124
|
+
|
32
125
|
it "should call onerror if an application error raised in onopen" do
|
33
126
|
em {
|
34
127
|
start_server { |ws|
|
data/spec/unit/framing_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: BINARY
|
2
|
+
|
1
3
|
require 'helper'
|
2
4
|
|
3
5
|
describe EM::WebSocket::Framing03 do
|
@@ -13,7 +15,7 @@ describe EM::WebSocket::Framing03 do
|
|
13
15
|
|
14
16
|
def <<(data)
|
15
17
|
@data << data
|
16
|
-
process_data
|
18
|
+
process_data
|
17
19
|
end
|
18
20
|
|
19
21
|
def debug(*args); end
|
@@ -138,7 +140,7 @@ describe EM::WebSocket::Framing04 do
|
|
138
140
|
|
139
141
|
def <<(data)
|
140
142
|
@data << data
|
141
|
-
process_data
|
143
|
+
process_data
|
142
144
|
end
|
143
145
|
|
144
146
|
def debug(*args); end
|
@@ -207,7 +209,7 @@ describe EM::WebSocket::Framing07 do
|
|
207
209
|
|
208
210
|
def <<(data)
|
209
211
|
@data << data
|
210
|
-
process_data
|
212
|
+
process_data
|
211
213
|
end
|
212
214
|
|
213
215
|
def debug(*args); end
|
@@ -265,7 +267,7 @@ describe EM::WebSocket::Framing07 do
|
|
265
267
|
lambda {
|
266
268
|
# Opcode 3 is not supported by this draft
|
267
269
|
@f << "\x83\x05Hello"
|
268
|
-
}.should raise_error(EventMachine::WebSocket::WSProtocolError, "Unknown opcode")
|
270
|
+
}.should raise_error(EventMachine::WebSocket::WSProtocolError, "Unknown opcode 3")
|
269
271
|
end
|
270
272
|
|
271
273
|
it "should accept a fragmented unmasked text message in 3 frames" do
|
@@ -274,5 +276,23 @@ describe EM::WebSocket::Framing07 do
|
|
274
276
|
@f << "\x00\x02lo"
|
275
277
|
@f << "\x80\x06 world"
|
276
278
|
end
|
279
|
+
|
280
|
+
it "should raise if non-fin frame is followed by a non-continuation data frame (continuation frame would be expected)" do
|
281
|
+
lambda {
|
282
|
+
@f << 0b00000001 # Not fin, text
|
283
|
+
@f << 0b00000001 # Length 1
|
284
|
+
@f << 'f'
|
285
|
+
@f << 0b10000001 # fin, text (continutation expected)
|
286
|
+
@f << 0b00000001 # Length 1
|
287
|
+
@f << 'b'
|
288
|
+
}.should raise_error(EM::WebSocket::WebSocketError, 'Continuation frame expected')
|
289
|
+
end
|
290
|
+
|
291
|
+
it "should raise on non-fin control frames (control frames must not be fragmented)" do
|
292
|
+
lambda {
|
293
|
+
@f << 0b00001010 # Not fin, pong (opcode 10)
|
294
|
+
@f << 0b00000000 # Length 1
|
295
|
+
}.should raise_error(EM::WebSocket::WebSocketError, 'Control frames must not be fragmented')
|
296
|
+
end
|
277
297
|
end
|
278
298
|
end
|
data/spec/unit/handshake_spec.rb
CHANGED
@@ -126,6 +126,23 @@ describe EM::WebSocket::Handshake do
|
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
129
|
+
it "should raise error if Sec-WebSocket-Key1 is missing" do
|
130
|
+
@request[:headers].delete("Sec-WebSocket-Key1")
|
131
|
+
|
132
|
+
# The error message isn't correct since key1 is used to heuristically
|
133
|
+
# determine the protocol version in use, however this test at least checks
|
134
|
+
# that the handshake does correctly fail
|
135
|
+
handshake(@request).
|
136
|
+
should fail_with_error(EM::WebSocket::HandshakeError, 'Extra bytes after header')
|
137
|
+
end
|
138
|
+
|
139
|
+
it "should raise error if Sec-WebSocket-Key2 is missing" do
|
140
|
+
@request[:headers].delete("Sec-WebSocket-Key2")
|
141
|
+
|
142
|
+
handshake(@request).
|
143
|
+
should fail_with_error(EM::WebSocket::HandshakeError, 'WebSocket key1 or key2 is missing')
|
144
|
+
end
|
145
|
+
|
129
146
|
it "should raise error if spaces do not divide numbers in Sec-WebSocket-Key* " do
|
130
147
|
@request[:headers]['Sec-WebSocket-Key2'] = '12998 5 Y3 1.P00'
|
131
148
|
|
@@ -138,7 +155,7 @@ describe EM::WebSocket::Handshake do
|
|
138
155
|
handshake.receive_data("\r\n\r\nfoobar")
|
139
156
|
|
140
157
|
handshake.
|
141
|
-
should fail_with_error(EM::WebSocket::HandshakeError, 'Invalid HTTP header: Could not parse data entirely')
|
158
|
+
should fail_with_error(EM::WebSocket::HandshakeError, 'Invalid HTTP header: Could not parse data entirely (4 != 10)')
|
142
159
|
end
|
143
160
|
|
144
161
|
# This might seems crazy, but very occasionally we saw multiple "Upgrade:
|
@@ -190,4 +207,10 @@ describe EM::WebSocket::Handshake do
|
|
190
207
|
|
191
208
|
handshake(@request).should succeed_with_upgrade(@response)
|
192
209
|
end
|
210
|
+
|
211
|
+
it "should fail if the request URI is invalid" do
|
212
|
+
@request[:path] = "/%"
|
213
|
+
handshake(@request).should \
|
214
|
+
fail_with_error(EM::WebSocket::HandshakeError, 'Invalid request URI: /%')
|
215
|
+
end
|
193
216
|
end
|
data/spec/unit/masking_spec.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: em-websocket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ilya Grigorik
|
@@ -10,118 +9,34 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2021-11-11 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: eventmachine
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - ">="
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: 0.12.9
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: 0.12.9
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: http_parser.rb
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- - ~>
|
37
|
-
- !ruby/object:Gem::Version
|
38
|
-
version: 0.5.3
|
39
|
-
type: :runtime
|
40
|
-
prerelease: false
|
41
|
-
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
|
-
requirements:
|
44
|
-
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 0.5.3
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: em-spec
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.2.6
|
55
|
-
type: :development
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
|
-
requirements:
|
60
|
-
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 0.2.6
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: eventmachine
|
65
|
-
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
|
-
requirements:
|
68
|
-
- - ! '>='
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
71
|
-
type: :development
|
72
|
-
prerelease: false
|
73
|
-
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ! '>='
|
32
|
+
- - "~>"
|
77
33
|
- !ruby/object:Gem::Version
|
78
34
|
version: '0'
|
79
|
-
|
80
|
-
name: em-http-request
|
81
|
-
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
|
-
requirements:
|
84
|
-
- - ~>
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 0.2.6
|
87
|
-
type: :development
|
88
|
-
prerelease: false
|
89
|
-
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
|
-
requirements:
|
92
|
-
- - ~>
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: 0.2.6
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: rspec
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
|
-
requirements:
|
100
|
-
- - ~>
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 2.12.0
|
103
|
-
type: :development
|
104
|
-
prerelease: false
|
105
|
-
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
|
-
requirements:
|
108
|
-
- - ~>
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 2.12.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rake
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
|
-
requirements:
|
116
|
-
- - ! '>='
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
119
|
-
type: :development
|
35
|
+
type: :runtime
|
120
36
|
prerelease: false
|
121
37
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
38
|
requirements:
|
124
|
-
- -
|
39
|
+
- - "~>"
|
125
40
|
- !ruby/object:Gem::Version
|
126
41
|
version: '0'
|
127
42
|
description: EventMachine based WebSocket server
|
@@ -132,9 +47,10 @@ executables: []
|
|
132
47
|
extensions: []
|
133
48
|
extra_rdoc_files: []
|
134
49
|
files:
|
135
|
-
- .gitignore
|
50
|
+
- ".gitignore"
|
136
51
|
- CHANGELOG.rdoc
|
137
52
|
- Gemfile
|
53
|
+
- LICENCE
|
138
54
|
- README.md
|
139
55
|
- Rakefile
|
140
56
|
- em-websocket.gemspec
|
@@ -180,39 +96,33 @@ files:
|
|
180
96
|
- spec/integration/draft13_spec.rb
|
181
97
|
- spec/integration/draft75_spec.rb
|
182
98
|
- spec/integration/draft76_spec.rb
|
99
|
+
- spec/integration/gte_03_examples.rb
|
183
100
|
- spec/integration/shared_examples.rb
|
184
101
|
- spec/unit/framing_spec.rb
|
185
102
|
- spec/unit/handshake_spec.rb
|
186
103
|
- spec/unit/masking_spec.rb
|
187
104
|
homepage: http://github.com/igrigorik/em-websocket
|
188
|
-
licenses:
|
105
|
+
licenses:
|
106
|
+
- MIT
|
107
|
+
metadata: {}
|
189
108
|
post_install_message:
|
190
109
|
rdoc_options: []
|
191
110
|
require_paths:
|
192
111
|
- lib
|
193
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
194
|
-
none: false
|
195
113
|
requirements:
|
196
|
-
- -
|
114
|
+
- - ">="
|
197
115
|
- !ruby/object:Gem::Version
|
198
116
|
version: '0'
|
199
|
-
segments:
|
200
|
-
- 0
|
201
|
-
hash: 3969961455966824026
|
202
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
|
-
none: false
|
204
118
|
requirements:
|
205
|
-
- -
|
119
|
+
- - ">="
|
206
120
|
- !ruby/object:Gem::Version
|
207
121
|
version: '0'
|
208
|
-
segments:
|
209
|
-
- 0
|
210
|
-
hash: 3969961455966824026
|
211
122
|
requirements: []
|
212
|
-
|
213
|
-
rubygems_version: 1.8.24
|
123
|
+
rubygems_version: 3.0.3.1
|
214
124
|
signing_key:
|
215
|
-
specification_version:
|
125
|
+
specification_version: 4
|
216
126
|
summary: EventMachine based WebSocket server
|
217
127
|
test_files:
|
218
128
|
- spec/helper.rb
|
@@ -223,6 +133,7 @@ test_files:
|
|
223
133
|
- spec/integration/draft13_spec.rb
|
224
134
|
- spec/integration/draft75_spec.rb
|
225
135
|
- spec/integration/draft76_spec.rb
|
136
|
+
- spec/integration/gte_03_examples.rb
|
226
137
|
- spec/integration/shared_examples.rb
|
227
138
|
- spec/unit/framing_spec.rb
|
228
139
|
- spec/unit/handshake_spec.rb
|