Skip to content

Commit

Permalink
[minor] Update file headers
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Oct 9, 2011
1 parent a61e6be commit 877ef3b
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 26 deletions.
9 changes: 8 additions & 1 deletion lib/forever/service/adapters/adapter.js
@@ -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;
};
Expand Down
8 changes: 8 additions & 0 deletions lib/forever/service/adapters/initd/index.js
@@ -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');
8 changes: 8 additions & 0 deletions lib/forever/service/adapters/systemv/index.js
@@ -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'),
Expand Down
8 changes: 8 additions & 0 deletions lib/forever/service/cli.js
@@ -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'),
Expand Down
9 changes: 8 additions & 1 deletion lib/forever/service/index.js
@@ -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');

Expand Down
8 changes: 8 additions & 0 deletions lib/forever/service/service.js
@@ -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'),
Expand Down
22 changes: 11 additions & 11 deletions test/env-spawn-test.js
Expand Up @@ -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,
Expand All @@ -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();
},
Expand All @@ -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,
Expand All @@ -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();
},
Expand All @@ -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,
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/forever-test.js
Expand Up @@ -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) {
Expand Down
16 changes: 8 additions & 8 deletions test/multiple-processes-test.js
@@ -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
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions test/service-test.js
@@ -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
Expand All @@ -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);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/watch-test.js
@@ -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
*
*/
Expand Down

0 comments on commit 877ef3b

Please sign in to comment.