uc3-dmp-external-api 0.0.20 → 0.0.22
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.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-external-api/client.rb +4 -3
- data/lib/uc3-dmp-external-api/version.rb +1 -1
- 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: 1a92ee0736f47ac2ff52f7e661c150e80ede4a2fe5a6950d3299487fb33834c1
|
4
|
+
data.tar.gz: 0745cacf33055db58fa55249eb4c16cdfec483179cc27cec153669c28d8cd5ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 683297d4cfb646b905e7527c382f785a15e0a7a33800a232021d65974210288cc57ec1b71a5546d57b0e0afd93d9ec2704ae0a3c683aae8d2072aaba4e3eb055
|
7
|
+
data.tar.gz: 1897e1b7d8430bc120ec8908f71c11e8e1d9f5f5024447390db468990743930d74860c5c11589aae87d4fceccd00cb312b29d221dcfbeef1f025c46e74018a1c
|
@@ -18,11 +18,11 @@ module Uc3DmpExternalApi
|
|
18
18
|
class << self
|
19
19
|
# Call the specified URL using the specified HTTP method, body and headers
|
20
20
|
# rubocop:disable Metrics/AbcSize, Metrics/ParameterLists
|
21
|
-
def call(url:, method: :get, body: '', basic_auth: {}, additional_headers: {}, logger: nil)
|
21
|
+
def call(url:, method: :get, body: '', basic_auth: {}, additional_headers: {}, timeout: 10, logger: nil)
|
22
22
|
uri = URI(url)
|
23
23
|
# Skip the body if we are doing a get
|
24
24
|
body = nil if method.to_sym == :get
|
25
|
-
opts = _options(body:, basic_auth:, additional_headers:, logger:)
|
25
|
+
opts = _options(body:, basic_auth:, additional_headers:, timeout:, logger:)
|
26
26
|
resp = HTTParty.send(method.to_sym, uri, opts)
|
27
27
|
|
28
28
|
unless [200, 201].include?(resp.code)
|
@@ -64,11 +64,12 @@ module Uc3DmpExternalApi
|
|
64
64
|
end
|
65
65
|
|
66
66
|
# Prepare the HTTParty gem options
|
67
|
-
def _options(body:, basic_auth: nil, additional_headers: {}, logger: nil)
|
67
|
+
def _options(body:, basic_auth: nil, additional_headers: {}, timeout: 10, logger: nil)
|
68
68
|
hdrs = _headers(additional_headers:)
|
69
69
|
opts = {
|
70
70
|
headers: hdrs,
|
71
71
|
follow_redirects: true,
|
72
|
+
timeout:,
|
72
73
|
limit: 6
|
73
74
|
}
|
74
75
|
opts[:basic_auth] = basic_auth if basic_auth.is_a?(Hash) && basic_auth.keys.any?
|
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.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sns
|