protobuf-rpc-register 0.4.0 → 0.4.1

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: 69cf91d5d0dc37cfa2e3183ee45aa1d17d739035
4
- data.tar.gz: 946260c19e3f8f9bd888ca8e4a0dfad81f8ffb55
3
+ metadata.gz: 70c633bbbfe53a84ac4c05ce177c5a65a7dc9ffa
4
+ data.tar.gz: 1469f09c7cdcdfa3d9c889de677bc3fc56289ef6
5
5
  SHA512:
6
- metadata.gz: f3e97a28e601554cf33c86f60c10007ac8735c14d51579f103ecf7967e14cb9af602d8313a3c14df26d4b6131b14b3c93324f449575d99db1f2c24fdefe5d91b
7
- data.tar.gz: 237190b219ca4d3a58d48286cb30e7ac8c5895e30e9de31e60ae755fd3b6b5067b5e38778ee03752a1dadebc112f0a61491bd03057f5d88a0132b3267e20577f
6
+ metadata.gz: 1d318ea876594e2fb6182cce82573acdf7a60458f77de202635bf3247ec5c9e4b93c07b2a145dafd7ecba76f9937645b28f5466f635375665a5b8199a5e3bbfe
7
+ data.tar.gz: a7cd3b378daf65dc5a24dc738afd9758c5ceebdf732839ea3fbb182a11c53b2e6942f0f22a214cedf0881a86081b1d4ff62ab69a490779011add73ee0053920e
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /tmp/
10
10
  .ruby-version
11
11
  .idea/
12
+ *.gem
@@ -6,9 +6,8 @@ module Protobuf
6
6
 
7
7
  mattr_reader(:mutex) { Mutex.new }
8
8
 
9
- def initialize(options = {}, stdout: STDOUT, stderr: STDERR)
10
- @options = options
11
- @namespace = options[:namespace]
9
+ def initialize(host: nil, port: nil, timeout: 1, stdout: STDOUT, stderr: STDERR, namespace: nil)
10
+ @namespace = namespace
12
11
  @logger ||= Logger.new(stdout)
13
12
  @error_logger ||= Logger.new(stderr)
14
13
  end
@@ -19,7 +18,7 @@ module Protobuf
19
18
  names = self.class.name.split('::')
20
19
  svc_class = [names[0..-3], 'Services', names[-1]].flatten.join('::')
21
20
 
22
- Object.const_get(svc_class).client(@options).send(method, Serializer.dump(msg)) do |c|
21
+ Object.const_get(svc_class).client(host: host, port: port, timeout: timeout).send(method, Serializer.dump(msg)) do |c|
23
22
  c.on_success do |rpc_compressed_message|
24
23
  res = Protobuf::Rpc::Serializer.load(rpc_compressed_message)
25
24
  end
@@ -1,7 +1,7 @@
1
1
  module Protobuf
2
2
  module Rpc
3
3
  module Register
4
- VERSION = "0.4.0".freeze
4
+ VERSION = "0.4.1".freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf-rpc-register
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - scorix