Add the necessary API so that we can implement new tests easily as new
standalone classes.
In Condition::DSL:
* Add #tests accessor;
* Modify constructor so that it accepts the env;
* Implement .define_test(keyword, class) method.
Instead of interrupting task evaluation when condition is not met,
allow the whole task to be evaluated (including condition and
evaluation) so that the interpreter will get all tasks actions (whether
condition is met or not) and be able to query the condition.
* Modify Interpreter#process_task: test if task condition is met before
applying the actions;
* Implement condition handling in Task and Task::DSL;
* Implement Condition and Condition::DSL (useless as they are, but
needed to implement later test keywords as part of the condition DSL.
Remove most of task evaluation code from Task class, rely on
Task::DSL.evaluate to get an evaluated task.
* Task: remove #evaluate, change constructor prototype to accept actions
instead of a block, implement .evaluate(name, env &block);
* Implement Task::DSL.evaluate method;
* Recipe::DSL: remove tasks evaluation from#evaluate, modify #task to
use Task.evaluate to return the new task to be rigstered.
Remove most of recipe evaluation code in Recipe class, and rely on
Recipe::DSL to get evaluated recipes.
* Remove Recipe#evaluate call from CLI, rely on
Recipe.evaluate_from_file to get the evaluated recipe;
* Implement Recipe.evaluate_from_file(filepath, env);
* Implement Recipe::DSL.evaluate(code, env);
* Remove code and filepath accessor on Recipe;
* Remove Recipe.from_file and Recipe#evaluate methods;
* Move task evaluations in Recipe::DSL#evaluate;
* Modify Recipe constructor so that it accepts tasks as argument.
* Move recipe processing code in the worker;
* Refactor CLI and use the the worker;
* Implement Recipe#tasks and remove tasks application during evaluation,
tasks are now applied by the worker after all evaluations are done.
* Report invalid action usages from tasks;
* Implement backtrace cleaning in CLI;
* Extract error class declarations in a new errors file;
* Replace raise with fail keyword in task DSL class.
Currently the idea is to later implement a -h (or -t) option to the
command, and/or a `target' recipe keyword. Another option might be to
use the target/host key when the key/value registry will be implemented
and made available to the recipe and task DSLs.