class Breezer::Parser
Used to parse the Gemfile.lock and extract the dependencies.
Public Class Methods
deps(lockfile_path = 'Gemfile.lock', **_options)
click to toggle source
# File lib/breezer/parser.rb, line 12 def deps(lockfile_path = 'Gemfile.lock', **_options) lockfile = Bundler::LockfileParser.new(Bundler.read_file(lockfile_path)) specs = lockfile.specs specs.map { |h| [h.name, h.version.version] }.to_h end