class Bundler::LockfileParser

def parse_source(line)

def parse_source(line)
  case line
  when SPECS
    return unless TYPES.key?(@type)
    @current_source = TYPES[@type].from_lock(@opts)
    @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
  when *SOURCE
    @current_source = nil
    @opts = {}
    @type = line
  else
    parse_spec(line)
  end
end