[Rake-devel] Using Rake as a Module instead of from the command line

Jim Weirich jim at weirichhouse.org
Mon May 15 16:43:32 EDT 2006


John Clayton wrote:
> Hi,
> 
> I have a project that is using Rake to do some build/deploy tasks.  A  
> framework we are using to accomplish this runs a rake command line to  
> get started.  But, it would be great for Rake to be able to use the  
> same resources as the framework (logging, notifications, etc.).  I  
> was thinking the way to accomplish this would be to load and  
> configure Rake objects directly, instead of calling system(rake), and  
> run Rake that way so that our Rakefile could use resources loaded in  
> the same interpreter.
> 
> Am I all whacked in my approach?  Does anyone have other ideas?

This makes sense.  Others have done stuff like this as well.

Recent versions of Rake have moved a lot of the global definition stuff 
into a module for better integration for situations like this.  It's 
probably not perfect, so I would be interested in any feedback in this area.

-- 
-- Jim Weirich       jweirich at one.net      http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)


More information about the Rake-devel mailing list