summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog6
-rw-r--r--tool/downloader.rb4
2 files changed, 10 insertions, 0 deletions
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 <naruse@ruby-lang.org>
+
+ * 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 <naruse@ruby-lang.org>
* 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