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

ruby-changes:34436

From: hsbt <ko1@a...>
Date: Mon, 23 Jun 2014 18:49:49 +0900 (JST)
Subject: [ruby-changes:34436] hsbt:r46517 (trunk): * tool/config_files.rb: rename class ConfigFiles to Downloader.

hsbt	2014-06-23 18:49:42 +0900 (Mon, 23 Jun 2014)

  New Revision: 46517

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

  Log:
    * tool/config_files.rb: rename class ConfigFiles to Downloader.
    * tool/get-config_files: ditto.
    * tool/make-snapshot: ditto.

  Added files:
    trunk/tool/downloader.rb
  Removed files:
    trunk/tool/config_files.rb
  Modified files:
    trunk/ChangeLog
    trunk/tool/get-config_files
    trunk/tool/make-snapshot
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46516)
+++ ChangeLog	(revision 46517)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun 23 18:44:45 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* tool/config_files.rb: rename class ConfigFiles to Downloader.
+	* tool/get-config_files: ditto.
+	* tool/make-snapshot: ditto.
+
 Mon Jun 23 18:03:13 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* tool/rbinstall.rb: support to install bundle gems.
Index: tool/config_files.rb
===================================================================
--- tool/config_files.rb	(revision 46516)
+++ tool/config_files.rb	(revision 46517)
@@ -1,11 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/tool/config_files.rb#L0
-require 'open-uri'
-
-ConfigFiles = "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=%s;hb=HEAD"
-def ConfigFiles.download(name, dir = nil)
-  uri = URI(self % name)
-  data = uri.read
-  file = dir ? File.join(dir, name) : name
-  open(file, "wb", 0755) {|f| f.write(data)}
-rescue => e
-  raise "failed to download #{name}\n#{e.message}: #{uri}"
-end
Index: tool/get-config_files
===================================================================
--- tool/get-config_files	(revision 46516)
+++ tool/get-config_files	(revision 46517)
@@ -1,9 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/tool/get-config_files#L1
 #!/usr/bin/ruby
-require File.expand_path('../config_files', __FILE__)
+require File.expand_path('../downloader', __FILE__)
 ARGV.each {|n|
   STDOUT.print "Downloading #{n}..."; STDOUT.flush
   begin
-    ConfigFiles.download(n)
+    Downloader.download(n)
     STDOUT.puts
   rescue => e
     STDOUT.puts
Index: tool/downloader.rb
===================================================================
--- tool/downloader.rb	(revision 0)
+++ tool/downloader.rb	(revision 46517)
@@ -0,0 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/tool/downloader.rb#L1
+require 'open-uri'
+
+Downloader = "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=%s;hb=HEAD"
+def Downloader.download(name, dir = nil)
+  uri = URI(self % name)
+  data = uri.read
+  file = dir ? File.join(dir, name) : name
+  open(file, "wb", 0755) {|f| f.write(data)}
+rescue => e
+  raise "failed to download #{name}\n#{e.message}: #{uri}"
+end

Property changes on: tool/downloader.rb
___________________________________________________________________
Added: svn:eol-style
   + LF

Index: tool/make-snapshot
===================================================================
--- tool/make-snapshot	(revision 46516)
+++ tool/make-snapshot	(revision 46517)
@@ -218,11 +218,11 @@ def package(rev, destdir) https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L218
     %w[config.guess config.sub].each do |conf|
       next if File.exist?("tool/#{conf}")
       begin
-        require File.expand_path("config_files", $tooldir)
+        require File.expand_path("downloader", $tooldir)
       rescue LoadError
-        abort "Error!!! Copy 'config_files.rb' from 'tool' directory of the recent ruby repository!"
+        abort "Error!!! Copy 'downloader.rb' from 'tool' directory of the recent ruby repository!"
       end
-      ConfigFiles.download(conf, "tool")
+      Downloader.download(conf, "tool")
     end
     File.open(clean.add("cross.rb"), "w") do |f|
       f.puts "Object.__send__(:remove_const, :CROSS_COMPILING) if defined?(CROSS_COMPILING)"

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

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