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

ruby-changes:27255

From: drbrain <ko1@a...>
Date: Tue, 19 Feb 2013 08:15:58 +0900 (JST)
Subject: [ruby-changes:27255] drbrain:r39307 (trunk): * lib/rubygems/installer.rb: Fixed placement of executables with

drbrain	2013-02-19 08:15:49 +0900 (Tue, 19 Feb 2013)

  New Revision: 39307

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

  Log:
    * lib/rubygems/installer.rb:  Fixed placement of executables with
      --user-install.  [ruby-trunk - Bug #7779]
    * test/rubygems/test_gem_installer.rb:  Test for above.

  Modified files:
    trunk/ChangeLog
    trunk/lib/rubygems/installer.rb
    trunk/test/rubygems/test_gem_installer.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39306)
+++ ChangeLog	(revision 39307)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Feb 19 08:14:40 2013  Eric Hodel  <drbrain@s...>
+
+	* lib/rubygems/installer.rb:  Fixed placement of executables with
+	  --user-install.  [ruby-trunk - Bug #7779]
+	* test/rubygems/test_gem_installer.rb:  Test for above.
+
 Tue Feb 19 06:04:06 2013  NARUSE, Yui  <naruse@r...>
 
 	* vm_dump: FreeBSD ports' libexecinfo's backtrace(3) can't trace
Index: lib/rubygems/installer.rb
===================================================================
--- lib/rubygems/installer.rb	(revision 39306)
+++ lib/rubygems/installer.rb	(revision 39307)
@@ -110,6 +110,7 @@ class Gem::Installer https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L110
 
     if options[:user_install] and not options[:unpack] then
       @gem_home = Gem.user_dir
+      @bin_dir = Gem.bindir gem_home unless options[:bin_dir]
       check_that_user_bin_dir_is_in_path
     end
   end
Index: test/rubygems/test_gem_installer.rb
===================================================================
--- test/rubygems/test_gem_installer.rb	(revision 39306)
+++ test/rubygems/test_gem_installer.rb	(revision 39307)
@@ -661,6 +661,24 @@ load Gem.bin_path('a', 'executable', ver https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_installer.rb#L661
     installer = Gem::Installer.new gem
 
     assert_equal File.join(@gemhome, 'gems', spec.full_name), installer.gem_dir
+    assert_equal File.join(@gemhome, 'bin'), installer.bin_dir
+  end
+
+  def test_initialize_user_install
+    installer = Gem::Installer.new @gem, :user_install => true
+
+    assert_equal File.join(Gem.user_dir, 'gems', @spec.full_name),
+                 installer.gem_dir
+    assert_equal Gem.bindir(Gem.user_dir), installer.bin_dir
+  end
+
+  def test_initialize_user_install_bin_dir
+    installer =
+      Gem::Installer.new @gem, :user_install => true, :bin_dir => @tempdir
+
+    assert_equal File.join(Gem.user_dir, 'gems', @spec.full_name),
+                 installer.gem_dir
+    assert_equal @tempdir, installer.bin_dir
   end
 
   def test_install

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

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