Flowdock
method

get_gems_to_cleanup

Importance_0
v2_6_3 - Show latest stable - 0 notes - Class: CleanupCommand
get_gems_to_cleanup() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/commands/cleanup_command.rb, line 123
  def get_gems_to_cleanup
    gems_to_cleanup = @candidate_gems.select { |spec|
      @primary_gems[spec.name].version != spec.version
    }

    default_gems, gems_to_cleanup = gems_to_cleanup.partition { |spec|
      spec.default_gem?
    }

    uninstall_from = options[:user_install] ? Gem.user_dir : @original_home

    gems_to_cleanup = gems_to_cleanup.select { |spec|
      spec.base_dir == uninstall_from
    }

    @default_gems += default_gems
    @default_gems.uniq!
    @gems_to_cleanup = gems_to_cleanup.uniq
  end
Register or log in to add new notes.