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 --- tool/downloader.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tool') 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