method

fetch_specs

ruby latest stable - Class: Gem::Commands::DependencyCommand
fetch_specs(name_pattern, dependency)
public

No documentation available.

# File lib/rubygems/commands/dependency_command.rb, line 65
  def fetch_specs name_pattern, dependency # :nodoc:
    specs = []

    if local?
      specs.concat Gem::Specification.stubs.find_all { |spec|
        name_pattern =~ spec.name and
          dependency.requirement.satisfied_by? spec.version
      }.map(&:to_spec)
    end

    specs.concat fetch_remote_specs dependency if remote?

    ensure_specs specs

    specs.uniq.sort
  end