Skip to content

Instantly share code, notes, and snippets.

@krisleech
Created November 18, 2013 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisleech/7527298 to your computer and use it in GitHub Desktop.
Save krisleech/7527298 to your computer and use it in GitHub Desktop.
Get list of gems which are being pulled from git repo's.
Bundler::LockfileParser.new(Bundler.read_file(Rails.root.join("Gemfile.lock"))).dependencies
.reject { |dep| dep.source.nil? }
.map { |dep| [dep.name, dep.source.path.to_s.split('-').last] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment