lib/geoblacklight/download.rb in geoblacklight-0.10.2 vs lib/geoblacklight/download.rb in geoblacklight-0.11.0

- old
+ new

@@ -61,13 +61,11 @@ # @return [Faraday::Request] returns a Faraday::Request object 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 rescue Faraday::Error::TimeoutError => error raise Geoblacklight::Exceptions::ExternalDownloadFailed, message: 'Download timed out', url: conn.url_prefix.to_s