download(path)
public
Downloads a gem at path and returns the file path.
# File lib/rubygems/resolver/activation_request.rb, line 52
def download path
Gem.ensure_gem_subdirectories path
if @spec.respond_to? :sources
exception = nil
path = @spec.sources.find{ |source|
begin
source.download full_spec, path
rescue exception
end
}
return path if path
raise exception if exception
elsif @spec.respond_to? :source
source = @spec.source
source.download full_spec, path
else
source = Gem.sources.first
source.download full_spec, path
end
end