neh 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/neh/cli/base.rb +6 -8
- data/lib/neh/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfe0d65e3408f013ff78b8fd68f4681631e603145afa2ba459d00f29295fb0b3
|
4
|
+
data.tar.gz: a866fbb1d874bd0be0e9ef608674bc45a0f57ef13242a45b0715919871838ca0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 825a107e9afe80f70e6c0736392b29c3ae604062552a1ce93a8cf2dec9c44eaa4661084efb89029f8817a8d48455a1815d3930d1c2664e81b8695b701966cd36
|
7
|
+
data.tar.gz: 27e0f1c9215e4e0e52edc15011843cb7840bf59fdc08952ffcee42180a42298e11a3ee0de0a3c6e1999d35e7b7ea64d865d45919af9a8107c6f49893eb26e476
|
data/lib/neh/cli/base.rb
CHANGED
@@ -25,14 +25,12 @@ class Neh::Cli::Base
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def execute
|
28
|
-
Async do |
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
on_receive(connection, parsed_message)
|
35
|
-
end
|
28
|
+
Async::WebSocket::Client.connect(@endpoint, headers: { 'Authorization' => "Bearer #{token}" }) do |connection|
|
29
|
+
while (message = connection.read)
|
30
|
+
parsed_message =
|
31
|
+
JSON.parse(message, symbolize_names: true)
|
32
|
+
|
33
|
+
on_receive(connection, parsed_message)
|
36
34
|
end
|
37
35
|
end
|
38
36
|
end
|
data/lib/neh/version.rb
CHANGED