-
Committer:
Robert Bruce Park
-
Date:
2013-03-28 23:57:38 UTC
-
Revision ID:
robert.park@canonical.com-20130328235738-6wao8rq0q50704wu
Radically simplify the URL shortening code.
Highlights:
* Each individual shortening service is represented by just one line
of code, instead of having a unique class written per-service, which
was a wasteful amount of boilerplate. This makes it easier to add
new services and remove old ones as they come and go.
* With this reduction in boilerplate, I've absorbed all the code into
a single file, reducing module complexity.
* Turns out we were never quoting URLs, which broke pretty harshly if
special characters were in the URLs to be shortened. I've
implemented URL quoting, and written tests to ensure that the
quoting happens.