Last active
April 21, 2020 09:35
-
-
Save bumi/7f69d94bbc2caa3b006f85d5be4e42df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
gemfile = Bundler::Dsl.new | |
gemfile.eval_gemfile(ENV['BUNDLE_GEMFILE'] || 'Gemfile') | |
dependencies = gemfile.dependencies | |
# specs = dependencies.map(&:to_spec) | |
dependencies.each do |d| | |
begin | |
spec = d.to_spec | |
rescue Gem::MissingSpecError, Gem::MissingSpecVersionError | |
next | |
end | |
puts spec.name | |
puts spec.metadata | |
end | |
puts "-----------------" | |
Bundler.load.specs.each do |spec| | |
puts spec.name | |
puts spec.metadata | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment