wolf_core 1.0.59 → 1.0.60

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8a49d9f69bf0479d8e1bb729b4860cb39bf2653754533814b5f570fd33a56dc
4
- data.tar.gz: bf7e77f83cbd435fffb27b72c8ed1c6c19dafc982641e8d20f0b7ff514d66e33
3
+ metadata.gz: 14d70c706c658014c77b0edfef7df110c0c5d99d719ab312f4b787c22f4f07da
4
+ data.tar.gz: f5c19c72c02f24f87f955c9dbeccc23e7413256ae94eb3039babaf1dbaaabc5e
5
5
  SHA512:
6
- metadata.gz: 85f4405412747716e4f10e675ff553d53d8da5508390264130a6c2d8a6e1eb5f25448ab67d857c749896e28517ce2e0540a5cae1779373d13519c1107e7f1bb9
7
- data.tar.gz: bde2251dc5a5be9a038d71001a6b0564696386cf0aad941e075b9934fb8a55d75fb0f5260fb70b8a7991be0d6bf54f3fb57e186818fdea55aa5363b461ec00d0
6
+ metadata.gz: c46720213697ec635ee8483cdfcf3f597792b24b74d6dc4638ee24e272ee91dfe69063335484c9f060f6256a99c81725a7f71c3bb8640ad2d5e91af2f0fc65b5
7
+ data.tar.gz: 53fa0341be43a726de34f7d0f777c027d64e74c6ae17873e47411ad230ed2b8527f9d7ff609b9d6cbaf497345fc485bcec0e3aab50de87cc2a74ca000091228e
@@ -4,26 +4,30 @@ module WolfCore
4
4
 
5
5
  TIMEOUT = 900
6
6
 
7
- def http_get(url:, headers: {}, query: nil, timeout: TIMEOUT)
8
- HTTParty.get(url, headers: headers, query: query, timeout: timeout)
7
+ def http_get(url:, headers: {}, query: nil, timeout: nil)
8
+ timeout ||= TIMEOUT
9
+ HTTParty.get(url, headers: headers, query: query, timeout: timeout, open_timeout: timeout, read_timeout: timeout)
9
10
  end
10
11
 
11
- def http_post(url:, headers: {}, query: nil, body: nil, timeout: TIMEOUT)
12
+ def http_post(url:, headers: {}, query: nil, body: nil, timeout: nil)
12
13
  headers['Content-Type'] ||= 'application/json'
13
14
  body = body&.to_json if headers['Content-Type'] == 'application/json'
14
- HTTParty.post(url, headers: headers, query: query, body: body, timeout: timeout)
15
+ timeout ||= TIMEOUT
16
+ HTTParty.post(url, headers: headers, query: query, body: body, timeout: timeout, open_timeout: timeout, read_timeout: timeout)
15
17
  end
16
18
 
17
- def http_put(url:, headers: {}, query: nil, body: nil, timeout: TIMEOUT)
19
+ def http_put(url:, headers: {}, query: nil, body: nil, timeout: nil)
18
20
  headers['Content-Type'] ||= 'application/json'
19
21
  body = body&.to_json if headers['Content-Type'] == 'application/json'
20
- HTTParty.put(url, headers: headers, query: query, body: body, timeout: timeout)
22
+ timeout ||= TIMEOUT
23
+ HTTParty.put(url, headers: headers, query: query, body: body, timeout: timeout, open_timeout: timeout, read_timeout: timeout)
21
24
  end
22
25
 
23
- def http_patch(url:, headers: {}, query: nil, body: nil, timeout: TIMEOUT)
26
+ def http_patch(url:, headers: {}, query: nil, body: nil, timeout: nil)
24
27
  headers['Content-Type'] ||= 'application/json'
25
28
  body = body&.to_json if headers['Content-Type'] == 'application/json'
26
- HTTParty.patch(url, headers: headers, query: query, body: body, timeout: timeout)
29
+ timeout ||= TIMEOUT
30
+ HTTParty.patch(url, headers: headers, query: query, body: body, timeout: timeout, open_timeout: timeout, read_timeout: timeout)
27
31
  end
28
32
  end
29
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.59"
4
+ VERSION = "1.0.60"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.59
4
+ version: 1.0.60
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo