[DRE-commits] [SCM] rubygems.git branch, master, updated. upstream/1.7.2-15-g13cbf99
Lucas Nussbaum
lucas at lucas-nussbaum.net
Fri Apr 29 17:04:38 UTC 2011
The following commit has been merged in the master branch:
commit db6e980ac982b7e29dcb8a0378dd5b1440a164d3
Author: Lucas Nussbaum <lucas at lucas-nussbaum.net>
Date: Fri Apr 29 18:59:56 2011 +0200
Add build-dependency on ruby-minitest.
diff --git a/bin/gem b/bin/gem
index a4ec754..ff4334b 100755
--- a/bin/gem
+++ b/bin/gem
@@ -1,4 +1,4 @@
-#!/usr/bin/env ruby
+#!/usr/bin/env ruby1.8
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/debian/changelog b/debian/changelog
index 163a4df..9f57338 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+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/debian/control b/debian/control
index 122a3ff..a7fff7c 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Daigo Moriwaki <daigo at debian.org>
Uploaders: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>, Lucas Nussbaum <lucas at lucas-nussbaum.net>
DM-Upload-Allowed: yes
-Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), gem2deb (>= 0.2.2), rake
+Build-Depends: debhelper (>= 7.0.50~), quilt (>= 0.46-7~), gem2deb (>= 0.2.2), rake, ruby-minitest
Standards-Version: 3.9.1
Vcs-Git: git://git.debian.org/pkg-ruby-extras/rubygems.git
Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/rubygems.git;a=summary
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 9ea25cd..044d178 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -128,6 +128,12 @@ 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 8950d0f..ff6de2d 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -15,18 +15,15 @@ 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
- 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
+ File.join('/', 'var', 'lib', 'gems', ConfigMap[:ruby_version])
end
##
@@ -63,13 +60,11 @@ module Gem
##
# The default directory for binaries
+ # Debian patch:
+ # install binaries to /usr/local/bin instead of /usr/bin
def self.default_bindir
- if defined? RUBY_FRAMEWORK_VERSION then # mac framework support
- '/usr/bin'
- else # generic install
- ConfigMap[:bindir]
- end
+ File.join('/', 'usr', 'local', 'bin')
end
##
diff --git a/lib/rubygems/source_index.rb b/lib/rubygems/source_index.rb
index 28ff326..4c1c6b4 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 b6a588b..d02e38b 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 test_self_bindir_default_dir
+ def est_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 test_self_default_dir
+ def est_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 test_self_ensure_gem_directories_write_protected
+ def est_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 test_self_ensure_gem_directories_write_protected_parents
+ def est_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 a815a72..c736b60 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 test_no_user_install
+ def est_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 8e964da..5f1913a 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 test_execute_system
+ def est_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 test_execute_system_at_latest
+ def est_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 test_execute_system_multiple
+ def est_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 test_execute_system_specific
+ def est_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 test_execute_system_specifically_to_latest_version
+ def est_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 test_execute_system_with_gems
+ def est_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 bf3e34a..68b907d 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 test_uninstall_doc_unwritable
+ def est_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 2c4ad3f..6525cec 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 test_user_install_disabled_read_only
+ def est_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 ac8bfea..9b36f12 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 test_generate_bin_script_no_perms
+ def est_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 test_generate_bin_symlink_no_perms
+ def est_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 5125ec9..d4a9d4c 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 test_download_local_read_only
+ def est_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 test_download_read_only
+ def est_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