<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Polishing Ruby</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/" />
    <link rel="self" type="application/atom+xml" href="http://blog.zenspider.com/atom.xml" />
    <id>tag:blog.zenspider.com,2008-04-09://2</id>
    <updated>2012-02-03T01:57:17Z</updated>
    <subtitle>Musings on Ruby and the Ruby Community...</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.32-en</generator>

<entry>
    <title>isolate version 3.2.2 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/02/isolate-version-322-has-been-r.html" />
    <id>tag:blog.zenspider.com,2012://2.771</id>

    <published>2012-02-03T01:57:17Z</published>
    <updated>2012-02-03T01:57:17Z</updated>

    <summary>Isolate is a very simple RubyGems sandbox. It provides a way to express and automatically install your project&apos;s Gem dependencies. Changes: 3.2.2 / 2012-02-02 2 bug fixes: Isolate hoe plugin shouldn&apos;t sandbox until the isolate task triggers. ARGH. I suck....</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Isolate is a very simple RubyGems sandbox. It provides a way to
express and automatically install your project's Gem dependencies.</p>

<p>Changes:</p>

<h3>3.2.2 / 2012-02-02</h3>

<ul>
<li><p>2 bug fixes:</p>

<ul>
<li>Isolate hoe plugin shouldn't sandbox until the isolate task triggers. ARGH. I suck.</li>
<li>Add missing opening quotes in docs (semaperepelitsa)</li>
</ul></li>
<li><p><a href="http://github.com/jbarnette/isolate">http://github.com/jbarnette/isolate</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>omnifocus version 2.0.0 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/02/omnifocus-version-200-has-been.html" />
    <id>tag:blog.zenspider.com,2012://2.770</id>

    <published>2012-02-03T00:51:06Z</published>
    <updated>2012-02-03T00:51:07Z</updated>

    <summary>Synchronizes bug tracking systems to omnifocus. Changes: 2.0.0 / 2012-02-02 2 minor enhancements: Added bin/of Added deprecation notices to bin/omnifocus* 1 bug fix: _plugins should skip classes explicitly. https://github.com/seattlerb/omnifocus...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Synchronizes bug tracking systems to omnifocus.</p>

<p>Changes:</p>

<h3>2.0.0 / 2012-02-02</h3>

<ul>
<li><p>2 minor enhancements:</p>

<ul>
<li>Added bin/of</li>
<li>Added deprecation notices to bin/omnifocus*</li>
</ul></li>
<li><p>1 bug fix:</p>

<ul>
<li>_plugins should skip classes explicitly.</li>
</ul></li>
<li><p><a href="https://github.com/seattlerb/omnifocus">https://github.com/seattlerb/omnifocus</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>minitest version 2.11.1 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/02/minitest-version-2111-has-been.html" />
    <id>tag:blog.zenspider.com,2012://2.769</id>

    <published>2012-02-01T22:23:19Z</published>
    <updated>2012-02-01T22:23:19Z</updated>

    <summary>minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking. &quot;I had a class with Jim Weirich on testing last week and we were allowed to choose our testing frameworks. Kirk Haines and I were paired...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="minitest" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>minitest provides a complete suite of testing facilities supporting
TDD, BDD, mocking, and benchmarking.</p>

<pre><code>"I had a class with Jim Weirich on testing last week and we were
 allowed to choose our testing frameworks. Kirk Haines and I were
 paired up and we cracked open the code for a few test
 frameworks...

 I MUST say that mintiest is *very* readable / understandable
 compared to the 'other two' options we looked at. Nicely done and
 thank you for helping us keep our mental sanity."

-- Wayne E. Seguin
</code></pre>

<p>minitest/unit is a small and incredibly fast unit testing framework.
It provides a rich set of assertions to make your tests clean and
readable.</p>

<p>minitest/spec is a functionally complete spec engine. It hooks onto
minitest/unit and seamlessly bridges test assertions over to spec
expectations.</p>

<p>minitest/benchmark is an awesome way to assert the performance of your
algorithms in a repeatable manner. Now you can assert that your newb
co-worker doesn't replace your linear algorithm with an exponential
one!</p>

<p>minitest/mock by Steven Baker, is a beautifully tiny mock object
framework.</p>

<p>minitest/pride shows pride in testing and adds coloring to your test
output. I guess it is an example of how to write IO pipes too. :P</p>

