27 Commits

Author SHA1 Message Date
Thibault Jouan
9bc5c2aeec Implement `composed_macro' recipe keyword 2014-10-02 03:20:12 +00:00
Thibault Jouan
b11d0b6950 Allow `target' recipe keyword to return target 2014-09-25 14:57:27 +00:00
Thibault Jouan
3dc414f188 Declare macro in tasks 2014-09-25 00:27:46 +00:00
Thibault Jouan
3b28045340 Merge Condition::DSL into Condition 2014-09-22 19:43:43 +00:00
Thibault Jouan
166dae681c Merge Recipe::DSL into Recipe 2014-09-22 19:43:30 +00:00
Thibault Jouan
edca69ffad Refactor Recipe specs:
* Use more classic specs for .evaluate_from_file;
* Fix coding standards.
2014-01-08 02:28:24 +00:00
Thibault Jouan
366c682152 Remove Recipe::DSL.evaluate method 2013-12-20 11:24:30 +00:00
Thibault Jouan
ef0307fbb5 Improve small details in specs:
* Fix coding standards;
* Simplify some expectations (eq instead of be matcher);
* Expect identity on block instead of calling;
* Change some before call as oneliners;
* Avoid shadowing variable names;
* Improve wording where needed.
2013-12-19 22:46:56 +00:00
Thibault Jouan
f0e144cebd Refactor and simplify recipe DSL evaluation usages:
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.
2013-08-14 19:48:43 +00:00
Thibault Jouan
0904fa1fc9 Implement Worker class:
* 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.
2013-08-10 14:47:02 +00:00
Thibault Jouan
22ae12185d Improve Recipe spec:
* Fix coding standards;
* Add spec for default assigned filepath;
* Add spec for #filepath accessor;
* Test object identity in #code spec.
2013-08-06 20:39:17 +00:00
Thibault Jouan
ace6a4ad2b Implement Task::DSL#evaluate:
So that the env is available from the task DSL.
2013-08-01 00:01:20 +00:00
Thibault Jouan
2939123574 Extract recipe DSL code and spec 2013-08-01 00:01:19 +00:00
Thibault Jouan
e12dd5c0e7 Implement recipe error reporting feature 2013-08-01 00:01:15 +00:00
Thibault Jouan
71ef5fcd29 Fix missing specs for Recipe#evaluate 2013-07-30 14:48:07 +00:00
Thibault Jouan
d199ba56fd Add Env class 2013-07-30 14:47:56 +00:00
Thibault Jouan
30e1930719 Implement Recipe::DSL#evaluate method:
Move recipe DSL evaluation in a dedicated #evaluate method, instead of
evaluating the code during the DSL instantiation.
2013-07-30 14:46:27 +00:00
Thibault Jouan
37e17d1030 Implement Recipe#filepath method:
Returns the filepath of the recipe when it is built from a file.
2013-07-30 14:46:27 +00:00
Thibault Jouan
0ac6217245 Improve Recipe::DSL#task spec readability 2013-07-30 14:46:01 +00:00
Thibault Jouan
080ef063c0 Improve recipe spec:
* Use explicit named subject for Recipe::DSL;
* Fix Recipe::DSL#source example description.
2013-07-30 14:35:52 +00:00
Thibault Jouan
16134bf827 Fix incorrect class name in recipe spec 2013-07-28 22:03:01 +00:00
Thibault Jouan
00f6284a2d Fix wrong method name in recipe spec 2013-07-28 21:54:37 +00:00
Thibault Jouan
baaa957e9e Implement task evaluation feature 2013-07-28 19:18:53 +00:00
Thibault Jouan
c7295fb977 Implement source keyword feature for recipes 2013-07-28 18:38:00 +00:00
Thibault Jouan
8e4f670fbf Introduce Recipe::DSL to eval recipe DSL code 2013-07-28 18:08:16 +00:00
Thibault Jouan
e5d5fc0a41 Refactor recipe spec 2013-07-28 16:11:12 +00:00
Thibault Jouan
0921be9ab0 Implement recipe evaluation feature 2013-07-27 18:20:45 +00:00