Sporkmonger

purveyor of fabulously ambiguous eating utensils

Addressable Now One Point Oh

Posted by sporkmonger
Written November 3rd, 2007

I just released version 1.0.0 of my Addressable library. The most useful change is the addition of a new heuristic parsing method, similar to how most browsers handle URIs entered through their address bars. Passing “example.com” to the heuristic_parse method will end up returning a URI that is equivalent to “http://example.com”. The URI can then be further normalized as necessary.

In addition, there are several minor changes that might cause compatibility issues (although probably not). The path component of a URI is now guaranteed to never equal nil. The code in the parse method for handling the feed pseudo-protocol has been removed and placed within the heuristic_parse method where it belonged in the first place. The to_h method has been renamed to to_hash so that coercion will work. There were also a couple of small bug fixes, mostly related to routing.

All of that stuff is great of course, but the main reason I’m slapping the “One Point Oh” sticker on this thing and calling it “done” is that now, in addition to having 100% code coverage, Addressable can now manage to go through the heckling process with no surviving code mutations. That’s a pretty high bar to get over, so I think it’s fair to call this thing finished.

  1. Written November 3rd, 2007 at 11:57 PM

    Oh, and if you’re wondering why sudo gem install addressable isn’t getting you the latest version, it’s because of this. For the time being, I think we just have to download newly released gems manually.

  2. bronson bronson :
    Written December 8th, 2007 at 03:44 AM

    What’s the difference between feedtools/uri.rb and Addressable? Is there a reason feedtools doesn’t use Addressable? Just curious.

  3. bronson bronson :
    Written December 8th, 2007 at 03:47 AM

    Oops, I didn’t realize now new Addressable is. Still curious, though… Do you intend to integrate it with FeedTools at some point?

  4. Written December 9th, 2007 at 01:45 AM

    Yeah, only reason FeedTools doesn’t just use Addressable is that I haven’t gotten around to making that happen yet. There are some differences in the code though. Addressable’s implementation is definitely more refined than the corresponding implementation within FeedTools.

    An update for FeedTools should finally be coming soon, largely thanks to Sean.

Leave a Response

NOTE: I'm afraid Javascript needs to be on in order to comment.

Comments should be formatted using Textile.

Ruby code should be enclosed within a <macro:code lang="ruby"> element. Other languages are supported. For output you can simply omit the lang attribute.