jrpc 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e89a5ee4a355e8a5e74995a7982fc0489fab9d4a
4
- data.tar.gz: 8fc4c104259c6940ff17b54de901f76a898876a6
3
+ metadata.gz: 228de9bf0a1648adeb0c3e80026d30bb32268666
4
+ data.tar.gz: d16cb0f2062b9479da45502c970424f54bdabd5f
5
5
  SHA512:
6
- metadata.gz: a04e2ae8e0cb1b31132defdf351eb137e58fdadeeae4b2216b7991a9b114443a7474f55d498c9a225a33c7eac646981933429e5643ba0222ba98ed2e05c811d8
7
- data.tar.gz: 420c095c3f5f76dc3017165301ee46fa8625df6332159163e4069856aeb17e33ec87369d3cdcd33b0635c430cc8a36206e954df9c280c473bb3f772e317b1e1a
6
+ metadata.gz: aa3fbf2780b07a4b9e820792e46958ffd4143f648c39e3ea7d2d96c2d92819fc826f0d8ee05d1ba78551a9681a6f394b72693682bd1a0cd92574d4eb0681079d
7
+ data.tar.gz: 70f3ca9c94218cd8effe00a094e9e8f64184ba9fe36cb9f456beedb712e53380d293620036bc7bc1ca65c75e96e0e9f33671751df7af7993845d2002b93cc38a
@@ -22,7 +22,7 @@ module JRPC
22
22
  id = generate_id
23
23
  request['id'] = id
24
24
 
25
- response = send_command request.to_json
25
+ response = send_command JSON.generate(request)
26
26
  response = JSON.parse response
27
27
 
28
28
  validate_response(response, id)
@@ -7,15 +7,16 @@ module JRPC
7
7
 
8
8
  def initialize(uri, options = {})
9
9
  super
10
- @namespace = options.delete(:namespace).to_s
10
+ @namespace = @options.delete(:namespace).to_s
11
11
  t = @options.fetch(:timeout, 5)
12
12
 
13
13
  @client = Net::TCPClient.new server: @uri,
14
14
  connect_retry_count: t,
15
15
  connect_timeout: t,
16
- read_timeout: t,
17
- # write_timeout: t,
18
- buffered: false # recommended for RPC
16
+ read_timeout: t, # write_timeout: t,
17
+ buffered: false, # recommended for RPC
18
+ logger: @options.delete(:logger),
19
+ log_level: @options.delete(:log_level)
19
20
  end
20
21
 
21
22
  private
@@ -1,3 +1,3 @@
1
1
  module JRPC
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jrpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-01 00:00:00.000000000 Z
11
+ date: 2015-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: netstring