class Bundler::LockfileParser

def parse_source(line)

def parse_source(line)
  case line
  when GIT, GEM, PATH
    @current_source = nil
    @opts, @type = {}, line
  when SPECS
    @current_source = TYPES[@type].from_lock(@opts)
    # Strip out duplicate GIT sections
    if @sources.include?(@current_source) && @current_source.is_a?(Bundler::Source::Git)
      @current_source = @sources.find { |s| s == @current_source }
    end
    @sources << @current_source
  when OPTIONS
    value = $2
    value = true if value == "true"
    value = false if value == "false"
    key = $1
    if @opts[key]
      @opts[key] = Array(@opts[key])
      @opts[key] << value
    else
      @opts[key] = value
    end
  else
    parse_spec(line)
  end
end