esi 0.1.7 → 0.1.8

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
  SHA1:
3
- metadata.gz: c4b5a93efca48b194d39cbe3a444e3c485cfff72
4
- data.tar.gz: 1cec263496592b14acc81084ff041095cf8056a4
3
+ metadata.gz: 55e46758a229b449bc91f5322a05c0d107374ce6
4
+ data.tar.gz: 6c64e0acd0337ef7da86b46c5bbfa4b9f983a431
5
5
  SHA512:
6
- metadata.gz: 1633b582d5bb89a30a6572b5717d5cd1290da97a6f122b256d987e98a253f1fcde9ae01a8f6d90db98c4061a4ad38706e57685829d9ea37010d7bbb8ded8d0d9
7
- data.tar.gz: 59f485fb251825769b14c18f670b12516bda9a31634edaff11ad4da0d67f8fedaffefe94c1eb8c46dca137eac1168408c6e7210190327c46b2bec96605cd62d4
6
+ metadata.gz: 300c10b0ecaf52a09079376d912aba125617484cb2776008c8609e11d32b22d172246cc3fc44d80398adc7d4ffafe52416f7516ed7eb11a95f2cbb8f39841cf9
7
+ data.tar.gz: 132fc327d15515dccf2780de929272775b5627de5e386927b7c3bc5c065f6cd8991275f35796448c51ab8fb210c7d9c255e4f078dd1c3f9be7113e33254fcdf1
data/lib/esi/client.rb CHANGED
@@ -72,8 +72,9 @@ module Esi
72
72
  def request(call, url=nil, &block)
73
73
  response = nil
74
74
  last_ex = nil
75
-
75
+ options = { timeout: Esi.config.timeout }
76
76
  url ||= call.url
77
+
77
78
  debug "Starting request: #{url}"
78
79
 
79
80
  ActiveSupport::Notifications.instrument('esi.client.request') do
@@ -81,7 +82,7 @@ module Esi
81
82
  last_ex = nil
82
83
 
83
84
  begin
84
- response = oauth.request(call.method, url)
85
+ response = oauth.request(call.method, url, options)
85
86
  rescue Net::ReadTimeout => e
86
87
  last_ex = e
87
88
  logger.error "ReadTimeout received"
data/lib/esi/o_auth.rb CHANGED
@@ -21,11 +21,7 @@ module Esi
21
21
  @client ||= OAuth2::Client.new(
22
22
  Esi.config.client_id, Esi.config.client_secret,
23
23
  { site: Esi.config.oauth_host }
24
- ) do |conn|
25
- conn.adapter :net_http do |http|
26
- http.read_timeout = Esi.config.timeout
27
- end
28
- end
24
+ )
29
25
  end
30
26
  end
31
27
 
data/lib/esi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Esi
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Hiemstra