hypertrack 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hypertrack/api_client.rb +13 -7
- 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: 7cd33ffb3022506660ade678e859d8f4a822f5c98fa5ec8c6653a4373e2ca3b6
|
4
|
+
data.tar.gz: 5d2e0688ca132a59dab6ac4d29121db107fce5ee1b8807a9a624b0ae56aeb4f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd650d36e7af7bb4eaa6d9ecbac6010e2dc1469fd1a05ba0316eddfad9cfcf6a3365d31eda1d53d30db5f0be903bd1511db4d78d111f5824cdec1fbf6b148cf6
|
7
|
+
data.tar.gz: b1cf916148189ccc7e250c3fb86019d96a19bea83b733717dc93e88a119dae8a67d40ed36abafec24fd88325d876d910afdba5111345579e9e3b8ed0d1188354
|
@@ -65,14 +65,20 @@ module HyperTrack
|
|
65
65
|
request_object
|
66
66
|
end
|
67
67
|
|
68
|
-
# To-Do: Add a timeout
|
69
68
|
def make_request(api_uri, request_object)
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
69
|
+
parse_response(
|
70
|
+
Net::HTTP.start(
|
71
|
+
api_uri.host,
|
72
|
+
api_uri.port,
|
73
|
+
:read_timeout => ENV['NET_TIMEOUT'] || 5,
|
74
|
+
:use_ssl => api_uri.scheme == 'https',
|
75
|
+
:verify_mode => OpenSSL::SSL::VERIFY_PEER
|
76
|
+
) { |conn|
|
77
|
+
conn.cert_store = OpenSSL::X509::Store.new
|
78
|
+
conn.cert_store.set_default_paths
|
79
|
+
conn.request(request_object)
|
80
|
+
}
|
81
|
+
)
|
76
82
|
end
|
77
83
|
|
78
84
|
def parse_response(response)
|