class Bundler::RubygemsIntegration

def add_default_gems_to(specs)

Add default gems not already present in specs, and return them as a hash.
def add_default_gems_to(specs)
  specs_by_name = specs.reduce({}) do |h, s|
    h[s.name] = s
    h
  end
  Bundler.rubygems.default_stubs.each do |stub|
    default_spec = stub.to_spec
    default_spec_name = default_spec.name
    next if specs_by_name.key?(default_spec_name)
    specs << default_spec
    specs_by_name[default_spec_name] = default_spec
  end
  specs_by_name
end