Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 16:59:00 GMT)

ShortURL 0.8.4 released and gets a new mainainer... me!

Posted by Sun, 06 Jan 2008 23:49:00 GMT

Earlier today, Vincent Foley was kind enough to hand over maitenance of the the ShortURL project on RubyForge to me. He first released it back in 2005, which I blogged about as RubyURL was the first shortening service that it supported (and is the default). Unfortunately, the release of RubyURL 2.0 broke backwards compatibility and Vincent wasn’t maintaining it anymore. So, earlier, I decided to patch this and got a new version released that now works with the current RubyURL site.

While working on the code, I decided to extend the compatible services to include moourl and urlTea.

These updates are available in ShortURL version 0.8.4.

Install the ShortURL gem

Installation is a snap… (like 99.7% of rubygems…)

  ~ > sudo gem install shorturl                                                                                                                                                                                                           Password:

  Successfully installed shorturl-0.8.4
  1 gem installed
  Installing ri documentation for shorturl-0.8.4...
  Installing RDoc documentation for shorturl-0.8.4.  

Using ShortURL

The ShortURL gem provides the ShortURL library, which you can use from any Ruby application.

Using the ShortURL library

  ~ > irb                                                                                                                                                                                                                           
  irb(main):001:0> require 'rubygems'
  => true
  irb(main):002:0> require 'shorturl'
  => true
  irb(main):003:0> ShortURL.shorten( '' )
  => "" 

As you can see…it’s really straight forward.

Let’s try it with a few other services.

irb(main):004:0> ShortURL.shorten( '', :moourl )
=> "" 
irb(main):005:0> ShortURL.shorten( '', :tinyurl )
=> "" 

Using the shorturl command-line tool

Many people don’t know that ShortURL provides a command-line tool, which you can use after installing the gem.

  ~ > shorturl                                                                                                                                                                                        

If you’d like to see more services provided than the ones listed here, please submit feature requests and/or patches on the rubyforge project.

ShortURL Documentation

To see the latest documentation for the project, please visit:

My favorite part about this? My rbot plugin for RubyURL works again!

rbot and rubyurl
Uploaded with plasq’s Skitch!

Happy URL-shortening!

To think that tumblin' was a thing of the past

Posted by Wed, 02 May 2007 17:18:00 GMT

I’m digging the new friends feature on tumblr. If you’re tumblin’... consider adding me as a friend.

Also, you should check out the #caboose tumblr, which court3nay setup the other day with a friendly IRC bot.

rbot as a server monitor

Posted by Fri, 03 Feb 2006 16:01:00 GMT

7 comments Latest by Tue, 07 Feb 2006 10:53:45 GMT

Most of you who know the PLANET ARGON team… know that we spend quite a bit of time on IRC interacting with our customes, clients, coworkers, and friends. Quite a bit of our coordination of projects, development, and support is handled via IRC.

For example, all our SVN commits are processed in a private IRC channel where all PLANET ARGON developers and our contractors meet and mingle. Hosting customers hang out in #planetargon on and play with our IRC Bot argonbot.

This morning… I decided that I wanted to follow the teams advice and start making argonbot even more useful. So, I setup instances of DRb running on every server that we host clients and customers on… and now we can using argonbot to help manage our servers and allow our customers to help us monitor them!

08:51 < robbyonrails> ?argon-moon xenon uptime
08:51 < argonbot> xenon uptime:  10:51:38 up 79 days, 20:34,  5 users,  load average: 1.03, 1.05, 1.00

Stop by and meet the world famous argonbot! You can even use our web-based IRC client.

I love DRb.

The svn+rbot plugin, so far

Posted by Thu, 15 Sep 2005 18:02:00 GMT

3 comments Latest by test Mon, 12 Jun 2006 08:55:06 GMT

Ben Bleything and I have put the plugin that we made up in our PDX.rb subversion repository. You can check it out here

Requires rbot and subversion.

< pdxrbot> robbyrussell * pdxrbot:/ [45] - Quick addition of the two author names :-)
< pdxrbot> robbyrussell * www:/ [5] - removing the logfiles from svn
< pdxrbot> ben * pdxrbot:/ [46] - Fix the post-commit hook so that relative paths get expanded
< pdxrbot> robbyrussell * www:/ [6] - ignoring the files in /log/ that end in .log

UPDATE This is what it spits back now. :-)

 < pdxrbot> svn.commit( pdxrbot, { :author => 'robbyrussell', :rev => 67, :log => 'another test of color/syntax...more' } )

Yes… the bot now responds with a subversion commit…and we made it look like ruby code! syntax colors and all!

the bizarre love triangle of rbot, subversion, and drb

Posted by Thu, 15 Sep 2005 05:27:00 GMT

In our pursuit to get stuff ready for the PDX.rb hackfest this weekend, Ben Bleything and I decided that it would be a cool idea to get rbot to monitor the groups subversion repositories.

We asked around a few IRC channels and people had different ways of handling this. The easy route looked to be to parse a RSS feed from Trac. (boring!)

So, in an effort to make it interesting and allow for a little creativity with rbot-and potentially open the doors to other ideas-we opted to build 2 pieces. One would be a post-commit script that would run after a svn commit and the other would be a new plugin in rbot, which started an instance of DRb.

The basic idea…

rbot starts drb on start

svn commit calls drb client, sends notifcation

Yes! I managed to sneak DRb somewhere else that it probably didn’t need to be. It was actually a good way to figure out how to properly tame the crazy lion that is DRb. It’s so sexy, but I am so afraid that it will scratch me if I get too close. It scratched a little tonight, but then the kind folks in #ruby-lang gave me a band-aid and I was on my way. Guess what? I tamed the lion!

The sad part is that I got the thing to properly work about 25 seconds after Ben logged off of IRC and here I am a few horus later amusing myself with test svn commits and telling the whole world. That’s right… he’s sleeping… and dreaming about how the lion is still out to attack him and you all know that the lion is nicely tucked away. { 
  # the lion is here 

We couldn’t have the lion holding the rbot in a headlock the whole time.

So, the lion is nice and it is our new friend. We now have instant notifications of when our repositories get commits in #pdx.rb.

Once we get it to format everything nice and pretty (color-wise), we’ll make it available for all of you rbot and subversion folks.

RubyURL meets rbot

Posted by Wed, 14 Sep 2005 01:48:00 GMT

1 comment Latest by sdgsdg Mon, 21 Aug 2006 08:56:03 GMT

I was asked to submit the small plugin that I created for rbot so that we can do fun stuff like this in #pdx.rb (

21:42 < robbyonrails> ?help rubyurl
21:42 < pdxrbot> rubyurl <your long url>
21:43 < robbyonrails> ?rubyurl
21:43 < pdxrbot> Your RubyURL:

It’s nothing complex and uses the plugin example as a foundation. I just popped in my ShortURL requires and modified what it replies with.

We’re almost at 2,000 unique URLs in RubyURL. :-)

You can pick up the plugin here in the trac for rbot. I don’t know if it will be accepted in the default plugins or not, but you can download the file there and start using it today!

Have fun!

Older posts: 1 2