A
Andrew Wagner
[Note: parts of this message were removed to make it a legal post.]
Quick question about rake task dependencies. Suppose I have the following:
task repare_to_fight => :has_weapons do
...
end
task :attack_with_gun => repare_to_fight do
...
end
task :attack_with_sword => repare_to_fight do
...
end
Now, by default, if I run "rake attack_with_gun attack_with_sword", it
recognizes that "prepare_to_fight" has already been called when it goes to
run the second task. So it saves itself the trouble and skips it.
My question is, is there some way to override that? That is, I want to
prepare_to_fight each time, but only define it in one place. Note also that
repare_to_fight has a dependency, which I only want to mention in one
place, so I can't just put this in a method.
Nobody was injured in the making of this completely fictitious, and very
violent-sounding example...
Quick question about rake task dependencies. Suppose I have the following:
task repare_to_fight => :has_weapons do
...
end
task :attack_with_gun => repare_to_fight do
...
end
task :attack_with_sword => repare_to_fight do
...
end
Now, by default, if I run "rake attack_with_gun attack_with_sword", it
recognizes that "prepare_to_fight" has already been called when it goes to
run the second task. So it saves itself the trouble and skips it.
My question is, is there some way to override that? That is, I want to
prepare_to_fight each time, but only define it in one place. Note also that
repare_to_fight has a dependency, which I only want to mention in one
place, so I can't just put this in a method.
Nobody was injured in the making of this completely fictitious, and very
violent-sounding example...