summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-27 01:40:07 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-27 01:40:07 +0000
commit035ef0a3475943d92f813a6449a33dc07b6d4e4c (patch)
tree67116d189b67fad9406635921f7aaf088e69495d
parentb9c485aa0d6f13303e7e9ab05c6d2b2496610a35 (diff)
* lib/rubygems: Update to RubyGems 1.8.6.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--lib/rubygems.rb43
-rw-r--r--lib/rubygems/builder.rb6
-rw-r--r--lib/rubygems/command.rb6
-rw-r--r--lib/rubygems/command_manager.rb6
-rw-r--r--lib/rubygems/commands/build_command.rb6
-rw-r--r--lib/rubygems/commands/cert_command.rb6
-rw-r--r--lib/rubygems/commands/check_command.rb6
-rw-r--r--lib/rubygems/commands/cleanup_command.rb6
-rw-r--r--lib/rubygems/commands/contents_command.rb6
-rw-r--r--lib/rubygems/commands/dependency_command.rb6
-rw-r--r--lib/rubygems/commands/environment_command.rb6
-rw-r--r--lib/rubygems/commands/fetch_command.rb6
-rw-r--r--lib/rubygems/commands/generate_index_command.rb6
-rw-r--r--lib/rubygems/commands/help_command.rb6
-rw-r--r--lib/rubygems/commands/install_command.rb6
-rw-r--r--lib/rubygems/commands/list_command.rb6
-rw-r--r--lib/rubygems/commands/lock_command.rb6
-rw-r--r--lib/rubygems/commands/outdated_command.rb6
-rw-r--r--lib/rubygems/commands/owner_command.rb6
-rw-r--r--lib/rubygems/commands/pristine_command.rb6
-rw-r--r--lib/rubygems/commands/push_command.rb6
-rw-r--r--lib/rubygems/commands/query_command.rb6
-rw-r--r--lib/rubygems/commands/rdoc_command.rb6
-rw-r--r--lib/rubygems/commands/search_command.rb6
-rw-r--r--lib/rubygems/commands/server_command.rb6
-rw-r--r--lib/rubygems/commands/setup_command.rb6
-rw-r--r--lib/rubygems/commands/sources_command.rb6
-rw-r--r--lib/rubygems/commands/specification_command.rb6
-rw-r--r--lib/rubygems/commands/stale_command.rb6
-rw-r--r--lib/rubygems/commands/uninstall_command.rb6
-rw-r--r--lib/rubygems/commands/unpack_command.rb6
-rw-r--r--lib/rubygems/commands/update_command.rb6
-rw-r--r--lib/rubygems/commands/which_command.rb8
-rw-r--r--lib/rubygems/config_file.rb6
-rw-r--r--lib/rubygems/custom_require.rb6
-rw-r--r--lib/rubygems/defaults.rb6
-rw-r--r--lib/rubygems/dependency.rb6
-rw-r--r--lib/rubygems/dependency_installer.rb6
-rw-r--r--lib/rubygems/dependency_list.rb6
-rw-r--r--lib/rubygems/deprecate.rb6
-rw-r--r--lib/rubygems/doc_manager.rb6
-rw-r--r--lib/rubygems/errors.rb6
-rw-r--r--lib/rubygems/exceptions.rb6
-rw-r--r--lib/rubygems/ext.rb6
-rw-r--r--lib/rubygems/ext/builder.rb6
-rw-r--r--lib/rubygems/ext/configure_builder.rb6
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb6
-rw-r--r--lib/rubygems/ext/rake_builder.rb6
-rw-r--r--lib/rubygems/format.rb6
-rw-r--r--lib/rubygems/gem_openssl.rb6
-rw-r--r--lib/rubygems/gem_path_searcher.rb6
-rw-r--r--lib/rubygems/gem_runner.rb6
-rw-r--r--lib/rubygems/gemcutter_utilities.rb6
-rw-r--r--lib/rubygems/indexer.rb6
-rw-r--r--lib/rubygems/install_update_options.rb6
-rw-r--r--lib/rubygems/installer.rb8
-rw-r--r--lib/rubygems/installer_test_case.rb6
-rw-r--r--lib/rubygems/local_remote_options.rb6
-rw-r--r--lib/rubygems/mock_gem_ui.rb6
-rw-r--r--lib/rubygems/old_format.rb6
-rw-r--r--lib/rubygems/package.rb6
-rw-r--r--lib/rubygems/package/f_sync_dir.rb6
-rw-r--r--lib/rubygems/package/tar_header.rb6
-rw-r--r--lib/rubygems/package/tar_input.rb6
-rw-r--r--lib/rubygems/package/tar_output.rb6
-rw-r--r--lib/rubygems/package/tar_reader.rb6
-rw-r--r--lib/rubygems/package/tar_reader/entry.rb6
-rw-r--r--lib/rubygems/package/tar_test_case.rb6
-rw-r--r--lib/rubygems/package/tar_writer.rb6
-rw-r--r--lib/rubygems/package_task.rb6
-rw-r--r--lib/rubygems/path_support.rb15
-rw-r--r--lib/rubygems/platform.rb6
-rw-r--r--lib/rubygems/remote_fetcher.rb6
-rw-r--r--lib/rubygems/require_paths_builder.rb6
-rw-r--r--lib/rubygems/requirement.rb40
-rw-r--r--lib/rubygems/security.rb6
-rw-r--r--lib/rubygems/server.rb6
-rw-r--r--lib/rubygems/source_index.rb12
-rw-r--r--lib/rubygems/spec_fetcher.rb8
-rw-r--r--lib/rubygems/specification.rb6
-rw-r--r--lib/rubygems/test_case.rb6
-rw-r--r--lib/rubygems/test_utilities.rb6
-rw-r--r--lib/rubygems/text.rb6
-rw-r--r--lib/rubygems/uninstaller.rb6
-rw-r--r--lib/rubygems/user_interaction.rb14
-rw-r--r--lib/rubygems/validator.rb6
-rw-r--r--lib/rubygems/version.rb6
-rw-r--r--lib/rubygems/version_option.rb6
-rw-r--r--test/rubygems/bogussources.rb6
-rw-r--r--test/rubygems/fake_certlib/openssl.rb6
-rw-r--r--test/rubygems/fix_openssl_warnings.rb6
-rw-r--r--test/rubygems/foo/discover.rb6
-rw-r--r--test/rubygems/insure_session.rb6
-rw-r--r--test/rubygems/plugin/exception/rubygems_plugin.rb6
-rw-r--r--test/rubygems/plugin/load/rubygems_plugin.rb6
-rw-r--r--test/rubygems/plugin/standarderror/rubygems_plugin.rb6
-rw-r--r--test/rubygems/rubygems/commands/crash_command.rb6
-rw-r--r--test/rubygems/rubygems_plugin.rb6
-rw-r--r--test/rubygems/sff/discover.rb6
-rw-r--r--test/rubygems/simple_gem.rb6
-rw-r--r--test/rubygems/test_config.rb6
-rw-r--r--test/rubygems/test_gem.rb34
-rw-r--r--test/rubygems/test_gem_builder.rb6
-rw-r--r--test/rubygems/test_gem_command.rb6
-rw-r--r--test/rubygems/test_gem_command_manager.rb6
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_cert_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_check_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_cleanup_command.rb8
-rw-r--r--test/rubygems/test_gem_commands_contents_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_dependency_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_environment_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_fetch_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_generate_index_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_help_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_list_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_lock_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_outdated_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_owner_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_pristine_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_query_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_server_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_sources_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_specification_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_stale_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_unpack_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb6
-rw-r--r--test/rubygems/test_gem_commands_which_command.rb30
-rw-r--r--test/rubygems/test_gem_config_file.rb6
-rw-r--r--test/rubygems/test_gem_dependency.rb6
-rw-r--r--test/rubygems/test_gem_dependency_installer.rb6
-rw-r--r--test/rubygems/test_gem_dependency_list.rb6
-rw-r--r--test/rubygems/test_gem_doc_manager.rb6
-rw-r--r--test/rubygems/test_gem_ext_configure_builder.rb6
-rw-r--r--test/rubygems/test_gem_ext_ext_conf_builder.rb6
-rw-r--r--test/rubygems/test_gem_ext_rake_builder.rb6
-rw-r--r--test/rubygems/test_gem_format.rb6
-rw-r--r--test/rubygems/test_gem_gem_path_searcher.rb6
-rw-r--r--test/rubygems/test_gem_gem_runner.rb6
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb6
-rw-r--r--test/rubygems/test_gem_indexer.rb6
-rw-r--r--test/rubygems/test_gem_install_update_options.rb6
-rw-r--r--test/rubygems/test_gem_installer.rb24
-rw-r--r--test/rubygems/test_gem_local_remote_options.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_header.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_input.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_output.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_reader.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_reader_entry.rb6
-rw-r--r--test/rubygems/test_gem_package_tar_writer.rb6
-rw-r--r--test/rubygems/test_gem_package_task.rb6
-rw-r--r--test/rubygems/test_gem_path_support.rb15
-rw-r--r--test/rubygems/test_gem_platform.rb6
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb6
-rw-r--r--test/rubygems/test_gem_requirement.rb6
-rw-r--r--test/rubygems/test_gem_security.rb6
-rw-r--r--test/rubygems/test_gem_server.rb6
-rw-r--r--test/rubygems/test_gem_silent_ui.rb10
-rw-r--r--test/rubygems/test_gem_source_index.rb6
-rw-r--r--test/rubygems/test_gem_spec_fetcher.rb6
-rw-r--r--test/rubygems/test_gem_specification.rb6
-rw-r--r--test/rubygems/test_gem_stream_ui.rb24
-rw-r--r--test/rubygems/test_gem_text.rb6
-rw-r--r--test/rubygems/test_gem_uninstaller.rb8
-rw-r--r--test/rubygems/test_gem_validator.rb6
-rw-r--r--test/rubygems/test_gem_version.rb6
-rw-r--r--test/rubygems/test_gem_version_option.rb6
-rw-r--r--test/rubygems/test_kernel.rb6
172 files changed, 175 insertions, 1060 deletions
diff --git a/ChangeLog b/ChangeLog
index 1746ca0..ed68b5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jul 27 09:34:24 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Update to RubyGems 1.8.6.1.
+
Wed Jul 27 09:27:59 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
* test/openssl/test_pkcs12.rb: Add test and intermediate certificates.
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 25d8bc4..9316a25 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# -*- ruby -*-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
@@ -124,7 +118,7 @@ require "rubygems/deprecate"
# -The RubyGems Team
module Gem
- VERSION = '1.8.5.1'
+ VERSION = '1.8.6.1'
##
# Raised when RubyGems is unable to load or activate a gem. Contains the
@@ -426,15 +420,15 @@ module Gem
def self.each_load_path(partials)
partials.each do |gp|
base = File.basename gp
- specfn = dir.specifications.add(base + ".gemspec")
- if specfn.exist?
- spec = eval(specfn.read)
+ specfn = File.join(dir, "specifications", "#{base}.gemspec")
+ if File.exists? specfn
+ spec = eval(File.read(specfn))
spec.require_paths.each do |rp|
- yield(gp.add(rp))
+ yield File.join(gp,rp)
end
else
- filename = dir.add(gp, 'lib')
- yield(filename) if filename.exist?
+ filename = File.join(gp, 'lib')
+ yield(filename) if File.exists? filename
end
end
end
@@ -589,7 +583,7 @@ module Gem
Gem.path.each do |gemdir|
each_load_path(latest_partials(gemdir)) do |load_path|
- result << gemdir.add(load_path).expand_path
+ result << load_path
end
end
@@ -644,10 +638,23 @@ module Gem
# Loads YAML, preferring Psych
def self.load_yaml
- require 'psych'
- rescue ::LoadError
- ensure
- require 'yaml'
+ begin
+ require 'psych'
+ rescue ::LoadError
+ ensure
+ require 'yaml'
+ end
+
+ # Hack to handle syck's DefaultKey bug with psych.
+ # See the note at the top of lib/rubygems/requirement.rb for
+ # why we end up defining DefaultKey more than once.
+ if !defined? YAML::Syck
+ YAML.module_eval do
+ const_set 'Syck', Module.new {
+ const_set 'DefaultKey', Class.new
+ }
+ end
+ end
end
##
diff --git a/lib/rubygems/builder.rb b/lib/rubygems/builder.rb
index ea4e13e..a8e96dd 100644
--- a/lib/rubygems/builder.rb
+++ b/lib/rubygems/builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb
index fd6cb01..49253ef 100644
--- a/lib/rubygems/command.rb
+++ b/lib/rubygems/command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/command_manager.rb b/lib/rubygems/command_manager.rb
index 3665f31..9edd550 100644
--- a/lib/rubygems/command_manager.rb
+++ b/lib/rubygems/command_manager.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb
index cdae367..572a5c3 100644
--- a/lib/rubygems/commands/build_command.rb
+++ b/lib/rubygems/commands/build_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/builder'
diff --git a/lib/rubygems/commands/cert_command.rb b/lib/rubygems/commands/cert_command.rb
index d667f5c..b416b38 100644
--- a/lib/rubygems/commands/cert_command.rb
+++ b/lib/rubygems/commands/cert_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/security'
diff --git a/lib/rubygems/commands/check_command.rb b/lib/rubygems/commands/check_command.rb
index d739244..5a1bfd4 100644
--- a/lib/rubygems/commands/check_command.rb
+++ b/lib/rubygems/commands/check_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/version_option'
require 'rubygems/validator'
diff --git a/lib/rubygems/commands/cleanup_command.rb b/lib/rubygems/commands/cleanup_command.rb
index 2d8d8ff..49bf660 100644
--- a/lib/rubygems/commands/cleanup_command.rb
+++ b/lib/rubygems/commands/cleanup_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/dependency_list'
require 'rubygems/uninstaller'
diff --git a/lib/rubygems/commands/contents_command.rb b/lib/rubygems/commands/contents_command.rb
index 8e015ae..e483484 100644
--- a/lib/rubygems/commands/contents_command.rb
+++ b/lib/rubygems/commands/contents_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/version_option'
diff --git a/lib/rubygems/commands/dependency_command.rb b/lib/rubygems/commands/dependency_command.rb
index 209fdeb..f493d40 100644
--- a/lib/rubygems/commands/dependency_command.rb
+++ b/lib/rubygems/commands/dependency_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/local_remote_options'
require 'rubygems/version_option'
diff --git a/lib/rubygems/commands/environment_command.rb b/lib/rubygems/commands/environment_command.rb
index f6ec301..9585c71 100644
--- a/lib/rubygems/commands/environment_command.rb
+++ b/lib/rubygems/commands/environment_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
class Gem::Commands::EnvironmentCommand < Gem::Command
diff --git a/lib/rubygems/commands/fetch_command.rb b/lib/rubygems/commands/fetch_command.rb
index 7d99276..666d83e 100644
--- a/lib/rubygems/commands/fetch_command.rb
+++ b/lib/rubygems/commands/fetch_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/local_remote_options'
require 'rubygems/version_option'
diff --git a/lib/rubygems/commands/generate_index_command.rb b/lib/rubygems/commands/generate_index_command.rb
index bd074fd..d4b4790 100644
--- a/lib/rubygems/commands/generate_index_command.rb
+++ b/lib/rubygems/commands/generate_index_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/indexer'
diff --git a/lib/rubygems/commands/help_command.rb b/lib/rubygems/commands/help_command.rb
index 16921ea..20b5242 100644
--- a/lib/rubygems/commands/help_command.rb
+++ b/lib/rubygems/commands/help_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
class Gem::Commands::HelpCommand < Gem::Command
diff --git a/lib/rubygems/commands/install_command.rb b/lib/rubygems/commands/install_command.rb
index fff41cf..003ba86 100644
--- a/lib/rubygems/commands/install_command.rb
+++ b/lib/rubygems/commands/install_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/doc_manager'
require 'rubygems/install_update_options'
diff --git a/lib/rubygems/commands/list_command.rb b/lib/rubygems/commands/list_command.rb
index 267c20f..f3e5da9 100644
--- a/lib/rubygems/commands/list_command.rb
+++ b/lib/rubygems/commands/list_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/commands/query_command'
diff --git a/lib/rubygems/commands/lock_command.rb b/lib/rubygems/commands/lock_command.rb
index 9ce9da6..a6dca32 100644
--- a/lib/rubygems/commands/lock_command.rb
+++ b/lib/rubygems/commands/lock_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
class Gem::Commands::LockCommand < Gem::Command
diff --git a/lib/rubygems/commands/outdated_command.rb b/lib/rubygems/commands/outdated_command.rb
index 8b7dda6..ea6b9f0 100644
--- a/lib/rubygems/commands/outdated_command.rb
+++ b/lib/rubygems/commands/outdated_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/local_remote_options'
require 'rubygems/spec_fetcher'
diff --git a/lib/rubygems/commands/owner_command.rb b/lib/rubygems/commands/owner_command.rb
index 34f4efa..6ebf9aa 100644
--- a/lib/rubygems/commands/owner_command.rb
+++ b/lib/rubygems/commands/owner_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/local_remote_options'
require 'rubygems/gemcutter_utilities'
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb
index 9972275..272a4dd 100644
--- a/lib/rubygems/commands/pristine_command.rb
+++ b/lib/rubygems/commands/pristine_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/format'
require 'rubygems/installer'
diff --git a/lib/rubygems/commands/push_command.rb b/lib/rubygems/commands/push_command.rb
index c85a259..a7663ed 100644
--- a/lib/rubygems/commands/push_command.rb
+++ b/lib/rubygems/commands/push_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/local_remote_options'
require 'rubygems/gemcutter_utilities'
diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb
index d82f8ae..1033b83 100644
--- a/lib/rubygems/commands/query_command.rb
+++ b/lib/rubygems/commands/query_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/local_remote_options'
require 'rubygems/spec_fetcher'
diff --git a/lib/rubygems/commands/rdoc_command.rb b/lib/rubygems/commands/rdoc_command.rb
index d7912fd..ea0f3ad 100644
--- a/lib/rubygems/commands/rdoc_command.rb
+++ b/lib/rubygems/commands/rdoc_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/version_option'
require 'rubygems/doc_manager'
diff --git a/lib/rubygems/commands/search_command.rb b/lib/rubygems/commands/search_command.rb
index 1d1c194..52e96fd 100644
--- a/lib/rubygems/commands/search_command.rb
+++ b/lib/rubygems/commands/search_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/commands/query_command'
diff --git a/lib/rubygems/commands/server_command.rb b/lib/rubygems/commands/server_command.rb
index c59f216..b65d48c 100644
--- a/lib/rubygems/commands/server_command.rb
+++ b/lib/rubygems/commands/server_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/server'
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index 6aa8005..97880bc 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
##
diff --git a/lib/rubygems/commands/sources_command.rb b/lib/rubygems/commands/sources_command.rb
index 437fa57..ac14313 100644
--- a/lib/rubygems/commands/sources_command.rb
+++ b/lib/rubygems/commands/sources_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/remote_fetcher'
require 'rubygems/spec_fetcher'
diff --git a/lib/rubygems/commands/specification_command.rb b/lib/rubygems/commands/specification_command.rb
index e4036ae..921fd51 100644
--- a/lib/rubygems/commands/specification_command.rb
+++ b/lib/rubygems/commands/specification_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/local_remote_options'
require 'rubygems/version_option'
diff --git a/lib/rubygems/commands/stale_command.rb b/lib/rubygems/commands/stale_command.rb
index 712e62a..36c517e 100644
--- a/lib/rubygems/commands/stale_command.rb
+++ b/lib/rubygems/commands/stale_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
class Gem::Commands::StaleCommand < Gem::Command
diff --git a/lib/rubygems/commands/uninstall_command.rb b/lib/rubygems/commands/uninstall_command.rb
index d190777..61e55f1 100644
--- a/lib/rubygems/commands/uninstall_command.rb
+++ b/lib/rubygems/commands/uninstall_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/version_option'
require 'rubygems/uninstaller'
diff --git a/lib/rubygems/commands/unpack_command.rb b/lib/rubygems/commands/unpack_command.rb
index b0fa2bf..64b8ad6 100644
--- a/lib/rubygems/commands/unpack_command.rb
+++ b/lib/rubygems/commands/unpack_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/installer'
require 'rubygems/version_option'
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 2d7da44..d63b943 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
require 'rubygems/command_manager'
require 'rubygems/install_update_options'
diff --git a/lib/rubygems/commands/which_command.rb b/lib/rubygems/commands/which_command.rb
index 2962491..6495278 100644
--- a/lib/rubygems/commands/which_command.rb
+++ b/lib/rubygems/commands/which_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command'
class Gem::Commands::WhichCommand < Gem::Command
@@ -66,7 +60,7 @@ class Gem::Commands::WhichCommand < Gem::Command
dirs.each do |dir|
Gem.suffixes.each do |ext|
full_path = File.join dir, "#{package_name}#{ext}"
- if File.exist? full_path then
+ if File.exist? full_path and not File.directory? full_path then
result << full_path
return result unless options[:show_all]
end
diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb
index d005755..a4237e1 100644
--- a/lib/rubygems/config_file.rb
+++ b/lib/rubygems/config_file.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/custom_require.rb b/lib/rubygems/custom_require.rb
index f32d100..641db84 100644
--- a/lib/rubygems/custom_require.rb
+++ b/lib/rubygems/custom_require.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index 714dc4f..20b4198 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
module Gem
# TODO: move this whole file back into rubygems.rb
diff --git a/lib/rubygems/dependency.rb b/lib/rubygems/dependency.rb
index 1261154..1e16636 100644
--- a/lib/rubygems/dependency.rb
+++ b/lib/rubygems/dependency.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require "rubygems/requirement"
##
diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb
index 29e8b21..6303e8e 100644
--- a/lib/rubygems/dependency_installer.rb
+++ b/lib/rubygems/dependency_installer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems'
require 'rubygems/dependency_list'
require 'rubygems/installer'
diff --git a/lib/rubygems/dependency_list.rb b/lib/rubygems/dependency_list.rb
index 232f83c..d54b659 100644
--- a/lib/rubygems/dependency_list.rb
+++ b/lib/rubygems/dependency_list.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/deprecate.rb b/lib/rubygems/deprecate.rb
index 948538d..4827a05 100644
--- a/lib/rubygems/deprecate.rb
+++ b/lib/rubygems/deprecate.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
##
# Provides a single method +deprecate+ to be used to declare when
# something is going away.
diff --git a/lib/rubygems/doc_manager.rb b/lib/rubygems/doc_manager.rb
index 20c5281..826f57d 100644
--- a/lib/rubygems/doc_manager.rb
+++ b/lib/rubygems/doc_manager.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/errors.rb b/lib/rubygems/errors.rb
index 878a8a4..950b34d 100644
--- a/lib/rubygems/errors.rb
+++ b/lib/rubygems/errors.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
class Gem::ErrorReason; end
# Generated when trying to lookup a gem to indicate that the gem
diff --git a/lib/rubygems/exceptions.rb b/lib/rubygems/exceptions.rb
index 7668d4e..55d67f9 100644
--- a/lib/rubygems/exceptions.rb
+++ b/lib/rubygems/exceptions.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
##
# Base exception class for RubyGems. All exception raised by RubyGems are a
# subclass of this one.
diff --git a/lib/rubygems/ext.rb b/lib/rubygems/ext.rb
index 8cce7a0..97ee762 100644
--- a/lib/rubygems/ext.rb
+++ b/lib/rubygems/ext.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb
index 2a147d5..5e51896 100644
--- a/lib/rubygems/ext/builder.rb
+++ b/lib/rubygems/ext/builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/ext/configure_builder.rb b/lib/rubygems/ext/configure_builder.rb
index 6605057..c2087eb 100644
--- a/lib/rubygems/ext/configure_builder.rb
+++ b/lib/rubygems/ext/configure_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/ext/ext_conf_builder.rb b/lib/rubygems/ext/ext_conf_builder.rb
index ec3275d..b3d588d 100644
--- a/lib/rubygems/ext/ext_conf_builder.rb
+++ b/lib/rubygems/ext/ext_conf_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/ext/rake_builder.rb b/lib/rubygems/ext/rake_builder.rb
index 6b7086c..a1df694 100644
--- a/lib/rubygems/ext/rake_builder.rb
+++ b/lib/rubygems/ext/rake_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/format.rb b/lib/rubygems/format.rb
index 95388b4..246c599 100644
--- a/lib/rubygems/format.rb
+++ b/lib/rubygems/format.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/gem_openssl.rb b/lib/rubygems/gem_openssl.rb
index 5c33cac..9d5fa4a 100644
--- a/lib/rubygems/gem_openssl.rb
+++ b/lib/rubygems/gem_openssl.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/gem_path_searcher.rb b/lib/rubygems/gem_path_searcher.rb
index 36a86de..1d67d75 100644
--- a/lib/rubygems/gem_path_searcher.rb
+++ b/lib/rubygems/gem_path_searcher.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require "rubygems"
require "rubygems/deprecate"
diff --git a/lib/rubygems/gem_runner.rb b/lib/rubygems/gem_runner.rb
index 6b5aef3..6197036 100644
--- a/lib/rubygems/gem_runner.rb
+++ b/lib/rubygems/gem_runner.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/gemcutter_utilities.rb b/lib/rubygems/gemcutter_utilities.rb
index 9dce97c..c0e7ee9 100644
--- a/lib/rubygems/gemcutter_utilities.rb
+++ b/lib/rubygems/gemcutter_utilities.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/remote_fetcher'
module Gem::GemcutterUtilities
diff --git a/lib/rubygems/indexer.rb b/lib/rubygems/indexer.rb
index c367532..23c0167 100644
--- a/lib/rubygems/indexer.rb
+++ b/lib/rubygems/indexer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems'
require 'rubygems/format'
require 'time'
diff --git a/lib/rubygems/install_update_options.rb b/lib/rubygems/install_update_options.rb
index 5073be0..3ee6432 100644
--- a/lib/rubygems/install_update_options.rb
+++ b/lib/rubygems/install_update_options.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 7ef96dd..338b926 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
@@ -439,7 +433,7 @@ class Gem::Installer
end
def check_that_user_bin_dir_is_in_path
- user_bin_dir = File.join gem_home, "bin"
+ user_bin_dir = @bin_dir || Gem.bindir(gem_home)
unless ENV['PATH'].split(File::PATH_SEPARATOR).include? user_bin_dir then
unless self.class.path_warning then
alert_warning "You don't have #{user_bin_dir} in your PATH,\n\t gem executables will not run."
diff --git a/lib/rubygems/installer_test_case.rb b/lib/rubygems/installer_test_case.rb
index a548bd5..7c7b3b9 100644
--- a/lib/rubygems/installer_test_case.rb
+++ b/lib/rubygems/installer_test_case.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/installer'
diff --git a/lib/rubygems/local_remote_options.rb b/lib/rubygems/local_remote_options.rb
index 77a8006..a1e106d 100644
--- a/lib/rubygems/local_remote_options.rb
+++ b/lib/rubygems/local_remote_options.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/mock_gem_ui.rb b/lib/rubygems/mock_gem_ui.rb
index 88c3662..13f0bf5 100644
--- a/lib/rubygems/mock_gem_ui.rb
+++ b/lib/rubygems/mock_gem_ui.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'stringio'
require 'rubygems/user_interaction'
diff --git a/lib/rubygems/old_format.rb b/lib/rubygems/old_format.rb
index 73d3615..a44fd53 100644
--- a/lib/rubygems/old_format.rb
+++ b/lib/rubygems/old_format.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb
index 2e108bf..2b50c58 100644
--- a/lib/rubygems/package.rb
+++ b/lib/rubygems/package.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# -*- coding: utf-8 -*-
#--
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
diff --git a/lib/rubygems/package/f_sync_dir.rb b/lib/rubygems/package/f_sync_dir.rb
index a819939..f7eb7f3 100644
--- a/lib/rubygems/package/f_sync_dir.rb
+++ b/lib/rubygems/package/f_sync_dir.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# -*- coding: utf-8 -*-
#--
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
diff --git a/lib/rubygems/package/tar_header.rb b/lib/rubygems/package/tar_header.rb
index 431f8f3..4f923b9 100644
--- a/lib/rubygems/package/tar_header.rb
+++ b/lib/rubygems/package/tar_header.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# -*- coding: utf-8 -*-
#--
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
diff --git a/lib/rubygems/package/tar_input.rb b/lib/rubygems/package/tar_input.rb
index 92c190c..26b4e81 100644
--- a/lib/rubygems/package/tar_input.rb
+++ b/lib/rubygems/package/tar_input.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# -*- coding: iso-8859-1 -*-
#++
# Copyright (C) 2004 Mauricio Julio Fernndez Pradier
diff --git a/lib/rubygems/package/tar_output.rb b/lib/rubygems/package/tar_output.rb
index bf785bc..fdc8f4f 100644
--- a/lib/rubygems/package/tar_output.rb
+++ b/lib/rubygems/package/tar_output.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# -*- coding: utf-8 -*-
#--
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
diff --git a/lib/rubygems/package/tar_reader.rb b/lib/rubygems/package/tar_reader.rb
index 0e92221..e6a71d3 100644
--- a/lib/rubygems/package/tar_reader.rb
+++ b/lib/rubygems/package/tar_reader.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# -*- coding: utf-8 -*-
#--
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
diff --git a/lib/rubygems/package/tar_reader/entry.rb b/lib/rubygems/package/tar_reader/entry.rb
index d7b5280..7034e59 100644
--- a/lib/rubygems/package/tar_reader/entry.rb
+++ b/lib/rubygems/package/tar_reader/entry.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# -*- coding: utf-8 -*-
#++
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
diff --git a/lib/rubygems/package/tar_test_case.rb b/lib/rubygems/package/tar_test_case.rb
index 5970756..4601f13 100644
--- a/lib/rubygems/package/tar_test_case.rb
+++ b/lib/rubygems/package/tar_test_case.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/package'
diff --git a/lib/rubygems/package/tar_writer.rb b/lib/rubygems/package/tar_writer.rb
index 823f20c..a73b5e5 100644
--- a/lib/rubygems/package/tar_writer.rb
+++ b/lib/rubygems/package/tar_writer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# -*- coding: utf-8 -*-
#--
# Copyright (C) 2004 Mauricio Julio Fernández Pradier
diff --git a/lib/rubygems/package_task.rb b/lib/rubygems/package_task.rb
index 5b6b381..fe32a03 100644
--- a/lib/rubygems/package_task.rb
+++ b/lib/rubygems/package_task.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
# Copyright (c) 2003, 2004 Jim Weirich, 2009 Eric Hodel
#
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/lib/rubygems/path_support.rb b/lib/rubygems/path_support.rb
index 0809f8a..059e372 100644
--- a/lib/rubygems/path_support.rb
+++ b/lib/rubygems/path_support.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
##
#
# Gem::PathSupport facilitates the GEM_HOME and GEM_PATH environment settings
@@ -28,6 +22,11 @@ class Gem::PathSupport
# note 'env' vs 'ENV'...
@home = env["GEM_HOME"] || ENV["GEM_HOME"] || Gem.default_dir
+
+ if File::ALT_SEPARATOR then
+ @home = @home.gsub(File::ALT_SEPARATOR, File::SEPARATOR)
+ end
+
self.path = env["GEM_PATH"] || ENV["GEM_PATH"]
end
@@ -68,8 +67,8 @@ class Gem::PathSupport
else
gem_path = Gem.default_path + [@home]
- if defined?(Gem::APPLE_GEM_HOME)
- gem_path << Gem::APPLE_GEM_HOME
+ if defined?(APPLE_GEM_HOME)
+ gem_path << APPLE_GEM_HOME
end
end
diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb
index cf6db7c..4b5b6ef 100644
--- a/lib/rubygems/platform.rb
+++ b/lib/rubygems/platform.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require "rubygems/deprecate"
##
diff --git a/lib/rubygems/remote_fetcher.rb b/lib/rubygems/remote_fetcher.rb
index 4613bff..ba546ca 100644
--- a/lib/rubygems/remote_fetcher.rb
+++ b/lib/rubygems/remote_fetcher.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems'
require 'rubygems/user_interaction'
require 'uri'
diff --git a/lib/rubygems/require_paths_builder.rb b/lib/rubygems/require_paths_builder.rb
index 2ccfb32..23e9746 100644
--- a/lib/rubygems/require_paths_builder.rb
+++ b/lib/rubygems/require_paths_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems'
# TODO: remove after 1.9.1 dropped
diff --git a/lib/rubygems/requirement.rb b/lib/rubygems/requirement.rb
index f7bda10..3809dfa 100644
--- a/lib/rubygems/requirement.rb
+++ b/lib/rubygems/requirement.rb
@@ -1,11 +1,24 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require "rubygems/version"
+# Hack to handle syck's DefaultKey bug with psych
+#
+# Quick note! If/when psych loads in 1.9, it will redefine
+# YAML to point to Psych by removing the YAML constant.
+# Thusly, over in Gem.load_yaml, we define DefaultKey again
+# after proper yaml library has been loaded.
+#
+# All this is so that there is always a YAML::Syck::DefaultKey
+# class no matter if the full yaml library has loaded or not.
+#
+module YAML
+ if !defined? Syck
+ module Syck
+ class DefaultKey
+ end
+ end
+ end
+end
+
##
# A Requirement is a set of one or more version restrictions. It supports a
# few (<tt>=, !=, >, <, >=, <=, ~></tt>) different restriction operators.
@@ -116,11 +129,15 @@ class Gem::Requirement
end
def marshal_dump # :nodoc:
+ fix_syck_default_key_in_requirements
+
[@requirements]
end
def marshal_load array # :nodoc:
@requirements = array[0]
+
+ fix_syck_default_key_in_requirements
end
def prerelease?
@@ -160,6 +177,17 @@ class Gem::Requirement
def <=> other # :nodoc:
to_s <=> other.to_s
end
+
+ private
+
+ def fix_syck_default_key_in_requirements
+ # Fixup the Syck DefaultKey bug
+ @requirements.each do |r|
+ if r[0].kind_of? YAML::Syck::DefaultKey
+ r[0] = "="
+ end
+ end
+ end
end
# :stopdoc:
diff --git a/lib/rubygems/security.rb b/lib/rubygems/security.rb
index 2709279..f51da65 100644
--- a/lib/rubygems/security.rb
+++ b/lib/rubygems/security.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/server.rb b/lib/rubygems/server.rb
index 95ca292..9c49d1f 100644
--- a/lib/rubygems/server.rb
+++ b/lib/rubygems/server.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'webrick'
require 'zlib'
require 'erb'
diff --git a/lib/rubygems/source_index.rb b/lib/rubygems/source_index.rb
index 74ad547..7ddbc23 100644
--- a/lib/rubygems/source_index.rb
+++ b/lib/rubygems/source_index.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
@@ -199,8 +193,10 @@ class Gem::SourceIndex
# Add gem specifications to the source index.
def add_specs(*gem_specs)
- gem_specs.each do |spec|
- add_spec spec
+ Deprecate.skip_during do
+ gem_specs.each do |spec|
+ add_spec spec
+ end
end
end
diff --git a/lib/rubygems/spec_fetcher.rb b/lib/rubygems/spec_fetcher.rb
index 3823dbd..ad61267 100644
--- a/lib/rubygems/spec_fetcher.rb
+++ b/lib/rubygems/spec_fetcher.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/remote_fetcher'
require 'rubygems/user_interaction'
require 'rubygems/errors'
@@ -173,7 +167,7 @@ class Gem::SpecFetcher
found.each do |source_uri, specs|
uri_str = source_uri.to_s
- specs_and_sources.push(*specs.map { |spec| [spec, uri_str] })
+ specs_and_sources.concat(specs.map { |spec| [spec, uri_str] })
end
[specs_and_sources, errors]
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 5992074..44e31dc 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index 7923fac..6ab5095 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
at_exit { $SAFE = 1 }
if defined? Gem::QuickLoader
diff --git a/lib/rubygems/test_utilities.rb b/lib/rubygems/test_utilities.rb
index 1e43fe5..69ff60d 100644
--- a/lib/rubygems/test_utilities.rb
+++ b/lib/rubygems/test_utilities.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'tempfile'
require 'rubygems'
require 'rubygems/remote_fetcher'
diff --git a/lib/rubygems/text.rb b/lib/rubygems/text.rb
index a4642f9..793cd95 100644
--- a/lib/rubygems/text.rb
+++ b/lib/rubygems/text.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems'
##
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb
index 1e370c3..8940980 100644
--- a/lib/rubygems/uninstaller.rb
+++ b/lib/rubygems/uninstaller.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/user_interaction.rb b/lib/rubygems/user_interaction.rb
index c6665c1..df51326 100644
--- a/lib/rubygems/user_interaction.rb
+++ b/lib/rubygems/user_interaction.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
@@ -142,8 +136,12 @@ class Gem::StreamUI
end
def tty?
- @usetty && @ins.tty?
- end
+ if RUBY_VERSION > '1.9.3' and RUBY_PLATFORM =~ /mingw|mswin/ then
+ @usetty
+ else
+ @usetty && @ins.tty?
+ end
+ end
##
# Choose from a list of options. +question+ is a prompt displayed above
diff --git a/lib/rubygems/validator.rb b/lib/rubygems/validator.rb
index bc6c520..ffeed88 100644
--- a/lib/rubygems/validator.rb
+++ b/lib/rubygems/validator.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb
index 03eaf3b..62af344 100644
--- a/lib/rubygems/version.rb
+++ b/lib/rubygems/version.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
##
# The Version class processes string versions into comparable
# values. A version string should normally be a series of numbers
diff --git a/lib/rubygems/version_option.rb b/lib/rubygems/version_option.rb
index 79da8f4..a3de4dc 100644
--- a/lib/rubygems/version_option.rb
+++ b/lib/rubygems/version_option.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/test/rubygems/bogussources.rb b/test/rubygems/bogussources.rb
index fe12541..008e3a1 100644
--- a/test/rubygems/bogussources.rb
+++ b/test/rubygems/bogussources.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/test/rubygems/fake_certlib/openssl.rb b/test/rubygems/fake_certlib/openssl.rb
index aaf4873..9de90c0 100644
--- a/test/rubygems/fake_certlib/openssl.rb
+++ b/test/rubygems/fake_certlib/openssl.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
diff --git a/test/rubygems/fix_openssl_warnings.rb b/test/rubygems/fix_openssl_warnings.rb
index 313c636..66d6cdf 100644
--- a/test/rubygems/fix_openssl_warnings.rb
+++ b/test/rubygems/fix_openssl_warnings.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
##
# HACK: this drives me BONKERS
diff --git a/test/rubygems/foo/discover.rb b/test/rubygems/foo/discover.rb
index 284a221..e69de29 100644
--- a/test/rubygems/foo/discover.rb
+++ b/test/rubygems/foo/discover.rb
@@ -1,6 +0,0 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
diff --git a/test/rubygems/insure_session.rb b/test/rubygems/insure_session.rb
index 508450b..8a6df89 100644
--- a/test/rubygems/insure_session.rb
+++ b/test/rubygems/insure_session.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems'
def install_session
diff --git a/test/rubygems/plugin/exception/rubygems_plugin.rb b/test/rubygems/plugin/exception/rubygems_plugin.rb
index ef019a7..affa72f 100644
--- a/test/rubygems/plugin/exception/rubygems_plugin.rb
+++ b/test/rubygems/plugin/exception/rubygems_plugin.rb
@@ -1,8 +1,2 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
TestGem::TEST_PLUGIN_EXCEPTION = :loaded
raise Exception.new('boom') \ No newline at end of file
diff --git a/test/rubygems/plugin/load/rubygems_plugin.rb b/test/rubygems/plugin/load/rubygems_plugin.rb
index 9b37ce0..c7c7277 100644
--- a/test/rubygems/plugin/load/rubygems_plugin.rb
+++ b/test/rubygems/plugin/load/rubygems_plugin.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
class TestGem
TEST_PLUGIN_LOAD = :loaded
end
diff --git a/test/rubygems/plugin/standarderror/rubygems_plugin.rb b/test/rubygems/plugin/standarderror/rubygems_plugin.rb
index 44efaef..d36849f 100644
--- a/test/rubygems/plugin/standarderror/rubygems_plugin.rb
+++ b/test/rubygems/plugin/standarderror/rubygems_plugin.rb
@@ -1,8 +1,2 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
TestGem::TEST_PLUGIN_STANDARDERROR = :loaded
raise StandardError.new('boom') \ No newline at end of file
diff --git a/test/rubygems/rubygems/commands/crash_command.rb b/test/rubygems/rubygems/commands/crash_command.rb
index b34ac8e..e77b3fc 100644
--- a/test/rubygems/rubygems/commands/crash_command.rb
+++ b/test/rubygems/rubygems/commands/crash_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
class Gem::Commands::CrashCommand < Gem::Command
raise "crash"
diff --git a/test/rubygems/rubygems_plugin.rb b/test/rubygems/rubygems_plugin.rb
index e8c36a4..6c08f97 100644
--- a/test/rubygems/rubygems_plugin.rb
+++ b/test/rubygems/rubygems_plugin.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/command_manager'
##
diff --git a/test/rubygems/sff/discover.rb b/test/rubygems/sff/discover.rb
index 284a221..e69de29 100644
--- a/test/rubygems/sff/discover.rb
+++ b/test/rubygems/sff/discover.rb
@@ -1,6 +0,0 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
diff --git a/test/rubygems/simple_gem.rb b/test/rubygems/simple_gem.rb
index 8253e4b..d7c0356 100644
--- a/test/rubygems/simple_gem.rb
+++ b/test/rubygems/simple_gem.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
SIMPLE_GEM = <<-GEMDATA
MD5SUM = "989bf34a1cbecd52e0ea66b662b3a405"
if $0 == __FILE__
diff --git a/test/rubygems/test_config.rb b/test/rubygems/test_config.rb
index 190b609..fae1a6f 100644
--- a/test/rubygems/test_config.rb
+++ b/test/rubygems/test_config.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 88d8270..20f2a93 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
require 'rubygems/gem_openssl'
@@ -718,7 +712,7 @@ class TestGem < Gem::TestCase
def test_self_path_default
util_path
- if defined? APPLE_GEM_HOME
+ if defined?(APPLE_GEM_HOME)
orig_APPLE_GEM_HOME = APPLE_GEM_HOME
Object.send :remove_const, :APPLE_GEM_HOME
end
@@ -727,7 +721,7 @@ class TestGem < Gem::TestCase
assert_equal [Gem.default_path, Gem.dir].flatten.uniq, Gem.path
ensure
- Object.const_set :APPLE_GEM_HOME, orig_APPLE_GEM_HOME
+ Object.const_set :APPLE_GEM_HOME, orig_APPLE_GEM_HOME if orig_APPLE_GEM_HOME
end
unless win_platform?
@@ -736,11 +730,14 @@ class TestGem < Gem::TestCase
Gem.clear_paths
apple_gem_home = File.join @tempdir, 'apple_gem_home'
- Gem.const_set :APPLE_GEM_HOME, apple_gem_home
+
+ old, $-w = $-w, nil
+ Object.const_set :APPLE_GEM_HOME, apple_gem_home
+ $-w = old
assert_includes Gem.path, apple_gem_home
ensure
- Gem.send :remove_const, :APPLE_GEM_HOME
+ Object.send :remove_const, :APPLE_GEM_HOME
end
def test_self_path_APPLE_GEM_HOME_GEM_PATH
@@ -1074,6 +1071,23 @@ class TestGem < Gem::TestCase
assert_equal :loaded, TEST_PLUGIN_EXCEPTION rescue nil
end
+ def test_latest_load_paths
+ spec = quick_spec 'a', '4' do |s|
+ s.require_paths = ["lib"]
+ end
+
+ install_gem spec
+
+ # @exec_path = File.join spec.full_gem_path, spec.bindir, 'exec'
+ # @abin_path = File.join spec.full_gem_path, spec.bindir, 'abin'
+ # FileUtils.mkdir_p File.join(stem, "gems", "test-3")
+
+ Deprecate.skip_during do
+ expected = [File.join(@gemhome, "gems", "a-4", "lib")]
+ assert_equal expected, Gem.latest_load_paths
+ end
+ end
+
def with_plugin(path)
test_plugin_path = File.expand_path("test/rubygems/plugin/#{path}",
@@project_dir)
diff --git a/test/rubygems/test_gem_builder.rb b/test/rubygems/test_gem_builder.rb
index 5895b5f..0b4b972 100644
--- a/test/rubygems/test_gem_builder.rb
+++ b/test/rubygems/test_gem_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/builder'
require 'rubygems/package'
diff --git a/test/rubygems/test_gem_command.rb b/test/rubygems/test_gem_command.rb
index f79b138..0376408 100644
--- a/test/rubygems/test_gem_command.rb
+++ b/test/rubygems/test_gem_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/command'
diff --git a/test/rubygems/test_gem_command_manager.rb b/test/rubygems/test_gem_command_manager.rb
index 54b26e1..6cb253d 100644
--- a/test/rubygems/test_gem_command_manager.rb
+++ b/test/rubygems/test_gem_command_manager.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/command_manager'
diff --git a/test/rubygems/test_gem_commands_build_command.rb b/test/rubygems/test_gem_commands_build_command.rb
index d4d7c29..55f5df6 100644
--- a/test/rubygems/test_gem_commands_build_command.rb
+++ b/test/rubygems/test_gem_commands_build_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/build_command'
require 'rubygems/format'
diff --git a/test/rubygems/test_gem_commands_cert_command.rb b/test/rubygems/test_gem_commands_cert_command.rb
index a514ea4..609fae8 100644
--- a/test/rubygems/test_gem_commands_cert_command.rb
+++ b/test/rubygems/test_gem_commands_cert_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/cert_command'
require 'rubygems/fix_openssl_warnings' if RUBY_VERSION < "1.9"
diff --git a/test/rubygems/test_gem_commands_check_command.rb b/test/rubygems/test_gem_commands_check_command.rb
index 688210d..a71c1eb 100644
--- a/test/rubygems/test_gem_commands_check_command.rb
+++ b/test/rubygems/test_gem_commands_check_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/check_command'
diff --git a/test/rubygems/test_gem_commands_cleanup_command.rb b/test/rubygems/test_gem_commands_cleanup_command.rb
index f2ed773..22bbfb7 100644
--- a/test/rubygems/test_gem_commands_cleanup_command.rb
+++ b/test/rubygems/test_gem_commands_cleanup_command.rb
@@ -1,14 +1,8 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/cleanup_command'
class TestGemCommandsCleanupCommand < Gem::TestCase
-
+
def setup
super
diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb
index cf927e7..9995bed 100644
--- a/test/rubygems/test_gem_commands_contents_command.rb
+++ b/test/rubygems/test_gem_commands_contents_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/contents_command'
diff --git a/test/rubygems/test_gem_commands_dependency_command.rb b/test/rubygems/test_gem_commands_dependency_command.rb
index d3f2b68..4c559e2 100644
--- a/test/rubygems/test_gem_commands_dependency_command.rb
+++ b/test/rubygems/test_gem_commands_dependency_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/dependency_command'
diff --git a/test/rubygems/test_gem_commands_environment_command.rb b/test/rubygems/test_gem_commands_environment_command.rb
index 504a122..439057d 100644
--- a/test/rubygems/test_gem_commands_environment_command.rb
+++ b/test/rubygems/test_gem_commands_environment_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/environment_command'
diff --git a/test/rubygems/test_gem_commands_fetch_command.rb b/test/rubygems/test_gem_commands_fetch_command.rb
index 926e9e9..f4fee79 100644
--- a/test/rubygems/test_gem_commands_fetch_command.rb
+++ b/test/rubygems/test_gem_commands_fetch_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/package'
require 'rubygems/security'
diff --git a/test/rubygems/test_gem_commands_generate_index_command.rb b/test/rubygems/test_gem_commands_generate_index_command.rb
index b9eb139..ee4cd80 100644
--- a/test/rubygems/test_gem_commands_generate_index_command.rb
+++ b/test/rubygems/test_gem_commands_generate_index_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/indexer'
require 'rubygems/commands/generate_index_command'
diff --git a/test/rubygems/test_gem_commands_help_command.rb b/test/rubygems/test_gem_commands_help_command.rb
index acfc2da..d626b14 100644
--- a/test/rubygems/test_gem_commands_help_command.rb
+++ b/test/rubygems/test_gem_commands_help_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require "rubygems"
require "rubygems/test_case"
require "rubygems/commands/help_command"
diff --git a/test/rubygems/test_gem_commands_install_command.rb b/test/rubygems/test_gem_commands_install_command.rb
index 522731b..bd61db5 100644
--- a/test/rubygems/test_gem_commands_install_command.rb
+++ b/test/rubygems/test_gem_commands_install_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/install_command'
diff --git a/test/rubygems/test_gem_commands_list_command.rb b/test/rubygems/test_gem_commands_list_command.rb
index 1339737..05afbc6 100644
--- a/test/rubygems/test_gem_commands_list_command.rb
+++ b/test/rubygems/test_gem_commands_list_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/list_command'
diff --git a/test/rubygems/test_gem_commands_lock_command.rb b/test/rubygems/test_gem_commands_lock_command.rb
index bb31346..8f30b7f 100644
--- a/test/rubygems/test_gem_commands_lock_command.rb
+++ b/test/rubygems/test_gem_commands_lock_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/lock_command'
diff --git a/test/rubygems/test_gem_commands_outdated_command.rb b/test/rubygems/test_gem_commands_outdated_command.rb
index ae15efe..72696d6 100644
--- a/test/rubygems/test_gem_commands_outdated_command.rb
+++ b/test/rubygems/test_gem_commands_outdated_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/outdated_command'
diff --git a/test/rubygems/test_gem_commands_owner_command.rb b/test/rubygems/test_gem_commands_owner_command.rb
index a07c309..65fe09e 100644
--- a/test/rubygems/test_gem_commands_owner_command.rb
+++ b/test/rubygems/test_gem_commands_owner_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/owner_command'
diff --git a/test/rubygems/test_gem_commands_pristine_command.rb b/test/rubygems/test_gem_commands_pristine_command.rb
index aa1f3bf..6bf6d5a 100644
--- a/test/rubygems/test_gem_commands_pristine_command.rb
+++ b/test/rubygems/test_gem_commands_pristine_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/pristine_command'
diff --git a/test/rubygems/test_gem_commands_push_command.rb b/test/rubygems/test_gem_commands_push_command.rb
index 7aa7109..13a107a 100644
--- a/test/rubygems/test_gem_commands_push_command.rb
+++ b/test/rubygems/test_gem_commands_push_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/push_command'
diff --git a/test/rubygems/test_gem_commands_query_command.rb b/test/rubygems/test_gem_commands_query_command.rb
index 4f06968..e718c0b 100644
--- a/test/rubygems/test_gem_commands_query_command.rb
+++ b/test/rubygems/test_gem_commands_query_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/query_command'
diff --git a/test/rubygems/test_gem_commands_server_command.rb b/test/rubygems/test_gem_commands_server_command.rb
index e27cc94..db27a4c 100644
--- a/test/rubygems/test_gem_commands_server_command.rb
+++ b/test/rubygems/test_gem_commands_server_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/server_command'
diff --git a/test/rubygems/test_gem_commands_sources_command.rb b/test/rubygems/test_gem_commands_sources_command.rb
index 7dea797..3d06940 100644
--- a/test/rubygems/test_gem_commands_sources_command.rb
+++ b/test/rubygems/test_gem_commands_sources_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/sources_command'
diff --git a/test/rubygems/test_gem_commands_specification_command.rb b/test/rubygems/test_gem_commands_specification_command.rb
index 512b9f5..735ceba 100644
--- a/test/rubygems/test_gem_commands_specification_command.rb
+++ b/test/rubygems/test_gem_commands_specification_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/specification_command'
diff --git a/test/rubygems/test_gem_commands_stale_command.rb b/test/rubygems/test_gem_commands_stale_command.rb
index 05cc9d2..74f730b 100644
--- a/test/rubygems/test_gem_commands_stale_command.rb
+++ b/test/rubygems/test_gem_commands_stale_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/stale_command'
diff --git a/test/rubygems/test_gem_commands_uninstall_command.rb b/test/rubygems/test_gem_commands_uninstall_command.rb
index 47f4960..a2c11b7 100644
--- a/test/rubygems/test_gem_commands_uninstall_command.rb
+++ b/test/rubygems/test_gem_commands_uninstall_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/installer_test_case'
require 'rubygems/commands/uninstall_command'
diff --git a/test/rubygems/test_gem_commands_unpack_command.rb b/test/rubygems/test_gem_commands_unpack_command.rb
index 3f07227..cd8716b 100644
--- a/test/rubygems/test_gem_commands_unpack_command.rb
+++ b/test/rubygems/test_gem_commands_unpack_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/unpack_command'
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index b43be11..b283d48 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/update_command'
diff --git a/test/rubygems/test_gem_commands_which_command.rb b/test/rubygems/test_gem_commands_which_command.rb
index 5e42deb..4985395 100644
--- a/test/rubygems/test_gem_commands_which_command.rb
+++ b/test/rubygems/test_gem_commands_which_command.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/commands/which_command'
@@ -28,24 +22,38 @@ class TestGemCommandsWhichCommand < Gem::TestCase
assert_equal '', @ui.error
end
+ def test_execute_directory
+ @cmd.handle_options %w[directory]
+
+ use_ui @ui do
+ assert_raises Gem::MockGemUi::TermError do
+ @cmd.execute
+ end
+ end
+
+ assert_equal '', @ui.output
+ assert_match %r%Can.t find ruby library file or shared library directory\n%,
+ @ui.error
+ end
+
def test_execute_one_missing
# TODO: this test fails in isolation
util_foo_bar
- @cmd.handle_options %w[foo_bar missinglib]
+ @cmd.handle_options %w[foo_bar missing]
use_ui @ui do
@cmd.execute
end
assert_equal "#{@foo_bar.full_gem_path}/lib/foo_bar.rb\n", @ui.output
- assert_match %r%Can.t find ruby library file or shared library missinglib\n%,
+ assert_match %r%Can.t find ruby library file or shared library missing\n%,
@ui.error
end
def test_execute_missing
- @cmd.handle_options %w[missinglib]
+ @cmd.handle_options %w[missing]
use_ui @ui do
assert_raises Gem::MockGemUi::TermError do
@@ -54,12 +62,12 @@ class TestGemCommandsWhichCommand < Gem::TestCase
end
assert_equal '', @ui.output
- assert_match %r%Can.t find ruby library file or shared library missinglib\n%,
+ assert_match %r%Can.t find ruby library file or shared library missing\n%,
@ui.error
end
def util_foo_bar
- files = %w[lib/foo_bar.rb Rakefile]
+ files = %w[lib/foo_bar.rb lib/directory/baz.rb Rakefile]
@foo_bar = quick_spec 'foo_bar' do |gem|
gem.files = files
end
diff --git a/test/rubygems/test_gem_config_file.rb b/test/rubygems/test_gem_config_file.rb
index 424fd92..34c1953 100644
--- a/test/rubygems/test_gem_config_file.rb
+++ b/test/rubygems/test_gem_config_file.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/config_file'
diff --git a/test/rubygems/test_gem_dependency.rb b/test/rubygems/test_gem_dependency.rb
index a77ddf5..a792874 100644
--- a/test/rubygems/test_gem_dependency.rb
+++ b/test/rubygems/test_gem_dependency.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/dependency'
diff --git a/test/rubygems/test_gem_dependency_installer.rb b/test/rubygems/test_gem_dependency_installer.rb
index 48d85b8..03c1200 100644
--- a/test/rubygems/test_gem_dependency_installer.rb
+++ b/test/rubygems/test_gem_dependency_installer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/dependency_installer'
require 'rubygems/security'
diff --git a/test/rubygems/test_gem_dependency_list.rb b/test/rubygems/test_gem_dependency_list.rb
index 348f111..8b920a8 100644
--- a/test/rubygems/test_gem_dependency_list.rb
+++ b/test/rubygems/test_gem_dependency_list.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/dependency_list'
diff --git a/test/rubygems/test_gem_doc_manager.rb b/test/rubygems/test_gem_doc_manager.rb
index f7ab641..226f69d 100644
--- a/test/rubygems/test_gem_doc_manager.rb
+++ b/test/rubygems/test_gem_doc_manager.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/doc_manager'
diff --git a/test/rubygems/test_gem_ext_configure_builder.rb b/test/rubygems/test_gem_ext_configure_builder.rb
index b8063f8..443d4b0 100644
--- a/test/rubygems/test_gem_ext_configure_builder.rb
+++ b/test/rubygems/test_gem_ext_configure_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/ext'
diff --git a/test/rubygems/test_gem_ext_ext_conf_builder.rb b/test/rubygems/test_gem_ext_ext_conf_builder.rb
index 5caae8e..c050d82 100644
--- a/test/rubygems/test_gem_ext_ext_conf_builder.rb
+++ b/test/rubygems/test_gem_ext_ext_conf_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/ext'
diff --git a/test/rubygems/test_gem_ext_rake_builder.rb b/test/rubygems/test_gem_ext_rake_builder.rb
index db0648b..d306643 100644
--- a/test/rubygems/test_gem_ext_rake_builder.rb
+++ b/test/rubygems/test_gem_ext_rake_builder.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/ext'
diff --git a/test/rubygems/test_gem_format.rb b/test/rubygems/test_gem_format.rb
index 85fb521..805455f 100644
--- a/test/rubygems/test_gem_format.rb
+++ b/test/rubygems/test_gem_format.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/simple_gem'
require 'rubygems/format'
diff --git a/test/rubygems/test_gem_gem_path_searcher.rb b/test/rubygems/test_gem_gem_path_searcher.rb
index c7f5af7..cb2afcd 100644
--- a/test/rubygems/test_gem_gem_path_searcher.rb
+++ b/test/rubygems/test_gem_gem_path_searcher.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/gem_path_searcher'
diff --git a/test/rubygems/test_gem_gem_runner.rb b/test/rubygems/test_gem_gem_runner.rb
index 3cb8410..c11368c 100644
--- a/test/rubygems/test_gem_gem_runner.rb
+++ b/test/rubygems/test_gem_gem_runner.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/gem_runner'
diff --git a/test/rubygems/test_gem_gemcutter_utilities.rb b/test/rubygems/test_gem_gemcutter_utilities.rb
index a01328f..db4ed19 100644
--- a/test/rubygems/test_gem_gemcutter_utilities.rb
+++ b/test/rubygems/test_gem_gemcutter_utilities.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
require 'rubygems/command'
diff --git a/test/rubygems/test_gem_indexer.rb b/test/rubygems/test_gem_indexer.rb
index a4f9bd4..f5bef8f 100644
--- a/test/rubygems/test_gem_indexer.rb
+++ b/test/rubygems/test_gem_indexer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/indexer'
diff --git a/test/rubygems/test_gem_install_update_options.rb b/test/rubygems/test_gem_install_update_options.rb
index 2f0b911..473c7fe 100644
--- a/test/rubygems/test_gem_install_update_options.rb
+++ b/test/rubygems/test_gem_install_update_options.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/installer_test_case'
require 'rubygems/install_update_options'
require 'rubygems/command'
diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb
index 249b195..d3791d7 100644
--- a/test/rubygems/test_gem_installer.rb
+++ b/test/rubygems/test_gem_installer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/installer_test_case'
class TestGemInstaller < Gem::InstallerTestCase
@@ -213,6 +207,24 @@ load Gem.bin_path('a', 'executable', version)
assert_match %r|generated by RubyGems|, wrapper
end
+ def test_generate_bin_bindir_with_user_install_warning
+
+ options = {
+ :bin_dir => "/usr/bin",
+ :install_dir => "/non/existant"
+ }
+
+ inst = Gem::Installer.new nil, options
+
+ Gem::Installer.path_warning = false
+
+ use_ui @ui do
+ inst.check_that_user_bin_dir_is_in_path
+ end
+
+ assert_equal "", @ui.error
+ end
+
def test_generate_bin_script
@installer.wrappers = true
util_make_exec
diff --git a/test/rubygems/test_gem_local_remote_options.rb b/test/rubygems/test_gem_local_remote_options.rb
index 8d79072..0141a31 100644
--- a/test/rubygems/test_gem_local_remote_options.rb
+++ b/test/rubygems/test_gem_local_remote_options.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/local_remote_options'
require 'rubygems/command'
diff --git a/test/rubygems/test_gem_package_tar_header.rb b/test/rubygems/test_gem_package_tar_header.rb
index 20d2204..5d85543 100644
--- a/test/rubygems/test_gem_package_tar_header.rb
+++ b/test/rubygems/test_gem_package_tar_header.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package'
diff --git a/test/rubygems/test_gem_package_tar_input.rb b/test/rubygems/test_gem_package_tar_input.rb
index 72c1ce19..ee8e537 100644
--- a/test/rubygems/test_gem_package_tar_input.rb
+++ b/test/rubygems/test_gem_package_tar_input.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package/tar_input'
diff --git a/test/rubygems/test_gem_package_tar_output.rb b/test/rubygems/test_gem_package_tar_output.rb
index 01b4a0f..ecf25ef 100644
--- a/test/rubygems/test_gem_package_tar_output.rb
+++ b/test/rubygems/test_gem_package_tar_output.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package/tar_output'
require 'rubygems/security'
diff --git a/test/rubygems/test_gem_package_tar_reader.rb b/test/rubygems/test_gem_package_tar_reader.rb
index 657db9b..34e3044 100644
--- a/test/rubygems/test_gem_package_tar_reader.rb
+++ b/test/rubygems/test_gem_package_tar_reader.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package'
diff --git a/test/rubygems/test_gem_package_tar_reader_entry.rb b/test/rubygems/test_gem_package_tar_reader_entry.rb
index 46e3046..92da220 100644
--- a/test/rubygems/test_gem_package_tar_reader_entry.rb
+++ b/test/rubygems/test_gem_package_tar_reader_entry.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package'
diff --git a/test/rubygems/test_gem_package_tar_writer.rb b/test/rubygems/test_gem_package_tar_writer.rb
index ab9e5dd..88779e7 100644
--- a/test/rubygems/test_gem_package_tar_writer.rb
+++ b/test/rubygems/test_gem_package_tar_writer.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/package/tar_test_case'
require 'rubygems/package/tar_writer'
diff --git a/test/rubygems/test_gem_package_task.rb b/test/rubygems/test_gem_package_task.rb
index c53bdf4..35b38cd 100644
--- a/test/rubygems/test_gem_package_task.rb
+++ b/test/rubygems/test_gem_package_task.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
require 'rubygems/package_task'
diff --git a/test/rubygems/test_gem_path_support.rb b/test/rubygems/test_gem_path_support.rb
index 7fb0cca..bffc66f 100644
--- a/test/rubygems/test_gem_path_support.rb
+++ b/test/rubygems/test_gem_path_support.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems'
require 'fileutils'
@@ -34,6 +28,15 @@ class TestGemPathSupport < Gem::TestCase
assert_equal expected, ps.path
end
+ if defined?(File::ALT_SEPARATOR) and File::ALT_SEPARATOR
+ def test_initialize_home_normalize
+ alternate = @tempdir.gsub(File::SEPARATOR, File::ALT_SEPARATOR)
+ ps = Gem::PathSupport.new "GEM_HOME" => alternate
+
+ assert_equal @tempdir, ps.home, "normalize values"
+ end
+ end
+
def test_initialize_path
ps = Gem::PathSupport.new "GEM_PATH" => %W[#{@tempdir}/foo #{@tempdir}/bar]
diff --git a/test/rubygems/test_gem_platform.rb b/test/rubygems/test_gem_platform.rb
index f46a20f..4cb2f06 100644
--- a/test/rubygems/test_gem_platform.rb
+++ b/test/rubygems/test_gem_platform.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/platform'
require 'rbconfig'
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
index e039bb7..2ccb8ce 100644
--- a/test/rubygems/test_gem_remote_fetcher.rb
+++ b/test/rubygems/test_gem_remote_fetcher.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'ostruct'
require 'webrick'
diff --git a/test/rubygems/test_gem_requirement.rb b/test/rubygems/test_gem_requirement.rb
index b646171..0bc6ad7 100644
--- a/test/rubygems/test_gem_requirement.rb
+++ b/test/rubygems/test_gem_requirement.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require "rubygems/requirement"
diff --git a/test/rubygems/test_gem_security.rb b/test/rubygems/test_gem_security.rb
index 62156be..df3168d 100644
--- a/test/rubygems/test_gem_security.rb
+++ b/test/rubygems/test_gem_security.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/security'
require 'rubygems/fix_openssl_warnings' if RUBY_VERSION < "1.9"
diff --git a/test/rubygems/test_gem_server.rb b/test/rubygems/test_gem_server.rb
index bd4d960..82b3a5c 100644
--- a/test/rubygems/test_gem_server.rb
+++ b/test/rubygems/test_gem_server.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/server'
require 'stringio'
diff --git a/test/rubygems/test_gem_silent_ui.rb b/test/rubygems/test_gem_silent_ui.rb
index 8005b3b..cf5b1cd 100644
--- a/test/rubygems/test_gem_silent_ui.rb
+++ b/test/rubygems/test_gem_silent_ui.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/user_interaction'
require 'timeout'
@@ -55,7 +49,7 @@ class TestGemSilentUI < Gem::TestCase
assert_empty out, 'No output'
assert_empty err, 'No output'
-
+
out, err = capture_io do
use_ui @sui do
value = @sui.ask_yes_no 'Problem?', true
@@ -66,7 +60,7 @@ class TestGemSilentUI < Gem::TestCase
assert_empty err, 'No output'
assert value, 'Value is true'
-
+
out, err = capture_io do
use_ui @sui do
value = @sui.ask_yes_no 'Problem?', false
diff --git a/test/rubygems/test_gem_source_index.rb b/test/rubygems/test_gem_source_index.rb
index 462ecbe..8d0885c 100644
--- a/test/rubygems/test_gem_source_index.rb
+++ b/test/rubygems/test_gem_source_index.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/source_index'
require 'rubygems/config_file'
diff --git a/test/rubygems/test_gem_spec_fetcher.rb b/test/rubygems/test_gem_spec_fetcher.rb
index 073b082..015d2ee 100644
--- a/test/rubygems/test_gem_spec_fetcher.rb
+++ b/test/rubygems/test_gem_spec_fetcher.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/spec_fetcher'
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 0213f95..0ca1a0a 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'stringio'
require 'rubygems/specification'
diff --git a/test/rubygems/test_gem_stream_ui.rb b/test/rubygems/test_gem_stream_ui.rb
index 2a99af0..f483568 100644
--- a/test/rubygems/test_gem_stream_ui.rb
+++ b/test/rubygems/test_gem_stream_ui.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/user_interaction'
require 'timeout'
@@ -41,6 +35,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask
+ skip 'TTY detection broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
timeout(1) do
expected_answer = "Arthur, King of the Britons"
@in.string = "#{expected_answer}\n"
@@ -50,6 +47,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_no_tty
+ skip 'TTY detection broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
@in.tty = false
timeout(0.1) do
@@ -59,6 +59,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_for_password
+ skip 'Always uses $stdin on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
timeout(1) do
expected_answer = "Arthur, King of the Britons"
@in.string = "#{expected_answer}\n"
@@ -68,6 +71,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_for_password_no_tty
+ skip 'TTY handling is broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
@in.tty = false
timeout(0.1) do
@@ -77,6 +83,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_yes_no_no_tty_with_default
+ skip 'TTY handling is broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
@in.tty = false
timeout(0.1) do
@@ -89,6 +98,9 @@ class TestGemStreamUI < Gem::TestCase
end
def test_ask_yes_no_no_tty_without_default
+ skip 'TTY handling is broken on windows' if
+ Gem.win_platform? unless RUBY_VERSION > '1.9.2'
+
@in.tty = false
timeout(0.1) do
diff --git a/test/rubygems/test_gem_text.rb b/test/rubygems/test_gem_text.rb
index 7324e42..7974bd4 100644
--- a/test/rubygems/test_gem_text.rb
+++ b/test/rubygems/test_gem_text.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require "rubygems/text"
diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb
index 79720e6..a94fc43 100644
--- a/test/rubygems/test_gem_uninstaller.rb
+++ b/test/rubygems/test_gem_uninstaller.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/installer_test_case'
require 'rubygems/uninstaller'
@@ -216,7 +210,7 @@ class TestGemUninstaller < Gem::InstallerTestCase
def test_uninstall_selection_greater_than_one
util_make_gems
-
+
list = Gem::Specification.find_all_by_name('a')
uninstaller = Gem::Uninstaller.new('a')
diff --git a/test/rubygems/test_gem_validator.rb b/test/rubygems/test_gem_validator.rb
index 304c141..58e94bf 100644
--- a/test/rubygems/test_gem_validator.rb
+++ b/test/rubygems/test_gem_validator.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require "rubygems/simple_gem"
require 'rubygems/validator'
diff --git a/test/rubygems/test_gem_version.rb b/test/rubygems/test_gem_version.rb
index d6a15ec..f578063 100644
--- a/test/rubygems/test_gem_version.rb
+++ b/test/rubygems/test_gem_version.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require "rubygems/version"
diff --git a/test/rubygems/test_gem_version_option.rb b/test/rubygems/test_gem_version_option.rb
index bcb594e..cbe819c 100644
--- a/test/rubygems/test_gem_version_option.rb
+++ b/test/rubygems/test_gem_version_option.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
require 'rubygems/command'
require 'rubygems/version_option'
diff --git a/test/rubygems/test_kernel.rb b/test/rubygems/test_kernel.rb
index 32658c5..6210422 100644
--- a/test/rubygems/test_kernel.rb
+++ b/test/rubygems/test_kernel.rb
@@ -1,9 +1,3 @@
-######################################################################
-# This file is imported from the rubygems project.
-# DO NOT make modifications in this repo. They _will_ be reverted!
-# File a patch instead and assign it to Ryan Davis or Eric Hodel.
-######################################################################
-
require 'rubygems/test_case'
class TestKernel < Gem::TestCase