Skip to content

Commit

Permalink
Update Faraday options passing for compatibility 0.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed committed Oct 17, 2015
1 parent d62f4f0 commit ffc09b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions lib/geoblacklight/download.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ def initiate_download
conn = Faraday.new(url: url)
conn.get do |request|
request.params = @options[:request_params]
request.options = {
timeout: timeout,
open_timeout: timeout
}
request.options.timeout = timeout
request.options.open_timeout = timeout
end
rescue Faraday::Error::ConnectionFailed => error
raise Geoblacklight::Exceptions::ExternalDownloadFailed, message: 'Download connection failed', url: conn.url_prefix.to_s
Expand Down
6 changes: 2 additions & 4 deletions lib/geoblacklight/wms_layer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ def request_response
conn = Faraday.new(url: url)
conn.get do |request|
request.params = search_params
request.options = {
timeout: Settings.TIMEOUT_WMS,
open_timeout: Settings.TIMEOUT_WMS
}
request.options.timeout = Settings.TIMEOUT_WMS
request.options.open_timeout = Settings.TIMEOUT_WMS
end
rescue Faraday::Error::ConnectionFailed => error
Geoblacklight.logger.error error.inspect
Expand Down

0 comments on commit ffc09b3

Please sign in to comment.