Removed dependency on domainatrix and replaced with public_suffix gem #7

merged 3 commits into from Oct 7, 2012


None yet
2 participants

dparis commented Oct 7, 2012

Domainatrix has recently bumped their gem version and fixed some bugged behavior that postrank-uri was relying on. Namely, Domainatrix.parse when passed an invalid URI used to raise a method_missing error due to an unchecked nil when the domain wasn't seen in the valid list of TLDs. Since that has been fixed, their original intended behavior now occurs, where the invalid domain is passed through as if it were valid.

Domainatrix does not provide a stand-alone way to check the validity of a URI/domain otherwise, so I have replaced it with the seemingly better maintained public_suffix gem:

I can't guarantee that all previous behavior has been preserved, but all of the specs pass cleanly, so at least there are no known regressions.

@igrigorik If this looks good, I'd appreciate it if this could get bumped out to rubygems. Thanks!


dparis commented Oct 7, 2012

Hang on, found a minor regression in the valid? method that wasn't tested. New commit forthcoming shortly.


dparis commented Oct 7, 2012

The untested regression has been fixed and a spec was added to catch that case. Got bit by ruby's handling of nil cascading through chained boolean operations.

The specs are all passing cleanly still. As well, my app's spec suite is passing cleanly now too, so things look good on this end.

@igrigorik igrigorik added a commit that referenced this pull request Oct 7, 2012

@igrigorik igrigorik Merge pull request #7 from dparis/public_suffix
Removed dependency on domainatrix and replaced with public_suffix gem

@igrigorik igrigorik merged commit f0b524b into postrank-labs:master Oct 7, 2012


igrigorik commented Oct 7, 2012

lgtm - thanks! 1.0.17 should be up on rubygems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment