[前][次][番号順一覧][スレッド一覧]

ruby-changes:36413

From: naruse <ko1@a...>
Date: Wed, 19 Nov 2014 18:15:13 +0900 (JST)
Subject: [ruby-changes:36413] naruse:r48494 (trunk): * tool/downloader.rb (RubyGems.download): Don't download gem if the

naruse	2014-11-19 18:15:04 +0900 (Wed, 19 Nov 2014)

  New Revision: 48494

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48494

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/tool/downloader.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48493)
+++ ChangeLog	(revision 48494)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Nov 19 18:12:17 2014  NARUSE, Yui  <naruse@r...>
+
+	* 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@r...>
 
 	* common.mk (ext/ripper/ripper.c): pass build directory as VPATH.
Index: tool/downloader.rb
===================================================================
--- tool/downloader.rb	(revision 48493)
+++ tool/downloader.rb	(revision 48494)
@@ -9,6 +9,10 @@ class Downloader https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L9
 
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]