json-socket 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/json-socket.rb +6 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33170988476a7155bf6a8375019eab67d034a18faa6a4b31b12b4f59c43aca66
4
- data.tar.gz: 0dbf13616b22f1810140e8243aa230466309f4b8063bc4a095b0386eaaeef04f
3
+ metadata.gz: d660dd5b48f5743ed87d8ddd9c09114e99b9e4ace9ed164b19d74a846f23b747
4
+ data.tar.gz: b6696ce0e69762e258118fa9bae2406e85770bb36438b34cf9b87f5d9cf41d25
5
5
  SHA512:
6
- metadata.gz: 6eeab193107952cf98e36e6a506a71e37b952be649d71cb65f1edc4cb887e9711cbdd9cfa85d7bb0f30e6af2e6f5ea11b59ef010a527ca35236c561d2754ee46
7
- data.tar.gz: 4f99730df94bf9a65d9a56d41501927fa7056ff3d4af47f8c2d0605428e5a0aead95d259ac2024a2193460e35f17f04b0249d33a6c3045db64c541eee9d5dc5a
6
+ metadata.gz: 7bc8a24a08197f11e38c17772717908cf68b47a3336a1aa31cccca319a4674a43e711cbab39837cb396ee02a46ee6095e596e501f2c28d1edf64a6546f3d18cd
7
+ data.tar.gz: db7d1cc05e9164ae828776d68ad9f161beae3fd4afcca2d291d2870baa06813bb220683c24c33e33e32c0643bd607d9351fcd1aa4a20f980a02ca809541e296a
@@ -2,6 +2,8 @@ require "socket"
2
2
  require "fileutils"
3
3
  require "oj"
4
4
 
5
+ Oj.default_options = { :mode => :strict }
6
+
5
7
  module JSONSocket
6
8
 
7
9
  module JsonEncodeDecode
@@ -21,7 +23,8 @@ module JSONSocket
21
23
 
22
24
  include JsonEncodeDecode
23
25
 
24
- def initialize(host: "127.0.0.1", port: 1234, delimeter: "#", unix_socket: nil)
26
+ def initialize(host: "127.0.0.1", port: 1234, delimeter: "#", unix_socket: nil, oj_options: nil)
27
+ Oj.default_options = oj_options if oj_options
25
28
  @delimeter = delimeter
26
29
  @stop = false
27
30
  @server = if unix_socket
@@ -79,7 +82,8 @@ module JSONSocket
79
82
 
80
83
  include JsonEncodeDecode
81
84
 
82
- def initialize(host: "127.0.0.1", port: 1234, delimeter: "#", unix_socket: nil)
85
+ def initialize(host: "127.0.0.1", port: 1234, delimeter: "#", unix_socket: nil, oj_options: nil)
86
+ Oj.default_options = oj_options if oj_options
83
87
  @delimeter = delimeter
84
88
  @unix_socket = unix_socket
85
89
  @host = host
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-socket
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - foi