[Nitro] [PATCH] beginning of a rake file

Trans transfire at gmail.com
Sat Jun 16 16:00:32 EDT 2007

On Jun 15, 8:56 am, a... at arnebrasseur.net wrote:
> I'm looking at the best way to organise the test/spec infrastructure, but
> something with a rakefile seems the way to go. To that end I created a
> rakefile and a rake_tasks directory, and moved the most obvious stuff from
> script/ to rake_tasks/
> So issuing rake -T now gives you
> rake cleanup:all    # Perform all cleanup tasks
> rake cleanup:cache  # Cleanup caches
> rake cleanup:dist   # Cleanup distribution dirs
> rake cleanup:misc   # cleanup miscelanious files
> rake cleanup:rdoc   # Cleanup rDoc directories
> rake darcs:apply    # Apply a patch bundle to the darcs repository
> rake dist           # Create gem and zip distributions
> rake tabs           # Convert tabs to spaces and \r\n to \n
> script/cleanup.rb
> script/build.rb
> script/ctabs.rb
> script/apply.rb
> have been replaced with
> rake_tasks/cleanup.rake
> rake_tasks/dist.rake
> rake_tasks/tabs.rake
> rake_tasks/apply.rake
> The only thing is that with rake it's not so easy to pass additional
> command line arguments to your tasks, AFAIK. So for apply i resorted to
> using environment variables :
> BUNDLE=some_bundle rake darcs:apply
> As said a rake_tasks/spec.rake is coming, I'm looking at the rspec rake
> tasks, and at how Ramaze does it since they don't use the rSpec task.
> Sorry for the empty mail.

I'll probably be the lone dissenter here, but I prefer script/. I
realize that Rake provides some useful features in the construction of
project tasks, but Rakefiles also have a tendency to get pretty ugly.
Scripts remain clean, and can require common behavior from a shared
script-lib. Also, I have been working on some utilities which make
working with scripts more fruitful, such a 'ludo' (lookup and do) and

In any case, Rake's a fine choice, of course. It's just not my
preference. Perhaps when my script tools are polished enough we can
revisit this. I'm sure the Rakefile will be quite obese by then ;-)


More information about the Nitro-general mailing list