class Bundler::DirectorySource

def locate_gemspecs

def locate_gemspecs
  Dir["#{location}/#{@glob}"].inject({}) do |specs, file|
    file = Pathname.new(file)
    if spec = eval(File.read(file)) and validate_gemspec(file.dirname, spec)
      spec.location = file.dirname.expand_path
      specs[spec.full_name] = spec
    end
    specs
  end
end