epics 1.8.0 → 1.8.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
  SHA256:
3
- metadata.gz: 0a022ab9e8c8af9a64b970a4d927b53f09321b6767545bee5c584538aa4a296a
4
- data.tar.gz: 3dd7d404d54e32fe14993ba0272e666b94f38e1238d304c916d373ea057bff75
3
+ metadata.gz: 1d010ef17cbdb364881aa1d097aa37aa5d5dcbe10475042a48c2fdbff7f06bbd
4
+ data.tar.gz: 9344c72519ee202a8b919ee1995d6784063767bf5b486f43e4f69fe1866c4099
5
5
  SHA512:
6
- metadata.gz: d821c36ea05aa51c005dd1dc6b86cd28f8067faf746e556e87f098fecd1a1951c2e33f3ee4a2df494a0df54e168b07f3155ea60be132a4663711a39ab03f8116
7
- data.tar.gz: b48e1f0da804c867f0ce292f2db56352745f515607ea2292bae08c689fb6124b7c025aa4463792042a0e85feda8b4a0016b612c97cbb443d0648e5f499e84967
6
+ metadata.gz: 9fea543b7b03303a272a67499f1c79b60e574c58fc43e9843f11100ca92f8311869c89904f3b1d3a7507fd579380b846d81752b25a488a4969d5548b5820b070
7
+ data.tar.gz: 6f8df9fe023baee3c6f6d292a9ba1df6a77af88da38a4b93323c7a8c2adb8199e9554bac8920a87eb33670f698d1c3c0a8911b15eed9d9a9741863b776ac80e2
@@ -1,3 +1,6 @@
1
+ ### 1.8.1
2
+ - [BUGFIX] Remove masking of transport client errors
3
+
1
4
  ### 1.8.0
2
5
 
3
6
  - [HOUSEKEEPING] updates faraday and rubyzip
@@ -334,4 +334,3 @@ class Epics::Error < StandardError
334
334
  end
335
335
 
336
336
  end
337
- class Epics::Error::UnknownError < StandardError; end
@@ -9,12 +9,8 @@ class Epics::ParseEbics < Faraday::Middleware
9
9
  def call(env)
10
10
  @app.call(env).on_complete do |response|
11
11
  response.body = ::Epics::Response.new(@client, response.body)
12
- raise Epics::Error::TechnicalError, response.body.technical_code if response.body.technical_error?
13
- raise Epics::Error::BusinessError, response.body.business_code if response.body.business_error?
12
+ raise(Epics::Error::TechnicalError, response.body.technical_code) if response.body.technical_error?
13
+ raise(Epics::Error::BusinessError, response.body.business_code) if response.body.business_error?
14
14
  end
15
- rescue Epics::Error::TechnicalError, Epics::Error::BusinessError
16
- raise # re-raise as otherwise they would be swallowed by the following rescue
17
- rescue StandardError => e
18
- raise Epics::Error::UnknownError, e
19
15
  end
20
16
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Epics
4
- VERSION = '1.8.0'
4
+ VERSION = '1.8.1'
5
5
  end
@@ -23,17 +23,13 @@ RSpec.describe Epics::ParseEbics do
23
23
  expect(subject.post('/ok').body).to be_kind_of(Epics::Response)
24
24
  end
25
25
 
26
- it 'will handle a timeout with raising an Epics::Error::TechnicalError' do
27
- expect { subject.post('/timeout') }.to raise_error(Epics::Error::UnknownError, 'timeout')
28
- end
29
-
30
26
  context 'failures' do
31
- it 'will handle a timeout with raising an Epics::Error::TechnicalError' do
32
- expect { subject.post('/timeout') }.to raise_error(Epics::Error::UnknownError, 'timeout')
27
+ it 'will raise a timeout correctly' do
28
+ expect { subject.post('/timeout') }.to raise_error(Faraday::TimeoutError, 'timeout')
33
29
  end
34
30
 
35
- it 'will handle a no connection error with raising an Epics::Error::TechnicalError' do
36
- expect { subject.post('/no_connection') }.to raise_error(Epics::Error::UnknownError, 'peer has finished all lan parties and gone home')
31
+ it 'will properly raise non-epics errors' do
32
+ expect { subject.post('/no_connection') }.to raise_error(Faraday::ConnectionFailed, 'peer has finished all lan parties and gone home')
37
33
  end
38
34
  end
39
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Brillert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-03 00:00:00.000000000 Z
11
+ date: 2020-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -305,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
305
305
  - !ruby/object:Gem::Version
306
306
  version: '0'
307
307
  requirements: []
308
- rubygems_version: 3.0.2
308
+ rubygems_version: 3.0.8
309
309
  signing_key:
310
310
  specification_version: 4
311
311
  summary: a ruby implementation of the EBICS protocol