Skip to content

Commit

Permalink
Rename cli options
Browse files Browse the repository at this point in the history
  • Loading branch information
mnort9 committed Aug 17, 2015
1 parent a46337a commit 32b95a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/goosecon.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ var argv = require('yargs')
.option('mongo-db', {
describe: 'MongoDB URL'
})
.option('models-path', {
.option('models-dir', {
describe: 'Path to models directory'
})
.option('mongoose-path', {
.option('mongoose-dir', {
describe: 'Path to mongoose'
})
.help('h')
Expand All @@ -27,7 +27,7 @@ var argv = require('yargs')
// Override options
var config = rc('goosecon', {}, argv);

var mongoosePath = config.mongoosePath ? path.resolve(process.cwd() + config.mongoosePath) : 'mongoose';
var mongoosePath = config.mongooseDir ? path.resolve(process.cwd() + config.mongooseDir) : 'mongoose';
var mongoose = require(mongoosePath);
var replServer;

Expand Down Expand Up @@ -99,7 +99,7 @@ function loadModules() {
}

function findModels() {
var modelsPath = config.modelsPath;
var modelsPath = config.modelsDir;
var files;

if (!modelsPath) {
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('goosecon', function() {
var filePath = path.resolve(__dirname + '/../bin/goosecon.js');

before(function() {
replServer = spawn('node', [filePath, '--mongo-db', 'mongodb://localhost/test', '--models-path', './test/models', '--modules', './test/modules']);
replServer = spawn('node', [filePath, '--mongo-db', 'mongodb://localhost/test', '--models-dir', './test/models', '--modules', './test/modules']);

var result = '';
var err = '';
Expand Down

0 comments on commit 32b95a1

Please sign in to comment.