Tom_sq_150

Tom Copeland

Tom was also a founding member of the company's core software development team and is a known open-source technologist and author. He was selected as Oracle Magazine's first 'Open-Source Developer of the Year' for his creation of the Java code testing software PMD, a project that was also listed as one of the Top 27 Open-Source applications in the world by Software Development Magazine. He has written Generating Parsers with JavaCC and PMD Applied and is a leading Rails developer. Tom is a U.S. Coast Guar Academy graduate and former Coast Guard officer.

Badge_rubyconf10_sm Badge_railswhitepaper Rackspace_partner Badge_training

Follow Us on Twitter

Screen_shot_2010-05-11_at_11

Chad Fowler @boboroshi Mutt

Rich_normal

Rich Kilmer Downloading Wings Of Liberty installer @kellyjeanne I will let you know when its here!

_mg_2366_normal

John Athayde @chadfowler is that "mutt" or "moot" on baasmuhti

Identity_thumb_normal

Anthony Burns Teaching an old dog some new tricks. Deploys down to <20s thanks to Git-based deploy. http://bit.ly/EYl8A

Screen_shot_2010-05-11_at_11

Chad Fowler Happy Casual Day!

The rubyforge gem and the RubyForge REST API

Posted by Tom Copeland on 22 September 2009 14:18

Originally published on Tom's Blog at tomecopeland.blogs.com

Yesterday Ryan Davis and I released v2.0.0 of the "rubyforge" gem. The big change for this version is that it no longer interacts with RubyForge by scraping HTML; instead, it uses the new RubyForge REST API. So instead of POST'ing a form to login and fetch your project list, it uses HTTP Basic authentication and hits /users/zenspider/groups.js.

If you're using the new gem, you may see this when you run rubyforge config:

$ rubyforge config
/Library/Ruby/Gems/1.8/gems/json-1.1.7/lib/json/common.rb:122:in `parse': 
618: unexpected token at '<?xml version="1.0" encoding="UTF-8"?> (JSON::ParserError)
<!DOCTYPE html
[ ... lots more ... ]

That's happening because your ~/.rubyforge/user-config.yml file is telling the rubyforge gem to hit https://rubyforge.org, and it needs to hit http://api.rubyforge.org instead. To fix that, either run rubyforge setup, or just edit your ~/.rubyforge/user-config.yml and change the uri setting.

I'm happy to have a REST API for RubyForge available; this has been in the works for a few months and I hope folks come up with some interesting ways to use it. It's certainly much easier (and much more efficient) than the old way of using Mechanize or whatever to parse the HTML. Not all the RubyForge resources are available yet, so if you want to access something and don't see it in the API please let me know and I'll add it. The code is here and feedback is of course welcome. Enjoy!