Query if project uses svn or git on Rubyforge


#1

I need to check to see if a rubyforge project is using git or svn,
given the name of the project. A simple hack appears to suffice:

require ‘open-uri’

page = open(“http://rubyforge.org/projects/#{project_name}/”).read
page =~ /(svn|git)/mi
type = $1

But that certainly isn’t a robust solution. Is there a foolproof way?

Thanks,
7.