From 501656c4d8f8ad783d60b7dd6755d6a26cd3a7d1 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 19 Nov 2014 09:15:04 +0000 Subject: * tool/downloader.rb (RubyGems.download): Don't download gem if the version is already downloaded. A gem file is versioned and it must be identical if the version is the same. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ tool/downloader.rb | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0f4f8d79b5..b7a12d6f90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Nov 19 18:12:17 2014 NARUSE, Yui + + * tool/downloader.rb (RubyGems.download): Don't download gem if the + version is already downloaded. A gem file is versioned and + it must be identical if the version is the same. + Wed Nov 19 17:59:25 2014 NARUSE, Yui * common.mk (ext/ripper/ripper.c): pass build directory as VPATH. diff --git a/tool/downloader.rb b/tool/downloader.rb index 3b39f45ed0..1149424881 100644 --- a/tool/downloader.rb +++ b/tool/downloader.rb @@ -9,6 +9,10 @@ class Downloader class RubyGems < self def self.download(name, *rest) + if File.exist?(name) + $stdout.puts "#{name} already exists" + return + end super("https://rubygems.org/downloads/#{name}", name, *rest) end end -- cgit v1.2.3