xhash_client 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/xhash.rb +8 -0
- data/lib/xhash/client/api_client.rb +8 -0
- data/lib/xhash/client/json_api.rb +3 -3
- data/lib/xhash/version.rb +1 -1
- data/spec/spec_helper.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a9138a8aa4d278ebdf067d812d06a9f87ef30390ee0f86a33fb07f49f140dd4
|
4
|
+
data.tar.gz: 4be4b3647acfa20a10b42ab3b9b0c6f0548825d2d5a2120916b8ddc000f62e3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e43d879d10faf34886641bc1e0ccd20387e92017c0818ad8b77306b403f71182ac8e0e46890ec2a04febb7625f58e49bf460b7df164f915dfeb0fff7c61df95f
|
7
|
+
data.tar.gz: 3d13a691f4e44acc2958837ce3094f388409504dd1fbaee8c8c2d38d98f8ad82f7b25a1ee9f7f57e7a2b1450080e3402169536adef82f8a9fee6eac49bd338e6
|
data/Gemfile.lock
CHANGED
data/lib/xhash.rb
CHANGED
@@ -11,7 +11,7 @@ module Xhash
|
|
11
11
|
|
12
12
|
def api_get(url:, headers: {})
|
13
13
|
custom_headers = headers.merge(default_headers)
|
14
|
-
response = HTTParty.get(Xhash.api_base + url, headers: custom_headers)
|
14
|
+
response = HTTParty.get(Xhash.api_base + url, headers: custom_headers, timeout: Xhash.timeout)
|
15
15
|
|
16
16
|
raise Xhash::Error.new(response) unless response_ok?(response)
|
17
17
|
|
@@ -28,7 +28,7 @@ module Xhash
|
|
28
28
|
response =
|
29
29
|
HTTParty.post(
|
30
30
|
Xhash.api_base + url,
|
31
|
-
body: body.to_json, headers: custom_headers
|
31
|
+
body: body.to_json, headers: custom_headers, timeout: Xhash.timeout
|
32
32
|
)
|
33
33
|
|
34
34
|
raise Xhash::Error.new(response) unless response_ok?(response)
|
@@ -46,7 +46,7 @@ module Xhash
|
|
46
46
|
response =
|
47
47
|
HTTParty.post(
|
48
48
|
Xhash.api_base + url,
|
49
|
-
multipart: true, body: body, headers: custom_headers
|
49
|
+
multipart: true, body: body, headers: custom_headers, timeout: Xhash.timeout
|
50
50
|
)
|
51
51
|
|
52
52
|
raise Xhash::Error.new(response) unless response_ok?(response)
|
data/lib/xhash/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED