ruby-changes:27267
From: drbrain <ko1@a...>
Date: Tue, 19 Feb 2013 14:09:29 +0900 (JST)
Subject: [ruby-changes:27267] drbrain:r39319 (ruby_2_0_0): * backport r39307 from trunk. [Bug #7880]
drbrain 2013-02-19 14:09:18 +0900 (Tue, 19 Feb 2013) New Revision: 39319 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39319 Log: * backport r39307 from trunk. [Bug #7880] * 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: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/lib/rubygems/installer.rb branches/ruby_2_0_0/test/rubygems/test_gem_installer.rb Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 39318) +++ ruby_2_0_0/ChangeLog (revision 39319) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Tue Feb 19 14:08:46 2013 Eric Hodel <drbrain@s...> + + * backport r39307 from trunk. [Bug #7880] + + * 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 13:57:26 2013 Eric Hodel <drbrain@s...> * backport r39247 from trunk. [Bug #7853] Index: ruby_2_0_0/lib/rubygems/installer.rb =================================================================== --- ruby_2_0_0/lib/rubygems/installer.rb (revision 39318) +++ ruby_2_0_0/lib/rubygems/installer.rb (revision 39319) @@ -110,6 +110,7 @@ class Gem::Installer https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/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: ruby_2_0_0/test/rubygems/test_gem_installer.rb =================================================================== --- ruby_2_0_0/test/rubygems/test_gem_installer.rb (revision 39318) +++ ruby_2_0_0/test/rubygems/test_gem_installer.rb (revision 39319) @@ -661,6 +661,24 @@ load Gem.bin_path('a', 'executable', ver https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/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/