instance method
Gem::Commands::CleanupCommand#get_gems_to_cleanup
get_gems_to_cleanup
lib/rubygems/commands/cleanup_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/commands/cleanup_command.rb, line 122
def get_gems_to_cleanup
gems_to_cleanup = @candidate_gems.select do |spec|
@primary_gems[spec.name].version != spec.version
end
default_gems, gems_to_cleanup = gems_to_cleanup.partition(&:default_gem?)
uninstall_from = options[:user_install] ? Gem.user_dir : Gem.dir
gems_to_cleanup = gems_to_cleanup.select do |spec|
spec.base_dir == uninstall_from
end
@default_gems += default_gems
@default_gems.uniq!
@gems_to_cleanup = gems_to_cleanup.uniq
end
No documentation available
See also
#get_candidate_gems
#get_primary_gems
#execute
#uninstall_dep
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0