Class: Artifactory::GemImport::Gems::Downloader

Inherits:
Object
  • Object
show all
Defined in:
lib/artifactory/gem_import/gems/downloader.rb

Instance Method Summary collapse

Instance Method Details

#call(url, filename) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/artifactory/gem_import/gems/downloader.rb', line 7

def call(url, filename)
  download url, filename
rescue Net::HTTPClientException, Net::HTTPFatalError, Net::OpenTimeout, SocketError => err # TODO handle file (-system) errors
  [:error, err.message]
else
  [:ok, url]
end