Skip to content

Instantly share code, notes, and snippets.

@mattetti
Created August 28, 2008 00:39
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 mattetti/7620 to your computer and use it in GitHub Desktop.
Save mattetti/7620 to your computer and use it in GitHub Desktop.
specs = {}
elements = %w[ merb extlib merb-core merb-more merb-action-args merb-assets merb-builder merb-cache merb-freezer merb-gen merb-haml merb-mailer merb-parts merb_activerecord merb_helpers merb_sequel merb_param_protection merb_test_unit merb_stories]
elements.each do |name|
dependency = Gem::Dependency.new name, nil
Gem.source_index.search(dependency).each do |spec|
specs[spec.full_name] = spec
end
end
deps = specs.values.sort.map do |spec| spec.dependencies.map{|d| "#{d.name}" } end.flatten.uniq
print "Recursive dependencies: \n"
deps.each{|dep| print " #{dep}\n"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment