norikra-client 1.4.0 → 1.5.0

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: 481bb7e774b6cb040b11620a5ecb4e9bb611e4ab
4
- data.tar.gz: 504ed4290886196e7952a03aee90fbcabcc406a6
3
+ metadata.gz: f3720d895304c8f8d46271b8d65a7629c43c814d
4
+ data.tar.gz: 26c677f4262b59ebbade81515c3c155d44683237
5
5
  SHA512:
6
- metadata.gz: dc0471211d83656cccc21817301380b7e3b165ae918a4c5b6e86a58dcec3ec00333f868c9a436ec804a5137c1b186c3ebaa849af61648fcc88e86ee752945db7
7
- data.tar.gz: 1c50ed92e77d25acfd36ff27cac5c9765dc7e0f566623c1c8585c5766add236d1f95fa24d10825c2e4fe3307502de7b5f83e1f971e7592a537704b7163f447e2
6
+ metadata.gz: 790580fb4972a86b8484648267a365ac5b5c06cb12622da8ecce8c20faecbe600e34636274ade8b35f17310215573b27f10d7684f0e93ce31bf47bae1ab158a8
7
+ data.tar.gz: 4782980a5ec77ad5c037f7b891a7ebdc77bb2753e04c91ee6c883b1db30e06c090542183da8e6290c5c47907d975256b0f612ba112966b7a3c8c2177b84e0916
@@ -11,14 +11,13 @@ module Norikra
11
11
 
12
12
  class Client
13
13
  RPC_DEFAULT_PORT = 26571
14
- TIMEOUT_OPTIONS = [:connect_timeout, :send_timeout, :receive_timeout]
15
14
 
16
- def initialize(host='localhost', port=RPC_DEFAULT_PORT, opts={})
15
+ def initialize(host='localhost', port=RPC_DEFAULT_PORT, connect_timeout: nil, send_timeout: nil, receive_timeout: nil)
17
16
  @client = MessagePack::RPCOverHTTP::Client.new("http://#{host}:#{port}/")
18
17
 
19
- @client.connect_timeout = opts[:connect_timeout] if opts.has_key?(:connect_timeout) && @client.respond_to?('connect_timeout='.to_sym)
20
- @client.send_timeout = opts[:send_timeout] if opts.has_key?(:send_timeout) && @client.respond_to?('send_timeout='.to_sym)
21
- @client.receive_timeout = opts[:receive_timeout] if opts.has_key?(:receive_timeout) && @client.respond_to?('receive_timeout='.to_sym)
18
+ @client.connect_timeout = connect_timeout if connect_timeout
19
+ @client.send_timeout = send_timeout if send_timeout
20
+ @client.receive_timeout = receive_timeout if receive_timeout
22
21
  end
23
22
 
24
23
  def targets
@@ -1,5 +1,5 @@
1
1
  module Norikra
2
2
  class Client
3
- VERSION = "1.4.0"
3
+ VERSION = "1.5.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: norikra-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-19 00:00:00.000000000 Z
11
+ date: 2017-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack-rpc-over-http
@@ -121,9 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  version: '0'
122
122
  requirements: []
123
123
  rubyforge_project:
124
- rubygems_version: 2.5.1
124
+ rubygems_version: 2.6.13
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Client commands and libraries for Norikra
128
128
  test_files: []
129
- has_rdoc: