class Bundler::Definition

def pin_locally_available_names(source_requirements)

def pin_locally_available_names(source_requirements)
  source_requirements.each_with_object({}) do |(name, original_source), new_source_requirements|
    local_source = original_source.dup
    local_source.local_only!
    new_source_requirements[name] = if local_source.specs.search(name).any?
      local_source
    else
      original_source
    end
  end
end