Skip to content

Instantly share code, notes, and snippets.

@tuzz
Created May 26, 2012 10:32
Show Gist options
  • Save tuzz/2793300 to your computer and use it in GitHub Desktop.
Save tuzz/2793300 to your computer and use it in GitHub Desktop.
Speedy gem dependency fetching
# gem install gem-dependent
require 'rubygems/dependent'
def gem_dependencies(limit = nil)
specs_and_sources = Gem::Dependent.all_specs_and_sources(:all_versions => true)
specs_and_sources = specs_and_sources.take(limit) if limit
Gem::Dependent.fetch_all_dependencies(specs_and_sources)
end
puts gem_dependencies(100).inspect
@loveybot
Copy link

Yay Ruby!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment