Published in
Programming, Rails, Ruby
Ben Curtis recently released Tesly Jr., is a great web service that runs through your Rails tests, formats the output, displays them, and allows you to share them with other people. It installs as a plugin in your Rails application. Whenever you run rake to test your app, it uploads the results automatically to the Tesly Jr. server.
Using Tesly Jr., its very easy to keep your development team up to date with the status of the project. Combine this with runing tests on deploy with Capistrano (via Jamis Buck) and you have a that much better integration of testing into your development and release cycle.
Tesly Jr. is free when using the hosted service, and available for just $24 if you want your own copy to run on your own systems.
03
Oct
2006
1301 Beal Ave., Ann Arbor, MI
Published in
Presentation, Ruby
I put together a presentation that didn’t get time at the first AnnArbor.rb meeting. The topic is “Ruby & Hardware” and is a quick rundown of some cool devices that can run (or be interfaced by) Ruby, such as NabazTag, SqueezeBox, Nokia 770. They’re all at various levels of support and functionality, but you can run Ruby on all of them.
Check out the presentation here: Ruby & Hardware.
I’ll be talking about them at the November AnnArbor.rb/RubyMI meeting if you want to come by.
Published in
Ruby, microformats
Besides consuming Microformats - it’s useful to know how to produce them. Assaf Arkin has extracted a Microformat Helper from his scrAPI plugin. It supports hAtom, basic hCard, and the datetime design pattern currently - and should be easy to add some more microformats. Check out his Microformat Helper Cheatsheet if you’re addicted to that sort of thing.
Out of the Ruby realm, BlogHelper has a good set of tools and howtos for Using Microformats in WordPress.
Published in
FOSS4G, Programming, Ruby
I am looking over the FOSS4G Schedule of sessions. It’s all table based, and it’s somewhat difficult to find specific tracks, rooms, etc. So I took what was the table-based, non-semantic, calendar and converted it into a much more useful hCalendar output, which can be easily translated to iCal for your subscription fun using Brian Suda’s X2V.
You can get the hCalendar here and the iCal link here.
The Problem
Here is the current HTML of the schedule. As you can see, this is an absolute mess of DOM. This table is in fact already the 4th embedded table (tables-within-tables-within-tables oh my!)
| Tuesday, 12 September 2006 |
|
|
| 07:00 |
Registration(AmphipĂ´le (niv. 3): 07:00 - 09:00)
|
| 08:00 |
| 09:00 |
|
In the middle there was some actual interesting bits, such as presentation title, author, times, etc. So what we need to do is walk through all this and build up a conference.
The Solution
Employing some slick Ruby scripting - and using the very useful scrAPI from Assaf we can define scrapers to walk over the multiple days, and then within those days grab each of the sessions. These are then output into proper hCalendar format like:
<span class="vevent">
<a class="url" href="http://www.foss4g2006.org/contributionDisplay.py?contribId=189&sessionId=46&confId=1">
<span class="summary">Enabling Users to Produce personalized Geodata</span>
<span class="details"><span class="vcard"><span class="fn">Mr. Andrew TURNER</span><span class="org">HighEarthOrbit</span></span></span>
<abbr class="dtstart" title="2006-09-15T10:30:00Z">Friday, 15 September 2006 from 10:30</abbr>-
<abbr class="dtend" title="2006-09-15T11:00:00Z">11:00</abbr>,
at the <span class="location">Amphimax MAX 350</span>
</a>
</span>
The code below makes parsing the nightmare above fairly simple, but due to the lack of any proper classes or id’s (each presentation is id="entry" - eep!), we have to find the bits we want by their current markup attributes. Not suggested, but at least this is nicer than trying to figure out the 10-levels of DOM starting at the root.
You can see the parser here.
|