Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class ::Gem::Specification def recursive_dependencies(from, index = Gem.source_index) specs = self.runtime_dependencies.map do |dep| spec = index.search(dep).last unless spec wider_net = index.find_name(dep.name).last full_name = from.is_a?(::Gem::Specification) ? from.full_name : from.to_s ThorUI.error "Needed #{dep} for #{full_name}, but could not find it" ThorUI.error "Found #{wider_net.full_name}" if wider_net ::Thor::Tasks::Merb::Gem.rollback_trans end spec end specs + specs.map {|s| s.recursive_dependencies(self, index)}.flatten.uniq end end
This paste will be private.
From the Design Piracy series on my blog: