protobuf-nats 0.10.1 → 0.10.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
  SHA256:
3
- metadata.gz: 5e948e5cd9de823115551813b6f0b9179d93183565c568ccdb5c51826f5d14fe
4
- data.tar.gz: 4b73bde3e2040519cc4b25e3fcd9b5533d9502ee863025ac310cf029c67e501f
3
+ metadata.gz: 56bd1c8b7367534bdb06a6e92afb1a3593c8333157a2ab7b348d3813d7c7bc7d
4
+ data.tar.gz: 1ea7763925d8aac77092945de99e50707905eb2c21ea657ecca9c12fe98df4f2
5
5
  SHA512:
6
- metadata.gz: 0d8298eac44ca51dfdf91379d1bc8289d037b56de627ca66fb51960575dcc0819565bf6121d9c4b71652c22178c0c5562d03ecc19d23567f681cf58283c1e3de
7
- data.tar.gz: aa4856c2440edfb352d2fd90448e8cb51b078f48f5bd273a4437d274342af74fd3f653392e11d08e20e306ed0791423c6c1bf6da9f1a131c7e3514bea6dc804a
6
+ metadata.gz: 1963bcda2ae4fd5f1f9c36d6778625300a2a1557963ef4b7622a04eee764c4b5d0a0d79efe9a2d71b447d29258842b0438bd1a6f6436b22f2ec6b3b72fbc265c
7
+ data.tar.gz: a1f321734d00671c43f0b2b22c447cf5c991ec734ff6c015058592e0ebde6facc6955a4fa9c2e38969862d56fd8a3c78d577f6882b45a9498ad34e9c1bc47ed0
data/.travis.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  sudo: false
2
2
  language: ruby
3
+ jdk:
4
+ - openjdk8
3
5
  rvm:
4
6
  - 2.3.0
5
7
  - jruby-9.1.7.0
@@ -151,12 +151,12 @@ module Protobuf
151
151
  when :ack_timeout
152
152
  ::ActiveSupport::Notifications.instrument "client.request_timeout.protobuf-nats"
153
153
  next if (retries -= 1) > 0
154
- raise ::Protobuf::Nats::Errors::RequestTimeout
154
+ raise ::Protobuf::Nats::Errors::RequestTimeout, formatted_service_and_method_name
155
155
  when :nack
156
156
  ::ActiveSupport::Notifications.instrument "client.request_nack.protobuf-nats"
157
157
  interval = nack_backoff_intervals[nack_retry]
158
158
  nack_retry += 1
159
- raise ::Protobuf::Nats::Errors::RequestTimeout if interval.nil?
159
+ raise ::Protobuf::Nats::Errors::RequestTimeout, formatted_service_and_method_name if interval.nil?
160
160
  sleep((interval + nack_backoff_splay)/1000.0)
161
161
  next
162
162
  end
@@ -186,6 +186,12 @@ module Protobuf
186
186
  end
187
187
  end
188
188
 
189
+ def formatted_service_and_method_name
190
+ klass = @options[:service]
191
+ method_name = @options[:method]
192
+ "#{klass}##{method_name}"
193
+ end
194
+
189
195
  # The Java nats client offers better message queueing so we're going to use
190
196
  # that over locking ourselves. This split in code isn't great, but we can
191
197
  # refactor this later.
@@ -231,7 +237,7 @@ module Protobuf
231
237
  else return :ack_timeout
232
238
  end
233
239
 
234
- fail(::Protobuf::Nats::Errors::ResponseTimeout, subject) unless response
240
+ fail(::Protobuf::Nats::Errors::ResponseTimeout, formatted_service_and_method_name) unless response
235
241
 
236
242
  completed_request = true
237
243
  response
@@ -287,7 +293,7 @@ module Protobuf
287
293
  else return :ack_timeout
288
294
  end
289
295
 
290
- fail(::Protobuf::Nats::Errors::ResponseTimeout, subject) unless response
296
+ fail(::Protobuf::Nats::Errors::ResponseTimeout, formatted_service_and_method_name) unless response
291
297
 
292
298
  response
293
299
  ensure
@@ -1,13 +1,13 @@
1
1
  module Protobuf
2
2
  module Nats
3
3
  module Errors
4
- class Base < ::StandardError
4
+ class ClientError < ::StandardError
5
5
  end
6
6
 
7
- class RequestTimeout < Base
7
+ class RequestTimeout < ClientError
8
8
  end
9
9
 
10
- class ResponseTimeout < Base
10
+ class ResponseTimeout < ClientError
11
11
  end
12
12
 
13
13
  class MriIOException < ::StandardError
@@ -1,5 +1,5 @@
1
1
  module Protobuf
2
2
  module Nats
3
- VERSION = "0.10.1"
3
+ VERSION = "0.10.2"
4
4
  end
5
5
  end
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.add_runtime_dependency "protobuf", "~> 3.7", ">= 3.7.2"
36
36
  spec.add_runtime_dependency "nats-pure", "~> 0.3", "< 0.4"
37
37
 
38
- spec.add_development_dependency "bundler", "~> 1.14"
38
+ spec.add_development_dependency "bundler"
39
39
  spec.add_development_dependency "rake", "~> 10.0"
40
40
  spec.add_development_dependency "rspec"
41
41
  spec.add_development_dependency "benchmark-ips"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf-nats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dewitt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-12 00:00:00.000000000 Z
11
+ date: 2020-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -82,16 +82,16 @@ dependencies:
82
82
  name: bundler
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - "~>"
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
- version: '1.14'
87
+ version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - "~>"
92
+ - - ">="
93
93
  - !ruby/object:Gem::Version
94
- version: '1.14'
94
+ version: '0'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: rake
97
97
  requirement: !ruby/object:Gem::Requirement