json-socket 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json-socket.rb +5 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5b25be9f8edfe3dadee684bfc30dcccc5195349a423f39c21d7dc89e88d876a
|
4
|
+
data.tar.gz: 12d01e5b7587929b7d1756ee54ab599eb03a2cefca37091d44f9b6b6a1eed1ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c6a5697b322807ed6676ca82e355705d455b83fd488fb0b3d57754c04c3d9eab4f90641fcc79d30b6e99e5f15738a99ad0f42c3e8c63cc9cc31f3a4d2c4fe74
|
7
|
+
data.tar.gz: 895a212c1c6a5ad27b7ba44676a2da45dd36e5c3d7d306413df10e823d27d841614dd9a45f830676ef0ae348f5984397842f0d1ff87d6722fa172790746a4534
|
data/lib/json-socket.rb
CHANGED
@@ -47,13 +47,17 @@ module JSONSocket
|
|
47
47
|
message_length = client.gets(@delimeter).to_i
|
48
48
|
on_message(parse_json(client.read(message_length)), client)
|
49
49
|
rescue Exception => e
|
50
|
-
|
50
|
+
on_error e
|
51
51
|
end
|
52
52
|
end
|
53
53
|
break if @stop
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
+
def on_error e
|
58
|
+
STDERR.puts e.message
|
59
|
+
end
|
60
|
+
|
57
61
|
def on_message(message, client)
|
58
62
|
puts "Default on_message method - please override like this: \n" \
|
59
63
|
" \n" \
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json-socket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- foi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -50,7 +50,7 @@ homepage: https://github.com/foi/ruby-json-socket
|
|
50
50
|
licenses:
|
51
51
|
- MIT
|
52
52
|
metadata: {}
|
53
|
-
post_install_message:
|
53
|
+
post_install_message:
|
54
54
|
rdoc_options: []
|
55
55
|
require_paths:
|
56
56
|
- lib
|
@@ -65,9 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
|
-
|
69
|
-
|
70
|
-
signing_key:
|
68
|
+
rubygems_version: 3.4.1
|
69
|
+
signing_key:
|
71
70
|
specification_version: 4
|
72
71
|
summary: json-socket protocol implementation
|
73
72
|
test_files: []
|