Permalink
Browse files

[minor] Update file headers

  • Loading branch information...
1 parent a61e6be commit 877ef3b4f2aefc669bc2ea4f220930741a37ac60 @indexzero indexzero committed Oct 9, 2011
@@ -1,4 +1,11 @@
-
+/*
+ * adapter.js: Abstract base class used by foreverd service adapters
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
var Adapter = module.exports = function Adapter(service) {
this.service = service;
};
@@ -1 +1,9 @@
+/*
+ * index.js: Top-level include for the init.d foreverd service adapter.
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
module.exports = require('../systemv');
@@ -1,3 +1,11 @@
+/*
+ * index.js: Top-level include for the systemv foreverd service adapter
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
var fs = require('fs'),
util = require('util'),
path = require('path'),
@@ -1,3 +1,11 @@
+/*
+ * cli.js: Handlers for the foreverd CLI commands.
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
var optimist = require('optimist'),
forever = require('../forever'),
Service = require('./service'),
@@ -1,4 +1,11 @@
-
+/*
+ * index.js: Top-level include for the `forever.service` module.
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
var fs = require('fs'),
path = require('path');
@@ -1,3 +1,11 @@
+/*
+ * service.js: Object responsible for managing the foreverd daemon.
+ *
+ * (C) 2010 Charlie Robbins
+ * MIT LICENCE
+ *
+ */
+
var fs = require('fs'),
path = require('path'),
util = require('util'),
View
@@ -18,12 +18,12 @@ vows.describe('forever/spawn-options').addBatch({
"passing environment variables to env-vars.js": {
topic: function () {
var that = this, child;
-
+
this.env = {
- FOO: 'foo',
+ FOO: 'foo',
BAR: 'bar'
};
-
+
child = new (forever.Monitor)(path.join(__dirname, '..', 'examples', 'env-vars.js'), {
max: 1,
silent: true,
@@ -34,7 +34,7 @@ vows.describe('forever/spawn-options').addBatch({
child.on('stdout', function (data) {
that.stdout = data.toString();
});
-
+
child.on('exit', this.callback.bind({}, null));
child.start();
},
@@ -46,9 +46,9 @@ vows.describe('forever/spawn-options').addBatch({
"passing a custom cwd to custom-cwd.js": {
topic: function () {
var that = this, child;
-
+
this.cwd = path.join(__dirname, '..');
-
+
child = new (forever.Monitor)(path.join(__dirname, '..', 'examples', 'custom-cwd.js'), {
max: 1,
silent: true,
@@ -59,7 +59,7 @@ vows.describe('forever/spawn-options').addBatch({
child.on('stdout', function (data) {
that.stdout = data.toString();
});
-
+
child.on('exit', this.callback.bind({}, null));
child.start();
},
@@ -71,12 +71,12 @@ vows.describe('forever/spawn-options').addBatch({
"setting `hideEnv` when spawning all-env-vars.js": {
topic: function () {
var that = this, child;
-
+
this.hideEnv = [
'USER',
'OLDPWD'
];
-
+
child = new (forever.Monitor)(path.join(__dirname, '..', 'examples', 'all-env-vars.js'), {
max: 1,
silent: true,
@@ -87,13 +87,13 @@ vows.describe('forever/spawn-options').addBatch({
child.on('stdout', function (data) {
that.env = Object.keys(JSON.parse(data.toString()));
});
-
+
child.on('exit', this.callback.bind(this, null));
child.start();
},
"should hide the environment variables passed to the child": function (err, child) {
var that = this;
-
+
assert.equal(child.times, 1);
this.hideEnv.forEach(function (key) {
assert.isTrue(that.env.indexOf(key) === -1);
View
@@ -26,7 +26,7 @@ vows.describe('forever').addBatch({
assert.isTrue(child.silent);
assert.isFunction(child.start);
assert.isObject(child.data);
- assert.isFunction(child.stop);
+ assert.isFunction(child.stop);
},
"calling the restart() method in less than `minUptime`": {
topic: function (child) {
@@ -1,5 +1,5 @@
/*
- * forever-test.js: Tests for forever module
+ * multiple-processes-test.js: Tests for spawning multiple processes with forever
*
* (C) 2010 Charlie Robbins
* MIT LICENCE
@@ -18,20 +18,20 @@ vows.describe('forever/multiple-processes').addBatch({
topic: function () {
var that = this,
script = path.join(__dirname, '..', 'examples', 'server.js');
-
- this.child1 = new (forever.Monitor)(script, {
+
+ this.child1 = new (forever.Monitor)(script, {
silent: true,
maxRestart: 1,
- options: [ "--port=8080"]
+ options: [ "--port=8080"]
});
-
+
that.child1.on('start', function () {
- that.child2 = new (forever.Monitor)(script, {
+ that.child2 = new (forever.Monitor)(script, {
silent: true,
maxRestart: 1,
- options: [ "--port=8081"]
+ options: [ "--port=8081"]
});
-
+
that.child2.on('start', function () {
forever.startServer(that.child1, that.child2, function (err, server, socketPath) {
var socket = new net.Socket();
View
@@ -1,5 +1,5 @@
/*
- * forever-test.js: Tests for forever module
+ * service-test.js: Tests for the forever.service module
*
* (C) 2010 Charlie Robbins
* MIT LICENCE
@@ -18,7 +18,7 @@ vows.describe('forever/service').addBatch({
assert.isObject(forever.service);
assert.isFunction(forever.service.Service);
assert.isObject(forever.service.adapters);
- assert.isFunction(forever.service.adapters.initd)
+ assert.isFunction(forever.service.adapters.initd);
}
}
}
View
@@ -1,7 +1,7 @@
/*
- * watch-test.js
+ * watch-test.js: Tests for restarting forever processes when a file changes.
*
- * (C) 2010 and Charlie Robbins
+ * (C) 2010 Charlie Robbins
* MIT LICENSE
*
*/

0 comments on commit 877ef3b

Please sign in to comment.