[Nitro] General inquiry about Reap

Jonas Pfenniger zimba.tm at gmail.com
Tue Apr 25 15:07:20 EDT 2006


Le 25 avr. 06 à 20:33, TRANS a écrit :
>
> I may be able to work something in for that, but I wonder to what
> extent it is really useful. You can change the rdoc 'options'
> attribute in the ProjectInfo file to make it work basically any way
> you could from the command line. So the difference is just being
> callable from outside the project and with custom attributes passed on
> the command line. Is that right? The former I don't know how that
> could work  (can you even do that with Rake?) Won't you still have to
> specify the project directory somehow, so isn't something like the
> following essentially the same:
>
>   cd myproject/path; reap rdoc; cd ../..

I don't know how exactly works ProjectInfo but why not use it to set  
default values to tasks ?

Imagine the rdoc task requires a source parameter. If ProjectInfo  
contains rdoc[:source], it would be used by the reap task. Otherwise,  
reap would ask for the source option. (cf: Glue's configuration)

> Even so I could of course add a flag for the project directory --and
> see no reaosn not to. So I'll do that. Thanks!

Yes this is a good idea.

>
> As for the later parameters, I can see how that might be useful, but
> only rarely. while there's surely some way to accept command line
> parameters for it, I tend to think it would be easier just to edit the
> ProjectInfo file.  Am I missing something in this respect? Perhaps
> just being able to create variant specification in the ProjectInfo and
> being able to call them by name would help?

Yes as project directory, a reap config parameter can be useful. I  
just hope it won't add too many lines of code.


Concerning Gem autoload. A quick google search showed me that you can  
tell a gem to autorequire a file. As I understood, you can build gems  
in a way that they will automatically require a gem when 'rubygem' is  
required. I don't know how it works with multiple versions of the  
same gem altrough. This means that Gems could autorequire rake tasks  
so that they are loaded in the namespace. You then could use the  
ObjectSpace browsing method to look for available tasks. Concerning  
standard ruby intalls, the RUBYOPT env variable could be used to  
attain the same effect. Or is there an autorequire feature also  
available in standard ruby libs ?


Cheers,
   zimbatm





More information about the Nitro-general mailing list