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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab71a6b34bd18a4d4d141df00faddd71f8f77918
4
- data.tar.gz: 5b7fde93e9206b35c21b5df3337760b6bb385f5b
3
+ metadata.gz: ae958ac39b456dbb20b3453c8e314a13493994a8
4
+ data.tar.gz: 18b5223b20ffdcc024ead92afaa1ed78c15656b1
5
5
  SHA512:
6
- metadata.gz: 964443fdef90764a16b7203f580c02975cca5b2489f29e98b6cad03e4cfcc1223afbf9bd7c07a7eaad931eb910e60d799b07f035b72ad66df8f93fb8567bee95
7
- data.tar.gz: 17d1dc9e5f309e9a9e41b31fb1e239fb6ee2e2bc91210a0cdf1ba2c04e548cb93f4881a43d27be94569f7066e5cd91e432b39182933aa3d3ed5ab86c9b65a70f
6
+ metadata.gz: 8c3623250a99f04a1d4f721f3b435352bb4876af2f09def9d14ace68f77f0e9b60beb8eb9051a944dfe8a4f412e005857e988b16a6104325fe98237d3ba755dd
7
+ data.tar.gz: 0d31006e48ef3c95b0dc7390a725e80e17971f45a2ffcc2254d1b7c593bfcd5d59e7943531831b373fd87d2a043aac97644970aac63249602e38db47fa047062
data/README.md CHANGED
@@ -13,7 +13,7 @@ Edmunds Api ruby client.
13
13
  Add this line to your application's Gemfile:
14
14
 
15
15
  ```ruby
16
- gem 'edmunds_api', '~> 0.1.5'
16
+ gem 'edmunds_api', '~> 0.1.6'
17
17
  ```
18
18
 
19
19
  And then execute:
@@ -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 = HTTP.timeout(*timeout).headers(http_headers).get(url, params: request_params)
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
- timeout = Edmunds.configuration.timeout || DEFAULT_TIMEOUT
39
- [:global, connect: timeout]
42
+ Edmunds.configuration.timeout || DEFAULT_TIMEOUT
40
43
  end
41
44
 
42
45
  def parse_response(response)
@@ -1,3 +1,3 @@
1
1
  module Edmunds
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
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.5
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.5.1
157
+ rubygems_version: 2.6.12
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: Edmunds Api ruby client