<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Nimble Code: Packaging Your First Gem With Hoe</title>
  <subtitle type="html">Jacob Harris' Weblog</subtitle>
  <id>tag:www.nimblecode.com,2005:Typo</id>
  <generator version="4.0" uri="http://typo.leetsoft.com">Typo</generator>
  <link href="http://www.nimblecode.com/xml/atom10/article/980/feed.xml" rel="self" type="application/xml+atom"/>
  <link href="http://www.nimblecode.com/articles/2007/01/10/packaging-your-first-gem-with-hoe" rel="alternate" type="text/html"/>
  <updated>2007-01-11T10:23:40-08:00</updated>
  <entry>
    <author>
      <name>Robert</name>
    </author>
    <id>urn:uuid:5e4d0575-ad8e-427c-a592-19477f1f7473</id>
    <published>2007-01-11T10:23:39-08:00</published>
    <updated>2007-01-11T10:23:40-08:00</updated>
    <title>Comment on Packaging Your First Gem With Hoe by Robert</title>
    <link href="http://www.nimblecode.com/articles/2007/01/10/packaging-your-first-gem-with-hoe#comment-981" rel="alternate" type="text/html"/>
    <content type="html">&lt;p&gt;You old soppy, you!&lt;/p&gt;


	&lt;p&gt;Nice one :)&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>Jacob Harris</name>
      <email>harrisj@nimblecode.com</email>
    </author>
    <id>urn:uuid:8260c73d-36d8-4853-a148-a946e2961226</id>
    <published>2007-01-10T14:36:00-08:00</published>
    <updated>2008-08-20T00:17:23-07:00</updated>
    <title>Packaging Your First Gem With Hoe</title>
    <link href="http://www.nimblecode.com/articles/2007/01/10/packaging-your-first-gem-with-hoe" rel="alternate" type="text/html"/>
    <category term="programming" scheme="http://www.nimblecode.com/articles/category/980" label="Programming"/>
    <category term="hoe" scheme="http://www.nimblecode.com/articles/tag"/>
    <category term="gems" scheme="http://www.nimblecode.com/articles/tag"/>
    <category term="presentations" scheme="http://www.nimblecode.com/articles/tag"/>
    <category term="ruby" scheme="http://www.nimblecode.com/articles/tag"/>
    <content type="html">&lt;p&gt;My name is Jacob Harris, and I am a rubygem addict. I&amp;#8217;d estimate I have hundreds of them tooling around on my hard drive, useful little snippets of Ruby or C library wrappers or random noodlings. I might not actually use most of them in any of my projects, but like a vast library of unread books, I enjoy having them around. But for the longest time, I&amp;#8217;ve been a freeloader. I&amp;#8217;ve downloaded gems, but I&amp;#8217;ve never written one, but it&amp;#8217;s time I start giving something back.&lt;/p&gt;


	&lt;p&gt;And so, I&amp;#8217;ve written my first gem. It&amp;#8217;s nothing incredible &amp;#8211; all things have to start simple &amp;#8211; but I like it. It&amp;#8217;s called &lt;a href="http://amazon-hacks.rubyforge.com/"&gt;Amazon Hacks&lt;/a&gt; and it consists of two classes (for now) to benefit people whose sites handle Amazon links. The Amazon::Hacks::Link class contains a few methods to extract an &lt;span class="caps"&gt;ASIN&lt;/span&gt; from any product link, normalize product links, and append an affiliate ID easily. The slightly sillier Amazon::Hacks::Image class puts a convenient Ruby wrapper around the &lt;a href="http://aaugh.com/imageabuse.html"&gt;convoluted syntax Amazon uses for its image transformation engine&lt;/a&gt;. If you work on a site that links to Amazon product pages (e.g.,  &lt;a href="http://www.allconsuming.net/"&gt;All Consuming&lt;/a&gt;), try it out and let me know if it works for you or it can be improved. It&amp;#8217;s simple to get started, simply run&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&lt;strong&gt;gem install amazon-hacks&amp;#8212;include-dependencies&lt;/strong&gt;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;Which brings me to &lt;strong&gt;hoe&lt;/strong&gt;. Last night, I gave a talk on hoe to the &lt;a href="http://www.nycruby.org/"&gt;NYC.rb group&lt;/a&gt; and the slides are here if you want to learn more about the process. &lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.nimblecode.com/files/hoetalk.pdf"&gt;Building Your First Gem With Hoe&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Before last week, I had no idea of what it takes to create a gem, but it seemed like a lot, and I had better things to distract myself with. And it does indeed require a fair amount of busy work, what I call &lt;em&gt;administrivia&lt;/em&gt;, to turn your snippet of Ruby code into a packaged gem, and this work has to be started anew for each gem you want to create. Now, as pragmatic programmers, we learn to automate menial tasks whenever possible, and hoe makes the creation of gems a lot more manageable by automating the busy-work away via a set of useful rake tests. The result is more time for coding, faster releases, and more likely you&amp;#8217;ll release that gem in the first place. So, give hoe a shot, learn about gems, and start writing gems. You&amp;#8217;re a brilliant Ruby coder, it&amp;#8217;s time to share it with the world. And when you write that gem, I&amp;#8217;ve got a cherished spot on my hard drive for it.&lt;/p&gt;</content>
  </entry>
</feed>
