[Rake-devel] Rakefile optional when using a rake directory

Trans transfire at gmail.com
Sat Feb 23 21:19:02 EST 2008


On Sat, Feb 23, 2008 at 8:47 PM, Assaf Arkin <assaf at labnotes.org> wrote:
>
> On Feb 23, 2008, at 5:31 PM, Trans wrote:
>
>  > Hi--
>  >
>  > I'd like to suggest a simple feature addition to Rake. I would like to
>  > define rake tasks in a default subdirectory (preferably rake/) and
>  > have rake automatically load any files in it having a .rake extension
>  > when there is no Rakefile. If the Rakefile is present it would defer
>  > to it and not automatically load them. So this would strictly be an
>  > additional feature, and not cause any backward compatibility issues.
>  >
>  > I would very much prefer this for keeping my project folders as
>  > concise as possible. Right now nearly all my Rakefiles have but a
>  > single line in them telling them to load from the subdirectory,
>  > something which seems not all that uncommon these days. So it would be
>  > very nice not to have to bother with the Rakefile at all in these
>  > cases.
>
>  I'm not sure if this is documented anywhere, but if you place any file
>  with the .rake extension inside the rakelib sub-directory, relative to
>  the Rakefile, it will be automatically imported after the Rakefile is
>  loaded.

Ah. Okay, I didn't recollect that was automatic.

But of course that's not what I'd like to have either. It's isn't as
useful that way --if I have a Rakefile it's a fairly simple mater of
loading other rake scripts by hand, and I can conditionally control
that if I want too. I'd like it so the Rakefile itself can be done
without.  (Plus I don't like the name rakelib --all my other
directories are 3-4 charchters long --picky I know ;-)

T.


More information about the Rake-devel mailing list