summaryrefslogtreecommitdiff
path: root/tool/downloader.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-19 09:15:04 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-19 09:15:04 +0000
commit501656c4d8f8ad783d60b7dd6755d6a26cd3a7d1 (patch)
tree59238f62696c270bea86d4f6e5a37674f46ad556 /tool/downloader.rb
parent926b9e05f1b5c0863f52f6a0e7557fbb5503be4b (diff)
* 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
Diffstat (limited to 'tool/downloader.rb')
-rw-r--r--tool/downloader.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index 3b39f45..1149424 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