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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/easy_compliance/client.rb +2 -1
- data/lib/easy_compliance/version.rb +1 -1
- data/spec/easy_compliance/client_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69b54b25d1b74022e38061b4efdf13e80bd60e0e5d6fef95175f00fc04c781d2
|
4
|
+
data.tar.gz: afb3c1aa893049af9cad6caa269383ee65ac1446bac94ba040674dd59ca6c6d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,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
|
@@ -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.
|
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-
|
11
|
+
date: 2021-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|