diff --git a/.gitignore b/.gitignore index 9ea0f13..6f00a62 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/node_modules .* -!.gitignore +!.gitignore \ No newline at end of file diff --git a/new/.gitignore b/new/.gitignore deleted file mode 100644 index 6f00a62..0000000 --- a/new/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/node_modules -.* -!.gitignore \ No newline at end of file diff --git a/new/README.md b/new/README.md deleted file mode 100644 index be64bc2..0000000 --- a/new/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -
-     _ __ ___   __ _ ___ ___  ___  _ __  
-    | '_ ` _ \ / _` / __/ __|/ _ \| '_ \ 
-    | | | | | | (_| \__ \__ \ (_) | | | |
-    |_| |_| |_|\__,_|___/___/\___/|_| |_| New BSD License
-
- -Masson is a configuration management and orchestration tools. It is here to -simplify your life installing complex setup and maintaining dozens, hundreds, -or even thousands of servers. - -At [Adaltas], we use it to deploy full featured Hadoop Clusters. - -Installation ------------- - -Run `npm install` to download the project dependencies. - -Usage ------ - -The script `./bin/masson` is used to pilot the various command. Run it without -any arguments to print the help page or as `./bin/big help {command}` to obtain -help for a particular command. - -Contributors ------------- - -* David Worms: - -[Adaltas]: http://www.adaltas.com \ No newline at end of file diff --git a/new/package.json b/new/package.json deleted file mode 100644 index 3b14901..0000000 --- a/new/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "masson", - "version": "0.0.5", - "description": "Module execution engine for cluster deployments.", - "homepage": "https://github.com/wdavidw/node-masson", - "bugs": "https://github.com/wdavidw/node-masson/issues", - "author": "David Worms ", - "repository": { - "type": "git", - "url": "git://github.com/wdavidw/node-masson.git" - }, - "dependencies": { - "each": "latest", - "mecano": "latest", - "pad": "latest", - "parameters": "latest", - "superexec": "latest", - "ssh2": "latest" - }, - "devDependencies": { - "coffee-script": "latest", - "mocha": "latest", - "should": "latest" - }, - "bin" : { - "masson" : "./bin/masson" - }, - "main": "./lib" -} \ No newline at end of file diff --git a/package.json b/package.json index dce8a23..3b14901 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,29 @@ -{ "name": "masson" -, "version": "0.0.4" -, "description": "Build system and targeted workflow" -, "author": "David Worms " -, "main": "./lib/masson" -, "engines": { "node": ">= 0.1.90" } +{ + "name": "masson", + "version": "0.0.5", + "description": "Module execution engine for cluster deployments.", + "homepage": "https://github.com/wdavidw/node-masson", + "bugs": "https://github.com/wdavidw/node-masson/issues", + "author": "David Worms ", + "repository": { + "type": "git", + "url": "git://github.com/wdavidw/node-masson.git" + }, + "dependencies": { + "each": "latest", + "mecano": "latest", + "pad": "latest", + "parameters": "latest", + "superexec": "latest", + "ssh2": "latest" + }, + "devDependencies": { + "coffee-script": "latest", + "mocha": "latest", + "should": "latest" + }, + "bin" : { + "masson" : "./bin/masson" + }, + "main": "./lib" } \ No newline at end of file diff --git a/readme.md b/readme.md index 809ec2e..be64bc2 100644 --- a/readme.md +++ b/readme.md @@ -1,132 +1,32 @@
-            _ __ ___   __ _ ___ ___  ___  _ __  
-           | '_ ` _ \ / _` / __/ __|/ _ \| '_ \ 
-           | | | | | | (_| \__ \__ \ (_) | | | |
-           |_| |_| |_|\__,_|___/___/\___/|_| |_| New BSD License
+     _ __ ___   __ _ ___ ___  ___  _ __  
+    | '_ ` _ \ / _` / __/ __|/ _ \| '_ \ 
+    | | | | | | (_| \__ \__ \ (_) | | | |
+    |_| |_| |_|\__,_|___/___/\___/|_| |_| New BSD License
 
-Masson is similar to tools like Make, Ant or Rake. It provides a simple workflow system where a target may be called along with others target it depends on. +Masson is a configuration management and orchestration tools. It is here to +simplify your life installing complex setup and maintaining dozens, hundreds, +or even thousands of servers. -Masson provide the following functionnalities: +At [Adaltas], we use it to deploy full featured Hadoop Clusters. -* fully asynch, call the out method when you done with a rule -* evented by extending the Node EventEmitter -* flexible by providing alternative configuration to feet your style -* tested (using Expresso) -* arguments transmission between targets - -Masson by example ----------------- - -Choose your style.. - - #!/usr/bin/env node - var masson = require('masson'); - - masson() - .task( 'build', [ 'prepare', 'clean' ], function(){ - this.out(); - }) - .task( 'prepare', function(){ - this.out(); - }) - .task( 'clean', function(){ - var self = this; - setTimeout(function(){ - /* do some cleaning */ - self.out(); - },1000); - }) - .run('build'); - -..could be rewritten (and mixed) as - - #!/usr/bin/env node - var masson = require('masson'); - - masson([{ - target: 'build', - depends: [ 'prepare', 'clean' ], - callback: function(){ - this.out(); - } - },{ - target: 'prepare', - callback: function(){ - /* do some setup */ - this.out(); - } - },{ - target: 'clean', - callback: function(){ - var self = this; - setTimeout(function(){ - /* do some cleaning */ - self.out(); - },1000); - } - }],'build'); - -..could be rewritten (and mixed) as - - #!/usr/bin/env node - var masson = require('masson'); - - masson({ - build : function(){ - this.in([ 'prepare', 'clean' ],function(){ - /* do something */ - }); - }, - prepare : function(){ - /* do some setup */ - this.out(); - }, - clean : function(){ - /* do some cleaning */ - this.out(); } - }).run('build'); - -Using Masson +Installation ------------ -When you require Masson as `var masson = require('masson');`, you receive a function. Simply call it with the following arguments: - -* array or object configuration (see the two styles above) -* optional target to execute (save the pain of calling `my_masson.run('my target')` -* optional argument to pass to the executed target +Run `npm install` to download the project dependencies. -Listening to events -------------------- +Usage +----- -Masson extends Node EventEmitter class and emits 3 events: "before", "after" and "error". Not rocket science but if you want to look at its behavior, almost all the tests use it. +The script `./bin/masson` is used to pilot the various command. Run it without +any arguments to print the help page or as `./bin/big help {command}` to obtain +help for a particular command. -Passing arguments ------------------ - -Arguments may be transfered from parent to dependencies and from dependencies to parent callbacks. - -The `in` method may receive an array of paramenters as a second argument, after the target(s). The same array will be available to all targets. The `out` method may also receive an array of parameter as its first argument and the parent will get as first parameter and error and for the following one as many parameter as there were child targets to call. I'm aware for not being clear but you can take a look at the test in `test/testArguments.js`. - -Running the tests ------------------ - -Tests are executed with expresso. To install it, simple use `npm install expresso`. - -To run the tests - expresso -I lib test/* - -To develop with the tests watching at your changes - expresso -w -I lib test/* - -To instrument the tests - expresso -I lib --cov test/* - -Related projects ----------------- +Contributors +------------ -* Matthew Eernisse "Node Jake": -* James Coglan's "Jake": -* 280 North's Jake: +* David Worms: +[Adaltas]: http://www.adaltas.com \ No newline at end of file