uc3-dmp-external-api 0.0.22 → 0.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-external-api/client.rb +6 -4
- data/lib/uc3-dmp-external-api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65ca811589cea83fa2f7845e936c511edcd8b59c90cc93ca3e581631cf909aeb
|
4
|
+
data.tar.gz: a13f374047dea33da68debe60dcbc3c03a6dd9679e96f425182967b367600aca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ab703d064d9fd86f9968ccfcc3cf07976c345dcd962953427cf18a89245f16aad44dfcd764c9903a9b9df314bb57853d7302147428686b684739c40bfd1475b
|
7
|
+
data.tar.gz: bc3a2c08c2f0e6d8cee707fdad85fbed85b5042891258e33962fde38a000eb1cb8616fca797ed941607e32da05c4fdecfb5ca2dfcd790fe2af33dc045702c1f1
|
@@ -25,11 +25,13 @@ module Uc3DmpExternalApi
|
|
25
25
|
opts = _options(body:, basic_auth:, additional_headers:, timeout:, logger:)
|
26
26
|
resp = HTTParty.send(method.to_sym, uri, opts)
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
if [200, 201].include?(resp.code.to_i)
|
29
|
+
return resp.body.nil? || resp.body.empty? ? nil : _process_response(resp:)
|
30
|
+
else
|
31
|
+
logger&.warn(message: "#{format(MSG_ERROR_FROM_EXTERNAL_API, url:)} - HTTP status code #{resp.code}")
|
32
|
+
return nil
|
31
33
|
end
|
32
|
-
|
34
|
+
|
33
35
|
rescue JSON::ParserError
|
34
36
|
raise ExternalApiError, format(MSG_UNABLE_TO_PARSE, url:)
|
35
37
|
rescue HTTParty::Error => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uc3-dmp-external-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sns
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
170
|
+
rubygems_version: 3.5.13
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: DMPTool gem that provides general support for accessing external APIs
|