[Nitro] General inquiry about Reap

TRANS transfire at gmail.com
Mon Apr 24 21:36:44 EDT 2006

Hi all,

I was reading a little about Capistrano (SwitchTower) this evening
after working most of the day on Reap. What struck me was that
Capistrano looks just to be an extenion on Rake. Which got me
wondering in general. So I'd like to ask: What do you think of Reap
and how it works? For those who haven't used it much here's a quick

Reap's main intention is as a dedicated packaging assistant, and has a
number of tasks built-in for that. It didn't start out as a general
task executor at all, but as it evoloved that became more and more
doable. Now one can actually create a custom task just by dropping the
code into your project's task/ directory and it will show up when you
run reap.

A Reap task is designed like this:

  class MyTask < Reap::Task

    task_desc "This is my task's one-line description."

    task_help %{
      I can do on and on here about this task
      and how to use it.

    def run
      # do stuff
      # use task.some_property to get info from ProjectInfo
      # ...


Then you can do

  reap mytask

There are a few more details of course, but that's jist of it anyway.
Probably those most stark distiction between Rake and Reap, besides
the stuctural differences is how you prefore the same type of task
more than once. With Rake you'd define two task with slighly differnt
names that access common code. Eg. maybe:

  task :rdoc_core { |r|
    r.include = "lib/facets/core/"
    r.dir = "doc/api/core"
    # ...

  task :rdoc_more { |r|
    r.include = "lib/facets/more/"
    r.dir = "doc/api/more"
    # ...

In Reap you'd actually just create and array under the rdoc section in
the ProjectInfo file.

    - include: lib/facets/core/
      dir: doc/api/core
      # ...
    - include: lib/facets/more
      dir: doc/api/more
      # ...

This works well with the exception that you have no handle to which to
say I want to run only second or the first --you have to go throught
both no matter what. I've though using names and types, ie:

  rdoc_core: !rdoc
    include: lib/facets/core/
    dir: doc/api/core
    # ...

  rdoc_mode: !rdoc
    include: lib/facets/more
    dir: doc/api/more
    # ...

My only concer there is that the ProjectInfo file would start to loose
it's "objectivity" so to speak --to tell in general terms about the
project. Is that irrational?

Anyhow those are some of my thoughts. Sorry for going on so long. Was
wondering what others think about this and Reap in gerneral.


More information about the Nitro-general mailing list