Thibault Jouan
31b9e68026
Improve Env#initialize spec:
...
Test that #current_recipe returns exactly the assigned recipe
(argument given to the constructor).
2013-08-06 20:07:39 +00:00
Thibault Jouan
863155b61d
Improve wording in Env#initialize spec
2013-08-06 20:06:05 +00:00
Thibault Jouan
883d4f2e7e
Fix coding standards in remote spec
2013-08-06 20:02:27 +00:00
Thibault Jouan
9285a951c7
Add missing spec for CLI#initialize
2013-08-06 20:02:23 +00:00
Thibault Jouan
779eb72c32
Improve wording in CLI#arguments spec
2013-08-06 19:41:48 +00:00
Thibault Jouan
bd1bdba9cf
Fix CLI#evaluate_recipe_file spec:
...
The spec wasn't covering the case when recipe evaluation raises an
unexpected error.
2013-08-06 19:38:33 +00:00
Thibault Jouan
eaccf55581
Improve CLI spec:
...
Test #arguments accessor instead of testing the constructor.
2013-08-06 19:17:22 +00:00
Thibault Jouan
889ddf84e4
Fix Action#env spec:
...
Test that we get the exact assigned object, instead of just testing
equality.
2013-08-06 19:11:29 +00:00
Thibault Jouan
580ad66bab
Use new rspec metadata arguments as symbol
2013-08-06 18:34:53 +00:00
Thibault Jouan
cff122432b
Refactor Net::SSH spec helpers definition and usages
2013-08-06 17:29:45 +00:00
Thibault Jouan
5d9a5f1f57
Simplify spec helper:
...
Move specific exception `SomeErrorInRecipe' in the only spec where it
is used.
2013-08-06 17:13:41 +00:00
Thibault Jouan
9875a4ae7b
Make remote available to env
2013-08-05 20:05:58 +00:00
Thibault Jouan
ace5bfb3fa
Add basic Remote#execute implementation
2013-08-05 20:03:13 +00:00
Thibault Jouan
6e1ba269eb
Implement Remote class
2013-08-05 19:58:17 +00:00
Thibault Jouan
ad63164d60
Fix coding standards in Env spec
2013-08-05 14:32:23 +00:00
Thibault Jouan
0cccbc8dde
Add Env#output with $stdout as default
2013-08-04 21:29:13 +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
8e455fc4d5
Improve Env constructor
2013-08-04 15:45:08 +00:00
Thibault Jouan
a3bba6d4da
Implement target recipe keyword feature
2013-08-03 23:42:47 +00:00
Thibault Jouan
a6e27edfd2
Add env recipe keyword feature
2013-08-03 23:42:41 +00:00
Thibault Jouan
d677c3aa97
Improve exceptions usage in specs:
...
* Throw symbols instead of raising exceptions to test code evaluation,
this will reduce "bad" usages of exceptions, symbols seems a little
better for now;
* Add a specific exception to be used in specs for testing behaviour
when an exception is raised from a recipe.
2013-08-01 23:23:49 +00:00
Thibault Jouan
c3737e738e
Refactor trap_exit spec helper usages
2013-08-01 22:51:41 +00:00
Thibault Jouan
c4fc9828db
Improve error reporting during recipe evaluation
...
* 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.
2013-08-01 20:31:39 +00:00
Thibault Jouan
836f9ffc29
Replaces Proc.new usages with proc keyword
2013-08-01 18:33:18 +00:00
Thibault Jouan
57ff1c73be
Change "wording" in Recipe::DSL#evaluate spec
2013-08-01 17:18:15 +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
a45a340b64
Improve some context descriptions in specs
2013-08-01 00:01:20 +00:00
Thibault Jouan
0aa043b61a
Remove host argument:
...
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.
2013-08-01 00:01:20 +00:00
Thibault Jouan
2acb57254f
Fix a few coding standards issues:
...
* Remove extra empty lines before private keyword usages.
specs:
* Fix one long line;
* use proc keyword instead of Proc.new.
2013-08-01 00:01:20 +00:00
Thibault Jouan
3792f60a5c
Improve source recipe keyword feature:
...
* Improve error reporting from sourced recipe;
* Extract cucumber feature from recipe one.
2013-08-01 00:01:19 +00:00
Thibault Jouan
b1c99dbeeb
Extract task DSL code and spec
2013-08-01 00:01:19 +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
a1e92893ad
Refactor CLI#run! method
2013-07-30 15:19:34 +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
c642584c95
Fix task DSL spec:
...
* Use explicit named subject;
* Fix description for Task::DSL#condition when condition is not met.
2013-07-30 14:36:33 +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
ead09c2118
Test exact exit status in CLI spec
2013-07-28 23:25:58 +00:00
Thibault Jouan
d146566411
Implement tasks condition feature
2013-07-28 22:56:08 +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