jpmcgrath/shortener — pull request #1 by mreinsch (2012-02-14 09:16:57+00:00)
Title: many changes

sorry for the huge commit, but with the changes and writing the specs it would have been quite time consuming to group everything into logical commits. The main changes are:

- configurable key length and charsets
- use polymorphic relationship for owner
- for making sure that key is unique, use the DB's unique index
- active record extension to define shortend_url owners
- use URI.normalize to normalize the URLs - this also checks the URL format
- normalize the URL before looking it up in the DB
- use show action for looking up URLs, document routes
- switch to rspec for testing