Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"single"
],
"no-trailing-spaces": 2,
"comma-spacing": [
"error",
{ "before": false, "after": true }
],
"eqeqeq": [
"error",
"always"
Expand Down
4 changes: 2 additions & 2 deletions bin/citgm-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if (!citgm.windows) {
var uidnumber = require('uid-number');
var uid = app.uid || process.getuid();
var gid = app.gid || process.getgid();
uidnumber(uid,gid, function(err, uid, gid) {
uidnumber(uid, gid, function(err, uid, gid) {
options.uid = uid;
options.gid = gid;
launch(options);
Expand Down Expand Up @@ -114,7 +114,7 @@ function runCitgm (mod, name, next) {
log.info('starting', name);
}).on('fail', function(err) {
log.error('failure', err.message);
}).on('data', function(type,key,message) {
}).on('data', function(type, key, message) {
log[type](key, message);
}).on('end', function(result) {
result.duration = new Date() - start;
Expand Down
4 changes: 2 additions & 2 deletions lib/citgm.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function find(app, context, next) {
});
}

function init(context,next) {
function init(context, next) {
// Script is passed as an option to citgm, but it needs to also apply to the
// single module that citgm is testing.
if (context.options.script) {
Expand All @@ -57,7 +57,7 @@ function init(context,next) {
context.emit('data', 'verbose', context.module.name + ' using-gid', context.options.gid);
}
context.emit('data', 'silly', context.module.name + ' init-detail', context.module);
next(null,context); // inject the context
next(null, context); // inject the context
}

function sha1(mod) {
Expand Down
8 changes: 4 additions & 4 deletions lib/lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ function makeUrl(repo, spec, tags, prefix, sha) {
// if necessary
function getRepo(repo, meta) {
var ret = normgit(repo || meta.repository.url).url;
ret = ret.replace(/\.git$/,'');
ret = ret.replace(/^git:/,'https:');
ret = ret.replace(/\.git$/, '');
ret = ret.replace(/^git:/, 'https:');
ret = ret.replace(/^ssh:\/\/git@/, 'https://');
return ret;
}
Expand Down Expand Up @@ -64,7 +64,7 @@ function resolve(context, next) {
return;
}
var detail = context.module;
context.emit('data','info','lookup',detail.name);
context.emit('data', 'info', 'lookup', detail.name);
var meta = context.meta;
if (meta) {
var rep = lookup[detail.name];
Expand Down Expand Up @@ -109,7 +109,7 @@ function resolve(context, next) {
}
}

next(null,context);
next(null, context);
}

module.exports = resolve;
Expand Down
2 changes: 1 addition & 1 deletion lib/match-conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (fs.existsSync('/etc/os-release')) {
release = execSync('sw_vers -productVersion').toString() || '';
} else if (platform === 'aix' ) {
release = execSync('oslevel').toString() || '';
release = release.replace(/(\r\n|\n|\r)/gm,'') || '';
release = release.replace(/(\r\n|\n|\r)/gm, '') || '';
}

var endian = process.config.variables.node_byteorder || '';
Expand Down
2 changes: 1 addition & 1 deletion lib/npm/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function test(context, next) {
}
var wd = path.join(context.path, context.module.name);
context.emit('data', 'info', context.module.name + ' npm:', 'test suite started');
readPackage(path.join(wd,'package.json'),false,function(err,data) {
readPackage(path.join(wd, 'package.json'), false, function(err, data) {
if (err) {
next(new Error('Package.json Could not be found'));
return;
Expand Down
4 changes: 2 additions & 2 deletions lib/out.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ logger.add(logger.transports.Console, {
function output(tag, message, dest) {
var obj;
if (typeof message === 'object') {
obj = JSON.stringify(message,null,2);
obj = JSON.stringify(message, null, 2);
message = '';
}
var msg = columnify(
[{tag:tag,message:message}],
[{tag:tag, message:message}],
{
showHeaders: false,
maxLineWidth: 'auto',
Expand Down
2 changes: 1 addition & 1 deletion lib/unpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function unpack(context, next) {
var gzip = zlib.createGunzip();
var inp = fs.createReadStream(context.unpack);
var out = tar.Extract({
path: path.join(context.path,context.module.name),
path: path.join(context.path, context.module.name),
strip: 1
});
var res = inp.pipe(gzip).pipe(out);
Expand Down