No description
Find a file
2010-09-14 15:26:07 +08:00
lib removing commented sequential code from shortenurl.rb 2010-09-14 13:16:42 +08:00
public Formatting changes... Prettier and simpler now 2010-09-14 13:21:05 +08:00
views switching to :new as index 2010-09-14 15:16:50 +08:00
.gitignore adding sinatra.log to gitignore 2010-09-13 17:18:32 +08:00
config.ru cleaning out comments from config.ru file 2010-09-14 13:16:06 +08:00
Gemfile enabled base62 randomizing of URL 2010-09-14 13:00:03 +08:00
Gemfile.lock Updating Gemfile.lock to reflect the addition of anybase 2010-09-14 13:03:52 +08:00
main.rb switching to :new as index 2010-09-14 15:16:50 +08:00
README.markdown adding README.markdown 2010-09-14 15:26:07 +08:00

Shorten

Shorten is an extremely simple Sinatra based URL shortener. There is almost no UI and only the most basic of functionality.

You can see an example of this service running at ➼.ws.

Installation

Clone

$ git clone git://github.com/amdavidson/shorten.git

Install required gems

$ gem install rack sinatra sequel anybase pg

Optional: Install the Heroku gem if you want to deploy on Heroku.

$ gem install heroku

Configure

Open main.rb in your favorite editor and change this block: Shorten = OpenStruct.new( :base_url => "http://xn--8gi.ws/", :service_name => "➼.ws", :button_text => "➼", :path_size => 4 )

Deploy

In the application directory

$ herok

History

This is a fork of the original Shorten application created by Andrew Pilsch. I made some updates to randomize the shortened URL in the style of bit.ly and tr.im. I have also modified the software to be easy to deploy to Heroku.