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

ruby-changes:11206

From: nobu <ko1@a...>
Date: Sat, 7 Mar 2009 19:36:32 +0900 (JST)
Subject: [ruby-changes:11206] Ruby:r22815 (trunk): * test/rubygems/simple_gem.rb: updated for 1.9.

nobu	2009-03-07 19:36:27 +0900 (Sat, 07 Mar 2009)

  New Revision: 22815

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

  Log:
    * test/rubygems/simple_gem.rb: updated for 1.9.

  Modified files:
    trunk/test/rubygems/simple_gem.rb

Index: test/rubygems/simple_gem.rb
===================================================================
--- test/rubygems/simple_gem.rb	(revision 22814)
+++ test/rubygems/simple_gem.rb	(revision 22815)
@@ -5,28 +5,32 @@
 #++
 
     SIMPLE_GEM = <<-GEMDATA
-        MD5SUM = "e3701f9db765a2358aef94c40ded71c8"
+        MD5SUM = "954df67d9475aa2f4fbba20aa33649c8"
         if $0 == __FILE__
           require 'optparse'
 
           options = {}
           ARGV.options do |opts|
             opts.on_tail("--help", "show this message") {puts opts; exit}
-            opts.on('--dir=DIRNAME', "Installation directory for the Gem") {|options[:directory]|}
-            opts.on('--force', "Force Gem to intall, bypassing dependency checks") {|options[:force]|}
-            opts.on('--gen-rdoc', "Generate RDoc documentation for the Gem") {|options[:gen_rdoc]|}
+            opts.on('--dir=DIRNAME', "Installation directory for the Gem") {|x|
+              options[:directory] = x
+            }
+            opts.on('--force', "Force Gem to intall, bypassing dependency checks") {|x|
+              options[:force] = x
+            }
+            opts.on('--gen-rdoc', "Generate RDoc documentation for the Gem") {|x|
+              options[:gen_rdoc] = x
+            }
             opts.parse!
           end
 
-          require 'rubygems'
-          @directory = options[:directory] || Gem.dir
-          @force = options[:force]
+          require 'rubygems/installer'
 
-          gem = Gem::Installer.new(__FILE__).install(@force, @directory)
+          gem = Gem::Installer.new(__FILE__, options).install
           if options[:gen_rdoc]
             Gem::DocManager.new(gem).generate_rdoc
           end
-end
+        end
 
 __END__
 --- !ruby/object:Gem::Specification

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

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