File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 3232task :known_plugins do
3333 dep = Gem ::Dependency . new ( /^hoe-/ , Gem ::Requirement . default )
3434 fetcher = Gem ::SpecFetcher . fetcher
35- spec_tuples = fetcher . find_matching dep
35+ spec_tuples = fetcher . search_for_dependency ( dep ) . flatten ( 1 )
3636
37- max = spec_tuples . map { |( tuple , _source ) | tuple . first . size } . max
37+ max = spec_tuples . map { |( tuple , _source ) | tuple . name . size } . max
3838
39- spec_tuples . each do |( tuple , source ) |
40- spec = Gem ::SpecFetcher . fetcher . fetch_spec ( tuple , URI . parse ( source ) )
41- puts "* %-#{ max } s - %s (%s)" % [ spec . name , spec . summary , spec . authors . first ]
39+ spec_tuples . sort_by { |( tuple , _source ) | tuple . name } . each do |( tuple , source ) |
40+ spec = source . fetch_spec ( tuple )
41+ summary = spec
42+ . summary
43+ . gsub ( /\[ ([^\] ]+)\] (?:[\[ \( ].*?[\] \) ])?/ , '\1' )
44+
45+ puts "* %-#{ max } s - %s (%s)" % [ spec . name , summary , spec . authors . first ]
4246 end
4347end
4448
You can’t perform that action at this time.
0 commit comments