diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-04 07:31:57 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-04 07:31:57 +0000 |
commit | 2d08d23e9cdd13616d8819aa7a582d3a5838636f (patch) | |
tree | 0a7328679e178506827144d50fccede11dd6264f /lib | |
parent | f3b24b5b7f88ecfdefcd898f01ea1cfb2ee418f3 (diff) | |
download | ruby-2d08d23e9cdd13616d8819aa7a582d3a5838636f.tar.gz |
* lib/rubygems/doctor.rb: Process directories in order in case the
filesystem doesn't. [ruby-trunk - Bug #7618]
Process specifications before other directories in case of bugs.
* test/rubygems/test_gem_doctor.rb: Test for above.
* lib/rubygems.rb: Updated version.
* test/rubygems/test_require.rb: Fixed double require of benchmark.rb.
RubyGems bug #420.
* test/rubygems/test_gem_commands_check_command.rb: Fixed unused
variable warnings.
* test/rubygems/test_gem_commands_query_command.rb: ditto
* test/rubygems/test_gem_installer.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/doctor.rb | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 77d1650056..3722e10780 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -98,7 +98,7 @@ require 'rbconfig' module Gem - VERSION = '2.0.0.preview3' + VERSION = '2.0.0.preview3.1' end # Must be first since it unloads the prelude from 1.9.2 diff --git a/lib/rubygems/doctor.rb b/lib/rubygems/doctor.rb index 198c758b00..4fb399e24c 100644 --- a/lib/rubygems/doctor.rb +++ b/lib/rubygems/doctor.rb @@ -19,16 +19,17 @@ class Gem::Doctor # Maps a gem subdirectory to the files that are expected to exist in the # subdirectory. - REPOSITORY_EXTENSION_MAP = { # :nodoc: - 'build_info' => '.info', - 'cache' => '.gem', - 'doc' => '', - 'gems' => '', - 'specifications' => '.gemspec' - } + REPOSITORY_EXTENSION_MAP = [ # :nodoc: + ['specifications', '.gemspec'], + ['build_info', '.info'], + ['cache', '.gem'], + ['doc', ''], + ['gems', ''], + ] raise 'Update REPOSITORY_EXTENSION_MAP' unless - Gem::REPOSITORY_SUBDIRECTORIES == REPOSITORY_EXTENSION_MAP.keys.sort + Gem::REPOSITORY_SUBDIRECTORIES.sort == + REPOSITORY_EXTENSION_MAP.map { |(k,_)| k }.sort ## # Creates a new Gem::Doctor that will clean up +gem_repository+. Only one @@ -97,7 +98,7 @@ class Gem::Doctor def doctor_child sub_directory, extension # :nodoc: directory = @gem_repository + sub_directory - directory.each_child do |child| + directory.children.sort.each do |child| next unless child.exist? basename = child.basename(extension).to_s |