Forum: Ruby Query if project uses svn or git on Rubyforge

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Thomas S. (Guest)
on 2008-11-05 09:52
(Received via mailing list)
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.
This topic is locked and can not be replied to.