Skip to content

Commit

Permalink
Add jshint stuff and cleanup jshint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tlovett1 committed Feb 17, 2015
1 parent 819f0c0 commit 82366ca
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions .jshintignore
@@ -0,0 +1 @@
node_modules
3 changes: 3 additions & 0 deletions .jshintrc
@@ -0,0 +1,3 @@
{
"node": true
}
15 changes: 8 additions & 7 deletions lib/command.js
Expand Up @@ -35,17 +35,17 @@ var processArgs = function() {
global.testArgs = argv;

if (argv['du-verbose']) {
config.verbose = true;
global.config.verbose = true;
}

if (argv._.length) {
config.path = argv._[0];
delete testArgs._[0];
global.config.path = argv._[0];
delete global.testArgs._[0];
}

for (var key in testArgs) {
if (key !== '_' && typeof defaultArgs[key] !== 'undefined') {
delete testArgs[key];
for (var key in global.testArgs) {
if (key !== '_' && typeof global.defaultArgs[key] !== 'undefined') {
delete global.testArgs[key];
}
}
};
Expand All @@ -54,10 +54,11 @@ var processArgs = function() {
* Main script command
*/
exports.execute = function() {
var json;
processArgs();

try {
var json = JSON.parse(fs.readFileSync(config.path + '/Dockunit.json', 'utf8'));
json = JSON.parse(fs.readFileSync(global.config.path + '/Dockunit.json', 'utf8'));
} catch (exception) {
console.log('Could not parse Dockunit.json');
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion lib/container.js
Expand Up @@ -64,7 +64,7 @@ Container.prototype.run = function() {
}

});
}
};

runBeforeScript();

Expand Down
4 changes: 2 additions & 2 deletions lib/containers.js
Expand Up @@ -12,7 +12,7 @@ var Containers = function(containersArray) {
this.containers = [];

for (var i = 0; i < containersArray.length; i++) {
this.containers.push(new Container(containersArray[i]))
this.containers.push(new Container(containersArray[i]));
}
};

Expand All @@ -23,7 +23,7 @@ Containers.prototype.run = function() {
for (var i = 0; i < this.containers.length; i++) {
this.containers[i].run();
}
}
};


exports.containers = Containers;

0 comments on commit 82366ca

Please sign in to comment.