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

ruby-changes:27096

From: drbrain <ko1@a...>
Date: Fri, 8 Feb 2013 10:23:33 +0900 (JST)
Subject: [ruby-changes:27096] drbrain:r39148 (trunk): * lib/rubygems/config_file.rb: Add missing require for

drbrain	2013-02-08 10:15:54 +0900 (Fri, 08 Feb 2013)

  New Revision: 39148

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

  Log:
    * lib/rubygems/config_file.rb:  Add missing require for
      user_interaction.rb
    
    * lib/rubygems/dependency_installer.rb:  Minor refactor for clarity.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/config_file.rb
    trunk/lib/rubygems/dependency_installer.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39147)
+++ ChangeLog	(revision 39148)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Feb  8 10:11:09 2013  Eric Hodel  <drbrain@s...>
+
+	* lib/rubygems/config_file.rb:  Add missing require for
+	  user_interaction.rb
+
+	* lib/rubygems/dependency_installer.rb:  Minor refactor for clarity.
+
 Fri Feb  8 09:35:17 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/mkmf.rb (MakeMakefile#configuration): set all ruby names.
Index: lib/rubygems/dependency_installer.rb
===================================================================
--- lib/rubygems/dependency_installer.rb	(revision 39147)
+++ lib/rubygems/dependency_installer.rb	(revision 39148)
@@ -57,13 +57,13 @@ class Gem::DependencyInstaller https://github.com/ruby/ruby/blob/trunk/lib/rubygems/dependency_installer.rb#L57
   # :build_args:: See Gem::Installer::new
 
   def initialize(options = {})
-    if options[:install_dir] then
-      @gem_home = options[:install_dir]
+    @install_dir = options[:install_dir] || Gem.dir
 
-      # HACK shouldn't change the global settings
-      Gem::Specification.dirs = @gem_home
-      Gem.ensure_gem_subdirectories @gem_home
-      options[:install_dir] = @gem_home # FIX: because we suck and reuse below
+    if options[:install_dir] then
+      # HACK shouldn't change the global settings, needed for -i behavior
+      # maybe move to the install command?  See also github #442
+      Gem::Specification.dirs = @install_dir
+      Gem.ensure_gem_subdirectories @install_dir
     end
 
     options = DEFAULT_OPTIONS.merge options
@@ -91,7 +91,6 @@ class Gem::DependencyInstaller https://github.com/ruby/ruby/blob/trunk/lib/rubygems/dependency_installer.rb#L91
     @installed_gems = []
     @toplevel_specs = nil
 
-    @install_dir = options[:install_dir] || Gem.dir
     @cache_dir = options[:cache_dir] || @install_dir
 
     # Set with any errors that SpecFetcher finds while search through
Index: lib/rubygems/config_file.rb
===================================================================
--- lib/rubygems/config_file.rb	(revision 39147)
+++ lib/rubygems/config_file.rb	(revision 39148)
@@ -4,6 +4,8 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems/config_file.rb#L4
 # See LICENSE.txt for permissions.
 #++
 
+require 'rubygems/user_interaction'
+
 ##
 # Gem::ConfigFile RubyGems options and gem command options from gemrc.
 #

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

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