Skip to content

Commit

Permalink
chore(package): update yeoman-generator to version 0.23.3
Browse files Browse the repository at this point in the history
* chore(package): update yeoman-generator to version 0.23.3

https://greenkeeper.io/

* fix tests

* test on stable travis

* only test on stable
  • Loading branch information
greenkeeperio-bot authored and Alex Van Camp committed May 14, 2016
1 parent 6520fa3 commit c83e3dd
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 25 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
sudo: false
language: node_js
node_js:
- v4
- v5
- stable

after_success: npm run coveralls

Expand Down
18 changes: 7 additions & 11 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var parseAuthor = require('parse-author');

module.exports = yeoman.Base.extend({
constructor: function () {
yeoman.generators.Base.apply(this, arguments);
yeoman.Base.apply(this, arguments);

this.option('editorconfig', {
type: Boolean,
Expand All @@ -24,9 +24,7 @@ module.exports = yeoman.Base.extend({

initializing: function () {
// Have Yeoman greet the user.
this.log(yosay(
'Welcome to the ' + chalk.red('NodeCG bundle') + ' generator!'
));
this.log(yosay('Welcome to the ' + chalk.red('NodeCG bundle') + ' generator!'));

this.pkg = this.fs.readJSON(this.destinationPath('package.json'), {});

Expand All @@ -52,19 +50,16 @@ module.exports = yeoman.Base.extend({

prompting: {
askForModuleName: function () {
var done = this.async();

askName({
return askName({
name: 'name',
message: 'Your bundle Name',
default: _.kebabCase(path.basename(process.cwd())),
filter: _.kebabCase,
validate: function (str) {
return str.length > 0;
}
}, this, function (name) {
}, this).then(function ({name}) {
this.props.name = name;
done();
}.bind(this));
},

Expand Down Expand Up @@ -122,7 +117,7 @@ module.exports = yeoman.Base.extend({
type: 'confirm'
}];

this.prompt(prompts, function (props) {
this.prompt(prompts).then(function (props) {
this.props = extend(this.props, props);
done();
}.bind(this));
Expand All @@ -139,7 +134,7 @@ module.exports = yeoman.Base.extend({
name: 'githubAccount',
message: 'GitHub username or organization',
default: username
}, function (prompt) {
}).then(function (prompt) {
this.props.githubAccount = prompt.githubAccount;
done();
}.bind(this));
Expand Down Expand Up @@ -198,6 +193,7 @@ module.exports = yeoman.Base.extend({

default: function () {
if (path.basename(this.destinationPath()) !== this.props.name) {
console.log(this.props.name);
this.log(
'Your bundle must be inside a folder named ' + this.props.name + '\n' +
'I\'ll automatically create this folder.'
Expand Down
2 changes: 1 addition & 1 deletion generators/extension/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = yeoman.Base.extend({
default: 'file'
}];

this.prompt(prompts, function (props) {
this.prompt(prompts).then(function (props) {
this.props = extend(this.props, props);
done();
}.bind(this));
Expand Down
2 changes: 1 addition & 1 deletion generators/graphic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = yeoman.Base.extend({
default: false
}];

this.prompt(prompts, function (props) {
this.prompt(prompts).then(function (props) {
this.props = extend(this.props, props);
done();
}.bind(this));
Expand Down
4 changes: 2 additions & 2 deletions generators/panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = yeoman.Base.extend({
filter: _.kebabCase
}];

this.prompt(prompts, function (props) {
this.prompt(prompts).then(function (props) {
this.props = extend(this.props, props);
done();
}.bind(this));
Expand Down Expand Up @@ -94,7 +94,7 @@ module.exports = yeoman.Base.extend({
}
}];

this.prompt(prompts, function (props) {
this.prompt(prompts).then(function (props) {
this.props = extend(this.props, props);
done();
}.bind(this));
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
"generator-node": "^1.8.3",
"git-config": "0.0.7",
"github-username": "^2.1.0",
"inquirer-npm-name": "^1.0.0",
"inquirer-npm-name": "^2.0.0",
"lodash": "^4.10.0",
"mkdirp": "^0.5.1",
"parse-author": "^1.0.0",
"yeoman-generator": "^0.22.5",
"yeoman-generator": "^0.23.3",
"yosay": "^1.0.2"
},
"devDependencies": {
Expand All @@ -43,6 +43,7 @@
"gulp-nsp": "^2.1.0",
"gulp-plumber": "^1.0.0",
"mockery": "^1.4.0",
"npm-name": "^3.0.0",
"yeoman-assert": "^2.0.0",
"yeoman-test": "^1.0.0"
},
Expand All @@ -52,7 +53,10 @@
"mocha": true
}
},
"repository": "nodecg/generator-nodecg",
"repository": {
"type": "git",
"url": "https://github.com/nodecg/generator-nodecg.git"
},
"scripts": {
"prepublish": "gulp prepublish",
"test": "gulp",
Expand Down
10 changes: 5 additions & 5 deletions test/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ describe('nodecg:app', function () {
warnOnUnregistered: false
});

mockery.registerMock('npm-name', function (name, cb) {
cb(null, true);
mockery.registerMock('npm-name', function () {
return new Promise(function (resolve) {
resolve(true);
});
});

mockery.registerMock('github-username', function (name, cb) {
Expand Down Expand Up @@ -49,9 +51,7 @@ describe('nodecg:app', function () {
});

it('creates files', function () {
assert.file([
'README.md'
]);
assert.file(['README.md']);
});

it('creates package.json', function () {
Expand Down

0 comments on commit c83e3dd

Please sign in to comment.