[DRE-commits] [SCM] rubygems.git branch, master, updated. upstream/1.7.2-16-gb5775a2

Lucas Nussbaum lucas at lucas-nussbaum.net
Sat Apr 30 06:47:59 UTC 2011


The following commit has been merged in the master branch:
commit b5775a22aa632ea6180e001ca571c225f4b46c96
Author: Lucas Nussbaum <lucas at lucas-nussbaum.net>
Date:   Sat Apr 30 08:42:29 2011 +0200

    Revert "Add build-dependency on ruby-minitest."
    
    This reverts commit db6e980ac982b7e29dcb8a0378dd5b1440a164d3, with the
    exception of leaving the ruby-minitest build-dependency.
    
    Conflicts:
    
    	debian/control

diff --git a/bin/gem b/bin/gem
index ff4334b..a4ec754 100755
--- a/bin/gem
+++ b/bin/gem
@@ -1,4 +1,4 @@
-#!/usr/bin/env ruby1.8
+#!/usr/bin/env ruby
 #--
 # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
 # All rights reserved.
diff --git a/debian/changelog b/debian/changelog
index 9f57338..163a4df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,3 @@
-rubygems (1.7.2-2) UNRELEASED; urgency=low
-
-  * Add build-dependency on ruby-minitest.
-
- -- Lucas Nussbaum <lucas at lucas-nussbaum.net>  Fri, 29 Apr 2011 18:59:41 +0200
-
 rubygems (1.7.2-1) unstable; urgency=low
 
   [ Lucas Nussbaum ]
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 044d178..9ea25cd 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -128,12 +128,6 @@ class Gem::Commands::UpdateCommand < Gem::Command
   # Update RubyGems software to the latest version.
 
   def update_rubygems
-    if ENV.include?('REALLY_GEM_UPDATE_SYSTEM')
-      say "Updating RubyGems"
-    else
-      alert_error "gem update --system is disabled on Debian, because it will overwrite the content of the rubygems Debian package, and might break your Debian system in subtle ways. The Debian-supported way to update rubygems is through apt-get, using Debian official repositories.\nIf you really know what you are doing, you can still update rubygems by setting the REALLY_GEM_UPDATE_SYSTEM environment variable, but please remember that this is completely unsupported by Debian."
-      terminate_interaction 1
-    end
     unless options[:args].empty? then
       alert_error "Gem names are not allowed with the --system option"
       terminate_interaction 1
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index ff6de2d..8950d0f 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -15,15 +15,18 @@ module Gem
   ##
   # Default home directory path to be used if an alternate value is not
   # specified in the environment
-  #
-  # Debian patch: search order of this directory.
-  #   1. GEM_HOME enviroment variable
-  #      (Using this, Gems are to be installed in any path as you like)
-  #   2. /var/lib/gems/{ruby version} (This is the default path in Debian system)
-  #
 
   def self.default_dir
-    File.join('/', 'var', 'lib', 'gems', ConfigMap[:ruby_version])
+    if defined? RUBY_FRAMEWORK_VERSION then
+      File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
+                ConfigMap[:ruby_version]
+    elsif ConfigMap[:rubylibprefix] then
+      File.join(ConfigMap[:rubylibprefix], 'gems',
+                ConfigMap[:ruby_version])
+    else
+      File.join(ConfigMap[:libdir], ruby_engine, 'gems',
+                ConfigMap[:ruby_version])
+    end
   end
 
   ##
@@ -60,11 +63,13 @@ module Gem
 
   ##
   # The default directory for binaries
-  # Debian patch:
-  #   install binaries to /usr/local/bin instead of /usr/bin
 
   def self.default_bindir
-    File.join('/', 'usr', 'local', 'bin')
+    if defined? RUBY_FRAMEWORK_VERSION then # mac framework support
+      '/usr/bin'
+    else # generic install
+      ConfigMap[:bindir]
+    end
   end
 
   ##
diff --git a/lib/rubygems/source_index.rb b/lib/rubygems/source_index.rb
index 4c1c6b4..28ff326 100644
--- a/lib/rubygems/source_index.rb
+++ b/lib/rubygems/source_index.rb
@@ -289,7 +289,7 @@ class Gem::SourceIndex
                     end
     else
       requirement = platform_only || Gem::Requirement.default
-      gem_pattern = /^#{gem_pattern}/i
+      gem_pattern = /#{gem_pattern}/i
     end
 
     unless Gem::Requirement === requirement then
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index d02e38b..b6a588b 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -461,7 +461,7 @@ class TestGem < Gem::TestCase
     assert_equal File.join(@gemhome, 'bin'), Gem.bindir(Pathname.new(Gem.dir))
   end
 
-  def est_self_bindir_default_dir
+  def test_self_bindir_default_dir
     default = Gem.default_dir
     bindir = if defined?(RUBY_FRAMEWORK_VERSION) then
                '/usr/bin'
@@ -520,7 +520,7 @@ class TestGem < Gem::TestCase
     assert_nil Gem.datadir('xyzzy')
   end
 
-  def est_self_default_dir
+  def test_self_default_dir
     assert_match @default_dir_re, Gem.default_dir
   end
 
@@ -581,7 +581,7 @@ class TestGem < Gem::TestCase
   end
 
   unless win_platform? then # only for FS that support write protection
