edmunds_api 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/README.md +1 -1
- data/lib/edmunds/request.rb +6 -3
- data/lib/edmunds/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae958ac39b456dbb20b3453c8e314a13493994a8
|
4
|
+
data.tar.gz: 18b5223b20ffdcc024ead92afaa1ed78c15656b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c3623250a99f04a1d4f721f3b435352bb4876af2f09def9d14ace68f77f0e9b60beb8eb9051a944dfe8a4f412e005857e988b16a6104325fe98237d3ba755dd
|
7
|
+
data.tar.gz: 0d31006e48ef3c95b0dc7390a725e80e17971f45a2ffcc2254d1b7c593bfcd5d59e7943531831b373fd87d2a043aac97644970aac63249602e38db47fa047062
|
data/README.md
CHANGED
data/lib/edmunds/request.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'timeout'
|
2
|
+
|
1
3
|
module Edmunds
|
2
4
|
module Request
|
3
5
|
|
@@ -9,7 +11,9 @@ module Edmunds
|
|
9
11
|
url = build_api_url api_path, path
|
10
12
|
request_params = merge_required_params options
|
11
13
|
raise 'No api_key found' if request_params[:api_key].empty?
|
12
|
-
response =
|
14
|
+
response = Timeout::timeout(timeout) {
|
15
|
+
HTTP.headers(http_headers).get(url, params: request_params)
|
16
|
+
}
|
13
17
|
parse_response response
|
14
18
|
end
|
15
19
|
|
@@ -35,8 +39,7 @@ module Edmunds
|
|
35
39
|
end
|
36
40
|
|
37
41
|
def timeout
|
38
|
-
|
39
|
-
[:global, connect: timeout]
|
42
|
+
Edmunds.configuration.timeout || DEFAULT_TIMEOUT
|
40
43
|
end
|
41
44
|
|
42
45
|
def parse_response(response)
|
data/lib/edmunds/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edmunds_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Belyaev
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.6.12
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Edmunds Api ruby client
|