Addressable Now One Point Oh
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.
Oh, and if you’re wondering why
sudo gem install addressableisn’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.What’s the difference between feedtools/uri.rb and Addressable? Is there a reason feedtools doesn’t use Addressable? Just curious.
Oops, I didn’t realize now new Addressable is. Still curious, though… Do you intend to integrate it with FeedTools at some point?
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