mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems*: Updated to RubyGems 2.0
* test/rubygems*: ditto. * common.mk (prelude): Updated for RubyGems 2.0 source rearrangement. * tool/change_maker.rb: Allow invalid UTF-8 characters in source files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3f606b7063
commit
9694bb8cac
214 changed files with 14049 additions and 7085 deletions
|
@ -26,6 +26,9 @@ class Gem::Commands::CleanupCommand < Gem::Command
|
|||
<<-EOF
|
||||
The cleanup command removes old gems from GEM_HOME. If an older version is
|
||||
installed elsewhere in GEM_PATH the cleanup command won't touch it.
|
||||
|
||||
Older gems that are required to satisify the dependencies of gems
|
||||
are not removed.
|
||||
EOF
|
||||
end
|
||||
|
||||
|
@ -56,6 +59,8 @@ installed elsewhere in GEM_PATH the cleanup command won't touch it.
|
|||
primary_gems[spec.name].version != spec.version
|
||||
}
|
||||
|
||||
full = Gem::DependencyList.from_specs
|
||||
|
||||
deplist = Gem::DependencyList.new
|
||||
gems_to_cleanup.uniq.each do |spec| deplist.add spec end
|
||||
|
||||
|
@ -64,6 +69,8 @@ installed elsewhere in GEM_PATH the cleanup command won't touch it.
|
|||
original_path = Gem.path
|
||||
|
||||
deps.each do |spec|
|
||||
next unless full.ok_to_remove?(spec.full_name)
|
||||
|
||||
if options[:dryrun] then
|
||||
say "Dry Run Mode: Would uninstall #{spec.full_name}"
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue