class Bundler::Index
def search(query, base = nil)
Search this index's specs, and any source indexes that this index knows
def search(query, base = nil) results = local_search(query, base) seen = Set.new(results.map { |spec| [spec.name, spec.version, spec.platform] }) @sources.each do |source| source.search(query, base).each do |spec| lookup = [spec.name, spec.version, spec.platform] unless seen.include?(lookup) results << spec seen << lookup end end end results end