elastic-transport 8.1.0 → 8.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -255,10 +255,9 @@ class Elastic::Transport::Transport::BaseTest < Minitest::Test
255
255
  should "raise an error on connection failure" do
256
256
  @transport.expects(:get_connection).returns(stub_everything :failures => 1)
257
257
 
258
- # `block.expects(:call).raises(::Errno::ECONNREFUSED)` fails on Ruby 1.8
259
- block = lambda { |a,b| raise ::Errno::ECONNREFUSED }
258
+ block = lambda { |a,b| raise Elastic::Transport::Transport::Error }
260
259
 
261
- assert_raise ::Errno::ECONNREFUSED do
260
+ assert_raise Elastic::Transport::Transport::Error do
262
261
  @transport.perform_request 'GET', '/', &block
263
262
  end
264
263
  end
@@ -291,11 +290,11 @@ class Elastic::Transport::Transport::BaseTest < Minitest::Test
291
290
  c = stub_everything :failures => 1
292
291
  @transport.expects(:get_connection).returns(c)
293
292
 
294
- block = lambda { |a,b| raise ::Errno::ECONNREFUSED }
293
+ block = lambda { |a, b| raise Errno::ECONNREFUSED }
295
294
 
296
295
  c.expects(:dead!)
297
296
 
298
- assert_raise( ::Errno::ECONNREFUSED ) { @transport.perform_request 'GET', '/', &block }
297
+ assert_raise( Elastic::Transport::Transport::Error ) { @transport.perform_request 'GET', '/', &block }
299
298
  end
300
299
  end
301
300
 
@@ -311,7 +310,7 @@ class Elastic::Transport::Transport::BaseTest < Minitest::Test
311
310
 
312
311
  should "reload connections when host is unreachable" do
313
312
  @block.expects(:call).times(2).
314
- raises(Errno::ECONNREFUSED).
313
+ raises(Errno::ECONNREFUSED).
315
314
  then.returns(stub_everything :failures => 1)
316
315
 
317
316
  @transport.expects(:reload_connections!).returns([])
@@ -343,13 +342,13 @@ class Elastic::Transport::Transport::BaseTest < Minitest::Test
343
342
 
344
343
  should "raise an error after max tries" do
345
344
  @block.expects(:call).times(4).
346
- raises(Errno::ECONNREFUSED).
345
+ raises(Errno::ECONNREFUSED).
347
346
  then.raises(Errno::ECONNREFUSED).
348
347
  then.raises(Errno::ECONNREFUSED).
349
348
  then.raises(Errno::ECONNREFUSED).
350
349
  then.returns(stub_everything :failures => 1)
351
350
 
352
- assert_raise Errno::ECONNREFUSED do
351
+ assert_raise Elastic::Transport::Transport::Error do
353
352
  @transport.perform_request('GET', '/', &@block)
354
353
  end
355
354
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-transport
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.0
4
+ version: 8.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karel Minarik
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-09-01 00:00:00.000000000 Z
13
+ date: 2023-03-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -268,6 +268,7 @@ files:
268
268
  - ".github/workflows/tests.yml"
269
269
  - ".gitignore"
270
270
  - CHANGELOG.md
271
+ - CONTRIBUTING.md
271
272
  - Gemfile
272
273
  - Gemfile-faraday1.gemfile
273
274
  - LICENSE
@@ -338,7 +339,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
338
339
  - !ruby/object:Gem::Version
339
340
  version: '0'
340
341
  requirements: []
341
- rubygems_version: 3.3.7
342
+ rubygems_version: 3.4.8
342
343
  signing_key:
343
344
  specification_version: 4
344
345
  summary: Low level Ruby client for Elastic services.