Rvturl is a project mainly written in Ruby, it's free.
A tiny shorten url sinatra app - with API
rvturl is a tiny sinatra app
shorten urls for revently.com
Opensource it