easy_compliance 1.0.1 → 1.0.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: 39abb724e84c93d1aeff203630ae258fdde016cb1516e0d9218ce00054f9a94c
4
- data.tar.gz: 00be601f07d2af4c1f4a20eed23601fac9acc646239400f262dab5ce10572fc3
3
+ metadata.gz: 69b54b25d1b74022e38061b4efdf13e80bd60e0e5d6fef95175f00fc04c781d2
4
+ data.tar.gz: afb3c1aa893049af9cad6caa269383ee65ac1446bac94ba040674dd59ca6c6d1
5
5
  SHA512:
6
- metadata.gz: 46940c8d37bd3702507e56302ffe109018844206c27be0d50c80ed65b2758f44ca546da9a3de608a62a551999d8c3a6b60b99b4ee999a0779083e3a6d8fbc31f
7
- data.tar.gz: f4eff1516bbfbcfc906d7b306e2d49ed7563d3ca3ceb525966029267a8638f65f90b26707b1fc1224340b2a4f9b06c549bc4efba58acde0a811b3684fd2a32a8
6
+ metadata.gz: 7dfc566c12036ae5c3881f46894b031b8f7f08a34ca140c6ee89196ab2b41f3af22311af4915ff030bc7cc845d89a4a2a9086547a1bfa4b20829a945fc0a1c8e
7
+ data.tar.gz: da496a845d76caa9910097ad9d349ac9164f0ba1f98a3462701f4c3c59e8b96f51d4ba04c118d3584a333374845785d0929696c3ee1db004be6dd93aab7498ce
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.2] - 2021-11-01
10
+ ### Fixed
11
+ - Fixed leaking `OpenSSL::OpenSSLErrors`, they are now wrapped
12
+
9
13
  ## [1.0.1] - 2021-10-25
10
14
  ### Fixed
11
15
  - Removed `bin/console` and `bin/setup` from gem executables [#1]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- easy_compliance (1.0.0)
4
+ easy_compliance (1.0.1)
5
5
  excon
6
6
 
7
7
  GEM
@@ -1,4 +1,5 @@
1
1
  require 'excon'
2
+ require 'openssl'
2
3
 
3
4
  module EasyCompliance
4
5
  # client for https://easycompliance.de/schnittstellen/api/
@@ -40,7 +41,7 @@ module EasyCompliance
40
41
  res.status < 300 or raise Error, "#{res.status}: #{res.body}"
41
42
 
42
43
  EasyCompliance::Result.new(status: res.status, body: res.body)
43
- rescue Excon::Error => e
44
+ rescue Excon::Error, OpenSSL::OpenSSLError => e
44
45
  raise Error, "Network error: #{e.class.name} - #{e.message}"
45
46
  end
46
47
  end
@@ -1,3 +1,3 @@
1
1
  module EasyCompliance
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -31,6 +31,13 @@ describe EasyCompliance::Client do
31
31
  expect { client.post(method: 2) }.to raise_error(client::Error, /Socket/)
32
32
  end
33
33
 
34
+ it 'raises if there is any OpenSSL::OpenSSLError' do
35
+ expect(Excon).to receive(:post)
36
+ .with('url', body: 'method=2&api_key=key', headers: anything)
37
+ .and_raise(OpenSSL::SSL::SSLErrorWaitReadable.new)
38
+ expect { client.post(method: 2) }.to raise_error(client::Error, /SSLError/)
39
+ end
40
+
34
41
  it 'raises if api_key is not set' do
35
42
  EasyCompliance.api_key = nil
36
43
  expect { client.post(method: 2) }.to raise_error(client::Error, /api_key/)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_compliance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - betterplace development team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-25 00:00:00.000000000 Z
11
+ date: 2021-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon