[Rubygems-developers] find_dependencies_not_cached

TRANS transfire at gmail.com
Sun Mar 25 15:31:08 EDT 2007


In remote_installer.rb there is method:

    def find_dependencies_not_installed(dependencies)
      to_install = []
      dependencies.each do |dependency|
        srcindex = Gem::SourceIndex.from_installed_gems
        matches = srcindex.find_name(dependency.name,
dependency.requirement_list)
        to_install.push dependency if matches.empty?
      end
      to_install
    end

In building my extension for bundles I need something like this, but
it needs to be "find_dependencies_not_cached", ie. I need to know
which gems are not stored in the cache based on name and version
requirement (irregardless of installation status). Is there a way I
can easily handle this?

Thanks,
T.


More information about the Rubygems-developers mailing list