<p>minitest/unit is meant to have a clean implementation for language
implementors that need a minimal set of methods to bootstrap a working
test suite. For example, there is no magic involved for test-case
discovery.</p>

<pre><code>"Again, I can't praise enough the idea of a testing/specing
 framework that I can actually read in full in one sitting!"

-- Piotr Szotkowski
</code></pre>

<p>Changes:</p>

<h3>2.11.1 / 2012-02-01</h3>

<ul>
<li><p>2 bug fixes:</p>

<ul>
<li>Improved description for --name argument (drd)</li>
<li>Ensure Mock#expect's expected args is an Array. (mperham)</li>
</ul></li>
<li><p><a href="https://github.com/seattlerb/minitest">https://github.com/seattlerb/minitest</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>graph version 2.4.1 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/graph-version-241-has-been-rel.html" />
    <id>tag:blog.zenspider.com,2012://2.768</id>

    <published>2012-01-30T23:12:52Z</published>
    <updated>2012-01-30T23:12:52Z</updated>

    <summary>Graph is a type of hash that outputs in graphviz&apos;s dot format. It comes with a command-line interface that is easily pluggable. It ships with plugins to graph dependencies and status of installed rubygems, rake tasks, homebrew ports, mac ports,...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Graph is a type of hash that outputs in graphviz's dot format. It
comes with a command-line interface that is easily pluggable.</p>

<p>It ships with plugins to graph dependencies and status of installed
rubygems, rake tasks, homebrew ports, mac ports, and freebsd ports,
coloring leaf nodes blue, outdated nodes red, and outdated leaf nodes
purple (red+blue).</p>

<p>OSX quick tip: </p>

