peatio 2.4.2 → 2.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/peatio/ranger/connection.rb +10 -3
- data/lib/peatio/ranger/web_socket.rb +1 -1
- data/lib/peatio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a855d75a60ccfbec0f38f79159c52fe38d2364accb962ca8f5435fc5a25e5403
|
4
|
+
data.tar.gz: 9d651e0f008ad7d21f722557016c690e1e949d5cffc12f25e6c4328124a601de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b20714e79a658d829a0c2e5d4c53ff8f94c04de098c549854c1cd29059092592caf22e69d05533252914187dd442694acbb26100e0979f897c19706d8657e26
|
7
|
+
data.tar.gz: bc70c96a616952d8e12dbbd697fd403ba4e611e0b5aa7eb6b07ce003f286c4fb234ed536c6f994034c4c90ec03627a29c2c517f1c7a57be4aeee3f8e72c7a6d3
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
module Peatio::Ranger
|
4
2
|
class Connection
|
5
3
|
attr_reader :socket, :user, :authorized, :streams, :logger, :id
|
@@ -23,7 +21,11 @@ module Peatio::Ranger
|
|
23
21
|
end
|
24
22
|
|
25
23
|
def send_raw(payload)
|
26
|
-
|
24
|
+
if user
|
25
|
+
logger.debug { "sending to user #{user.inspect} payload: #{payload}" }
|
26
|
+
else
|
27
|
+
logger.debug { "sending to anonymous payload: #{payload}" }
|
28
|
+
end
|
27
29
|
@socket.send(payload)
|
28
30
|
end
|
29
31
|
|
@@ -77,6 +79,11 @@ module Peatio::Ranger
|
|
77
79
|
def handle(msg)
|
78
80
|
return if msg.to_s.empty?
|
79
81
|
|
82
|
+
if msg =~ /^ping/
|
83
|
+
send_raw("pong")
|
84
|
+
return
|
85
|
+
end
|
86
|
+
|
80
87
|
data = JSON.parse(msg)
|
81
88
|
case data["event"]
|
82
89
|
when "subscribe"
|
data/lib/peatio/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peatio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Louis B.
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-03-
|
12
|
+
date: 2020-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|