wolf_core 1.0.59 → 1.0.61

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: f6245928494b6953038d88b318fef4d571d1291999df4e2a5fc3fce0c303c8a7
4
+ data.tar.gz: 65760e9569412a7e4273c308101c5abd204700f2c93c7ea407c9d98db9f35a94
5
5
  SHA512:
6
- metadata.gz: 85f4405412747716e4f10e675ff553d53d8da5508390264130a6c2d8a6e1eb5f25448ab67d857c749896e28517ce2e0540a5cae1779373d13519c1107e7f1bb9
7
- data.tar.gz: bde2251dc5a5be9a038d71001a6b0564696386cf0aad941e075b9934fb8a55d75fb0f5260fb70b8a7991be0d6bf54f3fb57e186818fdea55aa5363b461ec00d0
6
+ metadata.gz: 5927edc2ba2085c0b8085085cb686112e4b4c8bfed33957e1623848ea34ae17570f8dd640007674a77bce5e5e35a8a1e0d965bc0adf17336aff8785508ddfe26
7
+ data.tar.gz: dceea2944439d08ee69e45537922a02fcff1dada5a841d484c3d342b5d2a346bf568d11189d21ae682d0bcee3b601cbe755da317e073581148bef6cf98a3d9cd
@@ -4,26 +4,38 @@ 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
+ puts "timeout before is #{timeout}"
9
+ timeout ||= TIMEOUT
10
+ puts "timeout after is #{timeout}"
11
+ HTTParty.get(url, headers: headers, query: query, timeout: timeout, open_timeout: timeout, read_timeout: timeout, write_timeout: timeout)
9
12
  end
10
13
 
11
- def http_post(url:, headers: {}, query: nil, body: nil, timeout: TIMEOUT)
14
+ def http_post(url:, headers: {}, query: nil, body: nil, timeout: nil)
12
15
  headers['Content-Type'] ||= 'application/json'
13
16
  body = body&.to_json if headers['Content-Type'] == 'application/json'
14
- HTTParty.post(url, headers: headers, query: query, body: body, timeout: timeout)
17
+ puts "timeout before is #{timeout}"
18
+ timeout ||= TIMEOUT
19
+ puts "timeout after is #{timeout}"
20
+ HTTParty.post(url, headers: headers, query: query, body: body, timeout: timeout, open_timeout: timeout, read_timeout: timeout, write_timeout: timeout)
15
21
  end
16
22
 
17
- def http_put(url:, headers: {}, query: nil, body: nil, timeout: TIMEOUT)
23
+ def http_put(url:, headers: {}, query: nil, body: nil, timeout: nil)
18
24
  headers['Content-Type'] ||= 'application/json'
19
25
  body = body&.to_json if headers['Content-Type'] == 'application/json'
20
- HTTParty.put(url, headers: headers, query: query, body: body, timeout: timeout)
26
+ puts "timeout before is #{timeout}"
27
+ timeout ||= TIMEOUT
28
+ puts "timeout after is #{timeout}"
29
+ HTTParty.put(url, headers: headers, query: query, body: body, timeout: timeout, open_timeout: timeout, read_timeout: timeout, write_timeout: timeout)
21
30
  end
22
31
 
23
- def http_patch(url:, headers: {}, query: nil, body: nil, timeout: TIMEOUT)
32
+ def http_patch(url:, headers: {}, query: nil, body: nil, timeout: nil)
24
33
  headers['Content-Type'] ||= 'application/json'
25
34
  body = body&.to_json if headers['Content-Type'] == 'application/json'
26
- HTTParty.patch(url, headers: headers, query: query, body: body, timeout: timeout)
35
+ puts "timeout before is #{timeout}"
36
+ timeout ||= TIMEOUT
37
+ puts "timeout after is #{timeout}"
38
+ HTTParty.patch(url, headers: headers, query: query, body: body, timeout: timeout, open_timeout: timeout, read_timeout: timeout, write_timeout: timeout)
27
39
  end
28
40
  end
29
41
  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.61"
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.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo