<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Robby on Rails: Tag gem</title>
    <link>http://www.robbyonrails.com/articles/tag/gem</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>thoughts.sort_by{|t| t[:topic]}.collect </description>
    <item>
      <title>ShortURL on Github</title>
      <description>&lt;p&gt;After noticing a few patch requests on Rubyforge.. I decided that I&amp;#8217;d put the ShortURL gem up on GitHub as I spend quite a bit of my time there these days. :-)&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://github.com/robbyrussell/shorturl/tree"&gt;http://github.com/robbyrussell/shorturl/tree&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I&amp;#8217;ve also thrown up a &lt;a href="http://gist.github.com/2186"&gt;few lines of code&lt;/a&gt; so that you can get the &lt;em&gt;gist&lt;/em&gt; of the gem. ;-)&lt;/p&gt;


&lt;script src="http://gist.github.com/2186.js"&gt;&lt;/script&gt;
</description>
      <pubDate>Thu, 24 Jul 2008 10:56:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:ae5b1e3e-e539-4451-8224-dec14d560e09</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/07/24/shorturl-on-github</link>
      <category>rubyurl</category>
      <category>shorturl</category>
      <category>gem</category>
      <category>git</category>
      <category>github</category>
      <category>gist</category>
    </item>
    <item>
      <title>ShortURL 0.8.4 released and gets a new mainainer... me!</title>
      <description>&lt;p&gt;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 &lt;a href="http://www.robbyonrails.com/articles/2005/06/01/rubyurl-friendly-library"&gt;I blogged about&lt;/a&gt; as &lt;a href="http://rubyurl.com"&gt;RubyURL&lt;/a&gt; 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&amp;#8217;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.&lt;/p&gt;


	&lt;p&gt;While working on the code, I decided to extend the compatible services to include &lt;a href="http://moourl.com"&gt;moourl&lt;/a&gt; and &lt;a href="http://urltea.com"&gt;urlTea&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;These updates are available in ShortURL version 0.8.4.&lt;/strong&gt;&lt;/p&gt;


	&lt;h2&gt;Install the ShortURL gem&lt;/h2&gt;


	&lt;p&gt;Installation is a snap&amp;#8230; (like 99.7% of rubygems&amp;#8230;)&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  ~ &amp;gt; 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.  
&lt;/code&gt;&lt;/pre&gt;

	&lt;h2&gt;Using ShortURL&lt;/h2&gt;


	&lt;p&gt;The ShortURL gem provides the ShortURL library, which you can use from any Ruby application.&lt;/p&gt;


	&lt;h3&gt;Using the ShortURL library&lt;/h3&gt;


&lt;pre&gt;&lt;code&gt;
  ~ &amp;gt; irb                                                                                                                                                                                                                           
  irb(main):001:0&amp;gt; require 'rubygems'
  =&amp;gt; true
  irb(main):002:0&amp;gt; require 'shorturl'
  =&amp;gt; true
  irb(main):003:0&amp;gt; ShortURL.shorten( 'http://www.istwitterdown.com' )
  =&amp;gt; "http://rubyurl.com/P9w" 
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;As you can see&amp;#8230;it&amp;#8217;s really straight forward.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s try it with a few other services.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
irb(main):004:0&amp;gt; ShortURL.shorten( 'http://www.istwitterdown.com', :moourl )
=&amp;gt; "http://moourl.com/fvoky" 
irb(main):005:0&amp;gt; ShortURL.shorten( 'http://www.istwitterdown.com', :tinyurl )
=&amp;gt; "http://tinyurl.com/2t3qmh" 
&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Using the shorturl command-line tool&lt;/h3&gt;


	&lt;p&gt;Many people don&amp;#8217;t know that ShortURL provides a command-line tool, which you can use after installing the gem.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  ~ &amp;gt; shorturl http://istwitterdown.com                                                                                                                                                                                               
  http://rubyurl.com/Lwk
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;If you&amp;#8217;d like to see more services provided than the ones listed here, please submit &lt;a href="http://rubyforge.org/tracker/?atid=2896&amp;#38;group_id=732&amp;#38;func=browse"&gt;feature requests&lt;/a&gt; and/or &lt;a href="http://rubyforge.org/tracker/?atid=2895&amp;#38;group_id=732&amp;#38;func=browse"&gt;patches&lt;/a&gt; on the rubyforge project.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://rubyforge.org/projects/shorturl/"&gt;http://rubyforge.org/projects/shorturl/&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;ShortURL Documentation&lt;/h2&gt;


	&lt;p&gt;To see the latest documentation for the project, please visit:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://rubyforge.org/projects/shorturl/"&gt;http://rubyforge.org/projects/shorturl/&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;My favorite part about this? My &lt;a href="http://www.robbyonrails.com/articles/2005/09/13/rubyurl-meets-rbot"&gt;rbot plugin for RubyURL&lt;/a&gt; works again!&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/rpg4/rbot-and-rubyurl"&gt;&lt;img src="http://img.skitch.com/20080107-mhjgi5mqgbcfgygut426ee8b53.preview.jpg" alt="rbot and rubyurl" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080"&gt;Uploaded with &lt;a href="http://plasq.com/"&gt;plasq&lt;/a&gt;&amp;#8217;s &lt;a href="http://skitch.com"&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;

	&lt;p&gt;Happy &lt;span class="caps"&gt;URL&lt;/span&gt;-shortening!&lt;/p&gt;
</description>
      <pubDate>Sun, 06 Jan 2008 18:49:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:5a4cc022-3fb9-4d4d-9d25-aa709a51c30e</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/01/06/shorturl-0-8-4-released-and-gets-a-new-mainainer-me</link>
      <category>RubyURL</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>rubyurl</category>
      <category>shorturl</category>
      <category>rbot</category>
      <category>gem</category>
      <category>rubyforge</category>
      <category>programming</category>
      <category>development</category>
    </item>
    <item>
      <title>Meet the Cheat</title>
      <description>&lt;p&gt;Hey!  You&amp;#8217;re a cheater!&lt;/p&gt;


	&lt;p&gt;Well, if you&amp;#8217;re not&amp;#8230; I&amp;#8217;m hoping to make one out of you.&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&lt;em&gt;&amp;#8220;A thing worth having is a thing worth cheating for.&amp;#8221;&lt;/em&gt;&amp;#8212;W. C. Fields&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;I&amp;#8217;m a fan of the &lt;span class="caps"&gt;PDF&lt;/span&gt; cheat sheets as I like the consolidated content contained in them. However, I don&amp;#8217;t like having to read PDFs any more than I have to. Printing them isn&amp;#8217;t always ideal either as I really don&amp;#8217;t like to carry around extra paper in my laptop bag. So, what are we to do?&lt;/p&gt;


	&lt;p&gt;Well, you can cheat the system! &lt;em&gt;...and I&amp;#8217;m going to show you how!&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;Cheat is this really nice command-line tool that outputs a plain text cheat sheet whenever and wherever you want.&lt;/p&gt;


	&lt;h2&gt;Install the Cheat&lt;/h2&gt;


	&lt;p&gt;Like all the happy and good Rubygems, this is quite simple&amp;#8230;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ sudo gem install cheat
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Done! Okay&amp;#8230; let&amp;#8217;s try to do some cheating. Don&amp;#8217;t worry, your friends and family will forgive you.&lt;/p&gt;


	&lt;h2&gt;Becoming a Cheat(er)&lt;/h2&gt;


	&lt;p&gt;To view a cheat sheet, just run the cheat command from your favorite terminal window.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ cheat _cheat name_&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;So, for example&amp;#8230; to see the cheat sheet for RSpec, run &lt;code&gt;cheat rspec&lt;/code&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
    $ cheat rspec
    rspec:
      INSTALL
      =======
      $ sudo gem install rspec

      $ ./script/plugin install
      svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/vendor/rspec_on_rails/vendor/p
      ugins/rspec
      Where X_Y_Z is the version number.

      $ ./script/generate rspec
            create  spec
            create  spec/spec_helper.rb
            create  spec/test2spec.erb
            create  test/test2spec_help.rb
            create  script/rails_spec
            create  script/rails_spec_runner

      HOW TO USE
      ==========
      ./script/generate rspec_model User

####################################################
# truncated to save precious bandwidth
####################################################
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Because this is all printing out in your shell, you can take advantage of your favorite command line tools.&lt;/p&gt;


	&lt;h3&gt;Piping to grep&lt;/h3&gt;


&lt;pre&gt;&lt;code&gt;
$ cheat rspec | grep 'equal' 
      @user.errors.on(:username).should_equal "is required" 
  target.should_equal &amp;lt;value&amp;gt;
  target.should_not_equal &amp;lt;value&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Piping to TextMate&lt;/h3&gt;


&lt;pre&gt;&lt;code&gt;$ cheat rspec | mate&lt;/code&gt;&lt;/pre&gt;

	&lt;h2&gt;Find more Cheats&lt;/h2&gt;


	&lt;p&gt;Head over to this &lt;a href="http://cheat.errtheblog.com/b"&gt;list of cheats&lt;/a&gt; to see what is currently available.&lt;/p&gt;


	&lt;p&gt;Thanks to the &lt;a href="http://errtheblog.com/"&gt;Err team&lt;/a&gt; for putting this together!&lt;/p&gt;
</description>
      <pubDate>Wed, 10 Jan 2007 12:37:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:a95963ff-b359-40ae-8fe6-8d1741bc7614</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/01/10/meet-the-cheat</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>cheat</category>
      <category>gem</category>
      <category>ruby</category>
      <category>documentation</category>
    </item>
  </channel>
</rss>