-    def est_self_ensure_gem_directories_write_protected
+    def test_self_ensure_gem_directories_write_protected
       gemdir = File.join @tempdir, "egd"
       FileUtils.rm_r gemdir rescue nil
       refute File.exist?(gemdir), "manually remove #{gemdir}, tests are broken"
@@ -596,7 +596,7 @@ class TestGem < Gem::TestCase
       FileUtils.chmod 0600, gemdir
     end
 
-    def est_self_ensure_gem_directories_write_protected_parents
+    def test_self_ensure_gem_directories_write_protected_parents
       parent = File.join(@tempdir, "egd")
       gemdir = "#{parent}/a/b/c"
 
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index c736b60..a815a72 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -109,7 +109,7 @@ class TestGemCommandsInstallCommand < Gem::TestCase
     assert out.empty?, out.inspect
   end
 
-  def est_no_user_install
+  def test_no_user_install
     skip 'skipped on MS Windows (chmod has no effect)' if win_platform?
 
     util_setup_fake_fetcher
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index 5f1913a..8e964da 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -82,7 +82,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
     end
   end
 
-  def est_execute_system
+  def test_execute_system
     util_setup_rubygem9
     util_setup_spec_fetcher @rubygem9
     util_add_to_fetcher @rubygem9
@@ -106,7 +106,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
     assert_empty out
   end
 
-  def est_execute_system_at_latest
+  def test_execute_system_at_latest
     util_setup_rubygem_current
     util_setup_spec_fetcher @rubygem_current
     util_add_to_fetcher @rubygem_current
@@ -128,7 +128,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
     assert_empty out
   end
 
-  def est_execute_system_multiple
+  def test_execute_system_multiple
     util_setup_rubygem9
     util_setup_rubygem8
     util_setup_spec_fetcher @rubygem8, @rubygem9
@@ -153,7 +153,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
     assert_empty out
   end
 
-  def est_execute_system_specific
+  def test_execute_system_specific
     util_clear_gems
     util_setup_rubygem9
     util_setup_rubygem8
@@ -178,7 +178,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
     assert_empty out
   end
 
-  def est_execute_system_specifically_to_latest_version
+  def test_execute_system_specifically_to_latest_version
     util_clear_gems
     util_setup_rubygem9
     util_setup_rubygem8
@@ -203,7 +203,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
     assert_empty out
   end
 
-  def est_execute_system_with_gems
+  def test_execute_system_with_gems
     @cmd.options[:args]          = %w[gem]
     @cmd.options[:system]        = true
     @cmd.options[:generate_rdoc] = false
diff --git a/test/rubygems/test_gem_doc_manager.rb b/test/rubygems/test_gem_doc_manager.rb
index 68b907d..bf3e34a 100644
--- a/test/rubygems/test_gem_doc_manager.rb
+++ b/test/rubygems/test_gem_doc_manager.rb
@@ -10,7 +10,7 @@ class TestGemDocManager < Gem::TestCase
     @manager = Gem::DocManager.new(@spec)
   end
 
-  def est_uninstall_doc_unwritable
+  def test_uninstall_doc_unwritable
     path = @spec.installation_path
     orig_mode = File.stat(path).mode
 
diff --git a/test/rubygems/test_gem_install_update_options.rb b/test/rubygems/test_gem_install_update_options.rb
index 6525cec..2c4ad3f 100644
--- a/test/rubygems/test_gem_install_update_options.rb
+++ b/test/rubygems/test_gem_install_update_options.rb
@@ -45,7 +45,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase
                                  @spec.full_name))
   end
 
-  def est_user_install_disabled_read_only
+  def test_user_install_disabled_read_only
     if win_platform?
       skip('test_user_install_disabled_read_only test skipped on MS Windows')
     else
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb
index 9b36f12..ac8bfea 100644
--- a/test/rubygems/test_gem_installer.rb
+++ b/test/rubygems/test_gem_installer.rb
@@ -264,7 +264,7 @@ load Gem.bin_path('a', 'executable', version)
     refute File.exist?(util_inst_bindir), 'bin dir was created when not needed'
   end
 
-  def est_generate_bin_script_no_perms
+  def test_generate_bin_script_no_perms
     @installer.wrappers = true
     util_make_exec
 
@@ -355,7 +355,7 @@ load Gem.bin_path('a', 'executable', version)
     refute File.exist?(util_inst_bindir)
   end
 
-  def est_generate_bin_symlink_no_perms
+  def test_generate_bin_symlink_no_perms
     @installer.wrappers = false
     util_make_exec
     @installer.gem_dir = util_gem_dir
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
index d4a9d4c..5125ec9 100644
--- a/test/rubygems/test_gem_remote_fetcher.rb
+++ b/test/rubygems/test_gem_remote_fetcher.rb
@@ -269,7 +269,7 @@ gems:
   end
 
   unless win_platform? # File.chmod doesn't work
-    def est_download_local_read_only
+    def test_download_local_read_only
       FileUtils.mv @a1_gem, @tempdir
       local_path = File.join @tempdir, @a1.file_name
       inst = nil
@@ -285,7 +285,7 @@ gems:
       File.chmod 0755, Gem.cache_dir(@gemhome)
     end
 
-    def est_download_read_only
+    def test_download_read_only
       File.chmod 0555, Gem.cache_dir(@gemhome)
       File.chmod 0555, File.join(@gemhome)
 

-- 
rubygems.git



More information about the Pkg-ruby-extras-commits mailing list