learn about rake is the etymology of the name: “Ruby Make”. • But it’s much more than a catchy turn of phrase. • It’s a fully featured Build Language. That almost never existed...
make tasks in Ruby, like this ..." task "build" do java_compile(...args, etc ...) end "The task function would register "build" as a target to be made, and the block would be the action executed whenever the build system determined that it was time to do the build target."
in the repo: doc/proto_rake.rdoc • But it didn’t have timebased file dependencies... so back to the text-editor. • And the rest is in the commit history.
method the power to evaluate what prerequisites it has. • Then because ruby can evaluate the code without running it, it can prepare it to be run in the correct order that will only run each task once.
make. They get run only when needed. File tasks are declared using a string rather than a symbol. The following file task creates a executable program (named prog) given two object files name a.o and b.o.
lists: CLEAN and CLOBBER. • You can then add items to the file lists with expressions like CLEAN.include('*.o'). • Remember that the clean task removes everything in the clean list, and clobber removes everything in both lists.
project runs your test suite. • If you want to see how the rake tasks you enjoy with Rails are built search for .rake in the gem source. • Because as we all know, Rails is Magic!