From: Sean O'Halpin Date: 2005-09-28T05:43:46+09:00 Subject: [PATCH] Remove duplicate entries from gem_server's list of gems Hi, I finally got fed up with seeing n-thousand duplicate anchors at the top of my gem_server's index page, so I rustled this up to winnow the list: --- PATCH --- --- /ruby-1.8.2/bin/gem_server 2005-04-17 17:41:08.000000000 +0100 +++ gem_server 2005-09-27 21:27:19.840023000 +0100 @@ -24,14 +24,14 @@

Summary

There are %gem_count% gems installed:

-START:specs +START:index IFNOT:is_last %name%, ENDIF:is_last IF:is_last %name%. ENDIF:is_last -END:specs +END:index

Gems

@@ -415,12 +415,16 @@ # create page from template template = TemplatePage.new(DOC_TEMPLATE) res['content-type'] = 'text/html' + + index = specs.map{|spec| spec["name"]}.uniq.sort{|a,b| a.downcase <=> b.downcase}.map{|name| {"name" => name}} + template.write_html_on( res.body, { "gem_count" => specs.size.to_s, "specs" => specs, "total_file_count" => total_file_count.to_s, + "index" => index } ) --- END OF PATCH --- Regards, Sean P.S. Is this the right place to send this kind of patch?