websocket_parser 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/websocket/message.rb +1 -2
- data/lib/websocket/parser.rb +2 -2
- data/lib/websocket/version.rb +1 -1
- data/spec/websocket/message_spec.rb +1 -1
- data/spec/websocket/parser_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8924e6562d9e92cf020064ec8856a1a0a24fa0f0
|
4
|
+
data.tar.gz: 4135ca151a1284fb741a6aa4cf6b0344608e07bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e63785361ded5ab54c8a127998a810529c6950eb2519b42318895c2e3abbb2d9a447accecbed2065f275fe6503eded4599c7053b4a8d99dedc79860cd06eb69
|
7
|
+
data.tar.gz: 23f4cefa767337afd3710fc30da0298486cf9fe50e10b791d4522828366b59f3925615e146733efac98cd1397e8bcc271c8bc8e529be6da96361361edb634a10
|
data/lib/websocket/message.rb
CHANGED
data/lib/websocket/parser.rb
CHANGED
@@ -187,9 +187,9 @@ module WebSocket
|
|
187
187
|
when :binary
|
188
188
|
@on_message.call(@current_message) if @on_message
|
189
189
|
when :ping
|
190
|
-
@on_ping.call if @on_ping
|
190
|
+
@on_ping.call(@current_message) if @on_ping
|
191
191
|
when :pong
|
192
|
-
@on_pong.call if @on_ping
|
192
|
+
@on_pong.call(@current_message) if @on_ping
|
193
193
|
when :close
|
194
194
|
status_code, message = @current_message.unpack('S<a*')
|
195
195
|
status = STATUS_CODES[status_code]
|
data/lib/websocket/version.rb
CHANGED
@@ -42,7 +42,7 @@ describe WebSocket::Message do
|
|
42
42
|
|
43
43
|
it "can create a pong message from a ping message" do
|
44
44
|
ping = WebSocket::Message.ping('Roman Ping Pong')
|
45
|
-
pong = WebSocket::Message.pong(ping)
|
45
|
+
pong = WebSocket::Message.pong(ping.payload)
|
46
46
|
|
47
47
|
pong.type.should == :pong
|
48
48
|
pong.payload.should == 'Roman Ping Pong'
|
@@ -14,8 +14,8 @@ describe WebSocket::Parser do
|
|
14
14
|
parser.on_message { |m| received_messages << m }
|
15
15
|
parser.on_error { |m| received_errors << m }
|
16
16
|
parser.on_close { |status, message| received_closes << [status, message] }
|
17
|
-
parser.on_ping { received_pings <<
|
18
|
-
parser.on_pong { received_pongs <<
|
17
|
+
parser.on_ping { |m| received_pings << m }
|
18
|
+
parser.on_pong { |m| received_pongs << m }
|
19
19
|
|
20
20
|
parser
|
21
21
|
end
|