26 Commits

Author SHA1 Message Date
Thibault Jouan
c8b685b8a3 Fix coding standards 2015-05-12 15:02:44 +00:00
Thibault Jouan
2363bfb62a Implement `set' task keyword 2015-04-06 12:39:09 +00:00
Thibault Jouan
433f830c54 Implement recipe arguments
CLI will stop arguments processing after the special `--' argument,
the rest will be saved in the env and accessible through a new task
keyword: `recipe_argv'.
2015-04-04 05:25:01 +00:00
Thibault Jouan
3b413a242f Implement `set?' task keyword:
When called from a task, will return true when given key exists and
false when key does not exist.
2014-11-18 16:48:11 +00:00
Thibault Jouan
86a84bbe12 Refactor with Forwardable module 2014-11-18 11:20:28 +00:00
Thibault Jouan
0ba12bfb90 Implement `yaml_write' action 2014-10-11 00:47:16 +00:00
Thibault Jouan
82879b56b4 Extract Task#template code in Template class 2014-10-10 16:36:06 +00:00
Thibault Jouan
6cd294a0b8 Implement `template' task keyword 2014-09-28 14:33:35 +00:00
Thibault Jouan
a7b2c4abea Implement `target' recipe keyword 2014-09-25 01:24:25 +00:00
Thibault Jouan
638f8320bc Implement nested tasks 2014-09-24 22:26:29 +00:00
Thibault Jouan
2c335b2437 Merge Task::DSL into Task 2014-09-22 19:43:36 +00:00
Thibault Jouan
2b86bbf112 Implement Task#to_s 2014-05-25 12:12:09 +00:00
Thibault Jouan
1d6ae126ed Modify task DSL API to take env on initialization 2014-01-08 22:11:30 +00:00
Thibault Jouan
e8be44d1f0 Implement `macro' recipe keyword 2013-12-20 23:19:16 +00:00
Thibault Jouan
43a781dc78 Remove Task::DSL.evaluate method 2013-12-20 11:43:18 +00:00
Thibault Jouan
9251c6af8e Improve coding standards 2013-12-20 06:46:28 +00:00
Thibault Jouan
639bdc1c73 Implement basic condition DSL framework for tests:
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.
2013-08-18 00:29:14 +00:00
Thibault Jouan
5a4c8c02bc Fix coding standards in Task class 2013-08-15 22:35:10 +00:00
Thibault Jouan
d4d5222261 Refactor task DSL usages:
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.
2013-08-15 22:28:16 +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
e6c14f1903 Implement basic task actions API:
* Add Action base class;
* Implement Task::DSL.define_action(keyword, klass);
* Add Task::DSL#actions accessor;
* Apply task DSL actions when Task instances are evaluated.
2013-08-04 20:30:54 +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
b1c99dbeeb Extract task DSL code and spec 2013-08-01 00:01:19 +00:00
Thibault Jouan
f6d9dd2c90 Change ConditionNotMetError superclass 2013-07-30 15:57:03 +00:00
Thibault Jouan
d146566411 Implement tasks condition feature 2013-07-28 22:56:08 +00:00
Thibault Jouan
baaa957e9e Implement task evaluation feature 2013-07-28 19:18:53 +00:00