This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit c56dad12073e7c91ddf5203b4f4c6c434880e3ae
tree 1848c0594106598d06e0c3e41c26ceacb843aa38
parent 7c1d46258530e4a4740be04e5019944bae6cdded
tree 1848c0594106598d06e0c3e41c26ceacb843aa38
parent 7c1d46258530e4a4740be04e5019944bae6cdded
turl /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed May 28 08:29:07 -0700 2008 | |
| |
README | ||
| |
Rakefile | ||
| |
turl.rb |
README
TinyURL Ramaze Application =========================== Required gems -------------- sqlite3-ruby, sequel, validatable, ramaze, thin Features --------- - everything in one file - model, view, controller - auto create the database if missing - unique urls in the database - url hits counting - API for command-line access - can shorten urls and restore the original urls Usage ------ $ curl -O turl.rb "http://github.com/zh/turl/tree/master%2Fturl.rb?raw=true" $ ruby turl.rb # browse http://localhost:7000/ # shorten url (turl) $ curl http://admin:secret@localhost:7000/_api?turl=http://github.com/zh/turl/ # restore the original url $ curl http://admin:secret@localhost:7000/_api?url=abc # number of hints for given turl $ curl http://admin:secret@localhost:7000/_api?hits=abc Do not forget to change the BASE_URL and LOGINS values. By default the database file (sqlite3) will be created in the same directory with turl.rb. If this is not acceptable, change the DB_FILE line.









