class Bundler::LockfileParser
def parse_source(line)
def parse_source(line) case line when SPECS case @type when PATH @current_source = TYPES[@type].from_lock(@opts) @sources << @current_source when GIT @current_source = TYPES[@type].from_lock(@opts) @sources << @current_source when GEM @opts["remotes"] = Array(@opts.delete("remote")).reverse @current_source = TYPES[@type].from_lock(@opts) @sources << @current_source when PLUGIN @current_source = Plugin.source_from_lock(@opts) @sources << @current_source end 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