class Bundler::LockfileParser

def parse_dependency(line)

def parse_dependency(line)
  if line =~ NAME_VERSION_2
    name = $1
    version = $2
    pinned = $4
    version = version.split(",").map(&:strip) if version
    dep = Bundler::Dependency.new(name, version)
    if pinned && dep.name != "bundler"
      spec = @specs.find {|_, v| v.name == dep.name }
      dep.source = spec.last.source if spec
      # Path sources need to know what the default name / version
      # to use in the case that there are no gemspecs present. A fake
      # gemspec is created based on the version set on the dependency
      # TODO: Use the version from the spec instead of from the dependency
      if version && version.size == 1 && version.first =~ /^\s*= (.+)\s*$/ && dep.source.is_a?(Bundler::Source::Path)
        dep.source.name    = name
        dep.source.version = $1
      end
    end
    @dependencies << dep
  end
end