The mind is like a parachute. If it doesn't open, you're meat.

Automation Angels: Hoe

21 May 2007

Launching patir has been a very enjoyable experience from a project management perspective. Apart from the fact that Rubyforge has a cracking team of admins (Tom Copeland must be given a medal!) that responds with lightning speed and always friendly, there are all those little tools provided by the Ruby community that make working with Rubyforge a breeze. Hoe is one of those tools. It makes packaging, releasing and announcing your releases really easy. You can get a crash intro into using Hoe from Jacob Harris’ presentation

There are a few things though that one should have in mind and that are not covered (or are not that clear) in the Hoe documentation or Jacob’s talk: Hoe is added as a dependency to the gem you create. The reason behind this is that once you install the gem you can run the unit tests with

gem check -t your_gem

. You can remove this dependency with:

  hoe.spec.dependencies.delete_if { |dep| == "hoe" }

(courtesy of Christian Neukirchen).

rutema’s Hoe spec also shows how to add extra dependencies and other Gem specification elements (the extra_deps and spec_extras lines):'rutema', "#{Rutema::VERSION_MAJOR}.#{Rutema::VERSION_MINOR}") do |p|
   p.rubyforge_name = 'patir'
   p.summary = 'rutema is a test execution and management framework for...'
   p.description = p.paragraphs_of('README.txt', 1..5).join("\n\n")
   p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
   p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
   p.extra_deps << ['patir'," < =0.3"]
   p.extra_deps << ['highline'] 
   p.extra_deps << ['mailfactory']

Hoe does make your life easier. Just check how fast rutema’s 0.2 bugfix release was released after the initial 0.1 release (for the lazy among you: find bug, fix bug, update documentation, release - all in one hour and fortyfive minutes)

blog comments powered by Disqus