<pre><code>% sudo gem install graph
% sudo brew install graphviz
% gem unpack graph
% cd graph*
% rake gallery
% open gallery/*.png
</code></pre>

<p>Changes:</p>

<h3>2.4.1 / 2012-01-30</h3>

<ul>
<li><p>1 minor enhancement:</p>

<ul>
<li>Quoted sub/graph names to allow characters like :. (damphyr)</li>
</ul></li>
<li><p><a href="https://github.com/seattlerb/graph">https://github.com/seattlerb/graph</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>Array#natural_sort</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/arraynatural-sort.html" />
    <id>tag:blog.zenspider.com,2012://2.767</id>

    <published>2012-01-30T23:02:17Z</published>
    <updated>2012-01-30T23:02:18Z</updated>

    <summary><![CDATA[Sitting in omnifocus for ~4 years... require 'fileutils' 20.times do |n| FileUtils.touch "f#{n}.txt" end p Dir["f*.txt"].sort # =&gt; ["f0.txt", "f1.txt", "f10.txt", "f11.txt", ..., "f2.txt", "f3.txt", ...] class Array def human_sort sort_by { |item| item.to_s.split(/(\d+)/).map { |e| [e.to_i, e] } }...]]></summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Thoughts / Misc" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Sitting in omnifocus for ~4 years...</p>

<pre><code>require 'fileutils'

20.times do |n|
  FileUtils.touch "f#{n}.txt"
end

p Dir["f*.txt"].sort
# =&gt; ["f0.txt", "f1.txt", "f10.txt", "f11.txt", ..., "f2.txt", "f3.txt", ...]

class Array
  def human_sort
    sort_by { |item| item.to_s.split(/(\d+)/).map { |e| [e.to_i, e] } }
  end
end

p Dir["f*.txt"].human_sort
# =&gt; ["f0.txt", "f1.txt", "f2.txt", "f3.txt", "f4.txt", "f5.txt", "f6.txt", ...]
</code></pre>
]]>
        

    </content>
</entry>

<entry>
    <title>RubyInline version 3.11.1 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/rubyinline-version-3111-has-be.html" />
    <id>tag:blog.zenspider.com,2012://2.766</id>

    <published>2012-01-25T08:12:18Z</published>
    <updated>2012-01-25T08:12:18Z</updated>

    <summary>Inline allows you to write foreign code within your ruby code. It automatically determines if the code in question has changed and builds it only when necessary. The extensions are then automatically loaded into the class/module that defines it. You...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="RubyInline" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Inline allows you to write foreign code within your ruby code. It
automatically determines if the code in question has changed and
builds it only when necessary. The extensions are then automatically
loaded into the class/module that defines it.</p>

<p>You can even write extra builders that will allow you to write inlined
code in any language. Use Inline::C as a template and look at
Module#inline for the required API.</p>

<p>Changes:</p>

<h3>3.11.1 / 2012-01-25</h3>

<ul>
<li><p>1 bug fix:</p>

<ul>
<li>Use Ruby's LDFLAGS config variable. (maharg)</li>
</ul></li>
<li><p><a href="http://www.zenspider.com/ZSS/Products/RubyInline/">http://www.zenspider.com/ZSS/Products/RubyInline/</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>minitest version 2.11.0 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/minitest-version-2110-has-been.html" />
    <id>tag:blog.zenspider.com,2012://2.765</id>

    <published>2012-01-25T08:08:25Z</published>
    <updated>2012-01-25T08:08:25Z</updated>

    <summary>minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking. &quot;I had a class with Jim Weirich on testing last week and we were allowed to choose our testing frameworks. Kirk Haines and I were paired...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="minitest" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>minitest provides a complete suite of testing facilities supporting
TDD, BDD, mocking, and benchmarking.</p>

<pre><code>"I had a class with Jim Weirich on testing last week and we were
 allowed to choose our testing frameworks. Kirk Haines and I were
 paired up and we cracked open the code for a few test
 frameworks...

 I MUST say that mintiest is *very* readable / understandable
 compared to the 'other two' options we looked at. Nicely done and
 thank you for helping us keep our mental sanity."

-- Wayne E. Seguin
</code></pre>

<p>minitest/unit is a small and incredibly fast unit testing framework.
It provides a rich set of assertions to make your tests clean and
readable.</p>

<p>minitest/spec is a functionally complete spec engine. It hooks onto
minitest/unit and seamlessly bridges test assertions over to spec
expectations.</p>

<p>minitest/benchmark is an awesome way to assert the performance of your
algorithms in a repeatable manner. Now you can assert that your newb
co-worker doesn't replace your linear algorithm with an exponential
one!</p>

<p>minitest/mock by Steven Baker, is a beautifully tiny mock object
framework.</p>

<p>minitest/pride shows pride in testing and adds coloring to your test
output. I guess it is an example of how to write IO pipes too. :P</p>

<p>minitest/unit is meant to have a clean implementation for language
implementors that need a minimal set of methods to bootstrap a working
test suite. For example, there is no magic involved for test-case
discovery.</p>

<pre><code>"Again, I can't praise enough the idea of a testing/specing
 framework that I can actually read in full in one sitting!"

-- Piotr Szotkowski
</code></pre>

<p>Changes:</p>

<h3>2.11.0 / 2012-01-25</h3>

<ul>
<li><p>2 minor enhancements:</p>

<ul>
<li>Added before / after hooks for setup and teardown. (tenderlove)</li>
<li>Pushed run<em>setup</em>hooks down to Spec. (tenderlove)</li>
</ul></li>
<li><p><a href="https://github.com/seattlerb/minitest">https://github.com/seattlerb/minitest</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>hoe version 2.13.0 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/hoe-version-2130-has-been-rele.html" />
    <id>tag:blog.zenspider.com,2012://2.764</id>

    <published>2012-01-24T01:15:20Z</published>
    <updated>2012-01-24T01:15:20Z</updated>

    <summary>Hoe is a rake/rubygems helper for project Rakefiles. It helps you manage and maintain, and release your project and includes a dynamic plug-in system allowing for easy extensibility. Hoe ships with plug-ins for all your usual project tasks including rdoc...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Seattle.rb" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="hoe" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Hoe is a rake/rubygems helper for project Rakefiles. It helps you
manage and maintain, and release your project and includes a dynamic
plug-in system allowing for easy extensibility. Hoe ships with
plug-ins for all your usual project tasks including rdoc generation,
testing, packaging, and deployment.</p>

<p>See class rdoc for help. Hint: <code>ri Hoe</code> or any of the plugins listed
below.</p>

<p>For extra goodness, see: http://seattlerb.rubyforge.org/hoe/Hoe.pdf</p>

<p>Changes:</p>

<h3>2.13.0 / 2012-01-23</h3>

<ul>
<li><p>3 minor enhancements:</p>

<ul>
<li>Added :dcov task so you can easily check documentation coverage.</li>
<li>Added Rake monkeypatch so that Task#clear will clear comments. (github)</li>
<li>Added coverage sorting and added tmp/isolate to rcov flags</li>
</ul></li>
<li><p>2 bug fixes:</p>

<ul>
<li>Quelled 1.9.3 warning. (erikh)</li>
<li>rcov plugin should invoke isolate task if isolate plugin is being used.</li>
</ul></li>
<li><p><a href="https://github.com/seattlerb/hoe">https://github.com/seattlerb/hoe</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>Enumerable#uniq_by</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/enumerableuniq-by.html" />
    <id>tag:blog.zenspider.com,2012://2.763</id>

    <published>2012-01-18T23:10:35Z</published>
    <updated>2012-01-18T23:10:37Z</updated>

    <summary><![CDATA[Random code sitting around waiting to be blogged... module Enumerable def uniq_by r, s = [], {} each do |e| v = yield(e) next if s[v] r &lt;&lt; e s[v] = true end r end end...]]></summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Thoughts / Misc" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Toys" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Random code sitting around waiting to be blogged...</p>

<pre><code>module Enumerable
  def uniq_by
    r, s = [], {}
    each do |e|
      v = yield(e)
      next if s[v]
      r &lt;&lt; e
      s[v] = true
    end
    r
  end
end
</code></pre>
]]>
        

    </content>
</entry>

<entry>
    <title>minitest version 2.10.1 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/minitest-version-2101-has-been.html" />
    <id>tag:blog.zenspider.com,2012://2.762</id>

    <published>2012-01-18T00:17:43Z</published>
    <updated>2012-01-18T00:17:43Z</updated>

    <summary>minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking. &quot;I had a class with Jim Weirich on testing last week and we were allowed to choose our testing frameworks. Kirk Haines and I were paired...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="minitest" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>minitest provides a complete suite of testing facilities supporting
TDD, BDD, mocking, and benchmarking.</p>

<pre><code>"I had a class with Jim Weirich on testing last week and we were
 allowed to choose our testing frameworks. Kirk Haines and I were
 paired up and we cracked open the code for a few test
 frameworks...

 I MUST say that mintiest is *very* readable / understandable
 compared to the 'other two' options we looked at. Nicely done and
 thank you for helping us keep our mental sanity."

-- Wayne E. Seguin
</code></pre>

<p>minitest/unit is a small and incredibly fast unit testing framework.
It provides a rich set of assertions to make your tests clean and
readable.</p>

<p>minitest/spec is a functionally complete spec engine. It hooks onto
minitest/unit and seamlessly bridges test assertions over to spec
expectations.</p>

<p>minitest/benchmark is an awesome way to assert the performance of your
algorithms in a repeatable manner. Now you can assert that your newb
co-worker doesn't replace your linear algorithm with an exponential
one!</p>

<p>minitest/mock by Steven Baker, is a beautifully tiny mock object
framework.</p>

<p>minitest/pride shows pride in testing and adds coloring to your test
output. I guess it is an example of how to write IO pipes too. :P</p>

<p>minitest/unit is meant to have a clean implementation for language
implementors that need a minimal set of methods to bootstrap a working
test suite. For example, there is no magic involved for test-case
discovery.</p>

<pre><code>"Again, I can't praise enough the idea of a testing/specing
 framework that I can actually read in full in one sitting!"

-- Piotr Szotkowski
</code></pre>

<p>Changes:</p>

<h3>2.10.1 / 2012-01-17</h3>

<ul>
<li><p>1 bug fix:</p>

<ul>
<li>Fixed stupid 1.9 path handling grumble grumble. (graaff)</li>
</ul></li>
<li><p><a href="https://github.com/seattlerb/minitest">https://github.com/seattlerb/minitest</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>graph version 2.4.0 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/graph-version-240-has-been-rel.html" />
    <id>tag:blog.zenspider.com,2012://2.761</id>

    <published>2012-01-17T00:32:18Z</published>
    <updated>2012-01-17T00:32:18Z</updated>

    <summary>Graph is a type of hash that outputs in graphviz&apos;s dot format. It comes with a command-line interface that is easily pluggable. It ships with plugins to graph dependencies and status of installed rubygems, rake tasks, homebrew ports, mac ports,...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Graph is a type of hash that outputs in graphviz's dot format. It
comes with a command-line interface that is easily pluggable.</p>

<p>It ships with plugins to graph dependencies and status of installed
rubygems, rake tasks, homebrew ports, mac ports, and freebsd ports,
coloring leaf nodes blue, outdated nodes red, and outdated leaf nodes
purple (red+blue).</p>

<p>OSX quick tip: </p>

<pre><code>% sudo gem install graph
% sudo brew install graphviz
% gem unpack graph
% cd graph*
% rake gallery
% open gallery/*.png
</code></pre>

<p>Changes:</p>

<h3>2.4.0 / 2012-01-16</h3>

<ul>
<li><p>4 minor enhancements:</p>

<ul>
<li>Renamed arrow<em>none to none</em>arrow.</li>
<li>Renamed box to box_arrow (because the box shape was already defined).</li>
<li>Renamed diamond to diamond_arrow (because the diamond shape was already defined).</li>
<li>Allow rake analyzer to read from stdin, making it more usable for isolated systems.</li>
</ul></li>
<li><p>1 bug fix:</p>

<ul>
<li>Fixed 1.9.3 warnings.</li>
</ul></li>
<li><p><a href="https://github.com/seattlerb/graph">https://github.com/seattlerb/graph</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>rdoc_osx_dictionary version 2.0.1 has been released!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/rdoc-osx-dictionary-version-20-1.html" />
    <id>tag:blog.zenspider.com,2012://2.760</id>

    <published>2012-01-12T01:43:57Z</published>
    <updated>2012-01-12T01:43:57Z</updated>

    <summary>rdoc via Apple&apos;s Dictionary.app. Automatically builds and installs an Apple Dictionary with all rdoc nicely formatted. Inspired by: http://priithaamer.com/blog/ruby-on-rails-dictionary-for-macosx Changes: 2.0.1 / 2012-01-11 3 bug fixes: Changed the way entries were indexed to remove errant duplicate entries. Fixed a bunch...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>rdoc via Apple's Dictionary.app. Automatically builds and installs an
Apple Dictionary with all rdoc nicely formatted.</p>

<p>Inspired by: http://priithaamer.com/blog/ruby-on-rails-dictionary-for-macosx</p>

<p>Changes:</p>

<h3>2.0.1 / 2012-01-11</h3>

<ul>
<li><p>3 bug fixes:</p>

<ul>
<li>Changed the way entries were indexed to remove errant duplicate entries.</li>
<li>Fixed a bunch of 1.9.3 warnings.</li>
<li>Fixed problems on case insensitive file systems. :(</li>
</ul></li>
<li><p><a href="https://github.com/seattlerb/rdoc_osx_dictionary">https://github.com/seattlerb/rdoc_osx_dictionary</a></p></li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>assert_nothing_tested</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/assert-nothing-tested.html" />
    <id>tag:blog.zenspider.com,2012://2.759</id>

    <published>2012-01-12T00:19:56Z</published>
    <updated>2012-01-17T00:31:55Z</updated>

    <summary><![CDATA[Check this rails test out: def test_remove_column_with_multi_column_index ActiveRecord::Base.connection.create_table(:hats) do |table| table.column :hat_name, :string, :limit =&gt; 100 table.column :hat_size, :integer table.column :hat_style, :string, :limit =&gt; 100 end ActiveRecord::Base.connection.add_index "hats", ["hat_style", "hat_size"], :unique =&gt; true assert_nothing_raised { Person.connection.remove_column("hats", "hat_size") } ensure ActiveRecord::Base.connection.drop_table(:hats)...]]></summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="Rails" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="minitest" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Check this rails test out:</p>

<pre><code>def test_remove_column_with_multi_column_index
  ActiveRecord::Base.connection.create_table(:hats) do |table|
    table.column :hat_name, :string, :limit =&gt; 100
    table.column :hat_size, :integer
    table.column :hat_style, :string, :limit =&gt; 100
  end
  ActiveRecord::Base.connection.add_index "hats", ["hat_style", "hat_size"], :unique =&gt; true

  assert_nothing_raised { Person.connection.remove_column("hats", "hat_size") }
ensure
  ActiveRecord::Base.connection.drop_table(:hats)
end
</code></pre>

<p>The file this test came from is chock full of tests written just like this one. What <em>exactly</em> is it testing? The test name implies that it is testing remove<em>column when there is a multi-column index. Does the test ensure that remove</em>column </p>

<p>Better yet, here's how to make it pass:</p>

<pre><code>def remove_column(*)
end
</code></pre>

<p>Tada! No exceptions raised!</p>

<p>This is exactly why minitest doesn't have <code>assert_nothing_raised</code>. You wind up with file after file of useless junk tests.</p>

<p>tenderlove recently converted the rails tests from test/unit to minitest and had to get these tests working since they were all calling <code>assert_nothing_raised</code>. Here is his implementation:</p>

<pre><code>def assert_nothing_raised(*)
  yield
end
</code></pre>

<p>Certainly easier to do this than to go through all the tests and remove the call (never mind adding real assertions to make sure something is actually being tested).</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Seattle.rb 10 Year Anniversary!</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/seattlerb-10-year-anniversary.html" />
    <id>tag:blog.zenspider.com,2012://2.758</id>

    <published>2012-01-11T22:21:35Z</published>
    <updated>2012-01-11T22:21:36Z</updated>

    <summary> I&apos;m incredibly proud to announce Seattle.rb&apos;s 10 Year anniversary party! Seattle&apos;s world-famous Ruby Brigade is 10 years old in February! Come celebrate with us at Substantial with drink, food, music and more goodies TBA. Plus, you&apos;ll get a snazzy...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Seattle.rb" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p><img src="http://ebmedia.eventbrite.com/s3-s3/eventlogos/9442523/1341266765-1.png" alt="Seattle.rb Logo" title="" /></p>

<p>I'm incredibly proud to announce Seattle.rb's 10 Year anniversary party!</p>

<p>Seattle's world-famous Ruby Brigade is 10 years old in February! Come celebrate with us at Substantial with drink, food, music and more goodies TBA. Plus, you'll get a snazzy t-shirt from PeepCode.</p>

<p>Space is limited, so <a href="http://rubybrigade10.eventbrite.com">register</a> now!</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Simulating .PHONY in Rake</title>
    <link rel="alternate" type="text/html" href="http://blog.zenspider.com/2012/01/simulating-phony-in-rake.html" />
    <id>tag:blog.zenspider.com,2012://2.757</id>

    <published>2012-01-10T00:55:48Z</published>
    <updated>2012-01-10T00:55:51Z</updated>

    <summary>Makefiles have a construct called .PHONY. You declare your task a non-filesystem based task like so: .PHONY: mytask and then make knows that it shouldn&apos;t force your task to run just because &quot;mytask&quot; doesn&apos;t exist in the filesystem. Rake doesn&apos;t...</summary>
    <author>
        <name>zenspider</name>
        <uri>http://blog.zenspider.com/</uri>
    </author>
    
        <category term="Ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Thoughts / Misc" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.zenspider.com/">
        <![CDATA[<p>Makefiles have a construct called <code>.PHONY</code>. You declare your task a non-filesystem based task like so:</p>

<pre><code>.PHONY: mytask
</code></pre>

<p>and then make knows that it shouldn't force your task to run just because "mytask" doesn't exist in the filesystem.</p>

<p>Rake doesn't bother with such nonsense. It doesn't assume that all tasks map to the filesystem. That's great. What's not great is that it <em>does</em> assume that if your file task has non-file-task dependencies, that they should probably rebuild even if those tasks have run. The problem code looks like:</p>

<pre><code>def out_of_date?(stamp) # on FileTask
  @prerequisites.any? { |n| application[n, @scope].timestamp &gt; stamp}
end
</code></pre>

<p>In my case, I was trying to intelligently hook up some generated files to isolate so they could access their compiler:</p>

<pre><code>file "lib/ruby18_parser.rb" =&gt; :isolate
file "lib/ruby19_parser.rb" =&gt; :isolate
</code></pre>

<p>The problem is that <code>:isolate</code> is a regular task, and they calculate their dependencies like so:</p>

<pre><code>def timestamp # on Task
  prerequisite_tasks.collect { |pre| pre.timestamp }.max || Time.now
end
</code></pre>

<p><code>:isolate</code> doesn't have any prerequisites, so it falls back to Time.now. This is wrong in my case, as it forces my parser files to regenerate every time.</p>

<p>What I need is a prerequisite that fixes this with a timestamp earlier than my files:</p>

<pre><code>def (task(:phony)).timestamp # omg I love/hate this grammar construct
  Time.at 0
end

task :isolate =&gt; :phony
</code></pre>

<p>and everything is happy.</p>

<p>I'm going to officially ask that <code>:phony</code> gets added to rake so others can be spared this pain.</p>
]]>
        

    </content>
</entry>

</feed>

