On Jan 3, 2008 10:26 PM, Jim Weirich <[EMAIL PROTECTED]> wrote: > On Jan 3, 2008, at 2:55 PM, James Adam wrote: > > I think the engines plugin is looking for option (2), where it's the > > "body" of the rake task that needs to change, rather than any of the > > prerequisites. > > Actually, that counts as clearing/replacing one of the actions, which > falls under option (1).
I'll defer to your (clearly better) understanding of Rake :) > The problem I have with the whole "clear out the task" idea is that > it doesn't play well with multiple plugins. Certainly; but that's a problem for Rails (or rather, Rails developers) to solve, if indeed it really is a problem. I'd say this shares more in common with reopening classes - certainly any number of files might reopen a class and redefine a method, obliterating what was there before, but it still qualifies as a "feature" :) If the "task => method" analogy holds, might it be possible to define an alias to the current implementation of a task, and then redefine it to call the aliased task along with any custom behaviour? Maybe something like this: alias_task :new_task_name, :original_task redefine_task :original_task do task(:new_task_name).invoke do_something_else end ... perhaps something like that? It may be that this is simply not practical, in which case I think that it's still fine to simply lose the previous implementation - that feels Rubyish to me. -- * J * ~ _______________________________________________ Rake-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/rake-devel
