Shortly (A cleaner Ruby wrapper for various url shortener services)

As mentioned in header Shortly is a cleaner Ruby wrapper for various url shortener services. It support maximum number of url shortener services out there huh(excluding url shortener services whose own url are not even short. Believe me they are many).

Before you compare Shortly to any other gem let me tell you that I did not build it to be used it only with “Rails”,(although you can use it if you want..) that means it is framework agnostic. I build it to put many terminal freaks(or homesick) (that’s what I love to call terminal people) at ease, So next time they want their url shortened, can use terminal (no need to fire a bloddy web browser taking a load of time just to start, so that they can login, get their url short.)

Installation

Oh please don’t ask this silly question you grown ups. But for newbie, fire up a terminal and type

Supported Services

Many services are supported as listed

Goo.gl
Bit.ly
J.mp
Is.gd
V.gd
Sn.im
Tinyurl This does not seem tiny at all
ShortSwitch For domain that uses this like lg.gd
Be sure to cross check by #!ruby Shortly.active_services

Uses.

Command Line Utility

Shortly provides command line utility. See some uses below:

shortly 'http://shortme.com/' #uses googl service and shorten method by default

By default it uses Googl to short urls but you can specify which service to use. Type shortly -h for more info

shortly ‘http://shortme.com/’ -s bitly -l -p -m method-to-use

here are options and there possible values:

Options           What value do they take

-s or —service    Service to use(e.g. bitly, isgd(default googl))
-m or —method     Method to use(e.g. expand or shorten or analytics(default shorten))
-l or —login      Login credential (required for some services only)
-p or —apiKey     API Key credentials (required for some services only)

some more examples

IRB or ruby utility mode

You can use these utilities to any ruby environment

Note: We are developing many other services to stay tuned on github and RubyGems

Thanks.