Skip to content

Commit 5ba969b

Browse files
committed
* 'master' of https://github.com/DaftMonk/generator-angular-fullstack: docs(gen:readme): update david-dm badge URLs docs(gen:readme): switch travis badge to codeship badge fix(navbar): fix controller constructor with ng-route + auth docs(changelog): remove extra `# 3.0.0` 3.0.2 docs(changelog): 3.0.1 & 3.0.2 refactor(gen:endpoint): code style / slight refactor fix(api:user): remove `password` before sending user objects instead of `hashedPassword` Conflicts: app/templates/server/api/user(auth)/user.controller.js
2 parents 237e3c2 + 9d2a779 commit 5ba969b

File tree

6 files changed

+39
-34
lines changed

6 files changed

+39
-34
lines changed

Diff for: CHANGELOG.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1+
<a name="3.0.2"></a>
2+
## [3.0.2](https://github.com/DaftMonk/generator-angular-fullstack/compare/3.0.1...3.0.2) (2015-12-05)
3+
4+
5+
### Bug Fixes
6+
7+
* **api:user:** remove `password` before sending user objects instead of `hashedPassword` ([c08bd95](https://github.com/DaftMonk/generator-angular-fullstack/commit/c08bd95)), closes [#1459](https://github.com/DaftMonk/generator-angular-fullstack/issues/1459)
8+
* **client:auth:** remove decorator logic ([3229acd](https://github.com/DaftMonk/generator-angular-fullstack/commit/3229acd)), closes [#1455](https://github.com/DaftMonk/generator-angular-fullstack/issues/1455)
9+
10+
<a name="3.0.1"></a>
11+
## [3.0.1](https://github.com/DaftMonk/generator-angular-fullstack/compare/3.0.0...3.0.1) (2015-12-04)
12+
13+
14+
This version just changes the recommended Node version to ^4.2.3, since it fixes some vulnerabilities. Also, the Travis-CI config has been changed to loosely test Node 5.1.1 instead of 5.0.0.
15+
16+
117
<a name="3.0.0"></a>
218
# [3.0.0](https://github.com/DaftMonk/generator-angular-fullstack/compare/2.1.1...3.0.0) (2015-12-06)
319

4-
# 3.0.0
5-
620
### New Features
721

822
* **Sequelize** - You can now choose between MongoDB + Mongoose or SQLite3 + Sequelize

Diff for: app/templates/client/components/navbar/navbar.controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class NavbarController {
1010
isCollapsed = true;
1111
//end-non-standard
1212

13-
constructor(<% if(!filters.uirouter) { %>$location<% } %><% if (filters.auth) { %>Auth<% } %>) {<% if(!filters.uirouter) { %>
13+
constructor(<% if(!filters.uirouter) { %>$location<% } if(!filters.uirouter && filters.auth) { %>, <% } if (filters.auth) { %>Auth<% } %>) {<% if(!filters.uirouter) { %>
1414
this.$location = $location;<% } %>
1515
<% if (filters.auth) { %>this.isLoggedIn = Auth.isLoggedIn;
1616
this.isAdmin = Auth.isAdmin;

Diff for: app/templates/server/api/user(auth)/user.controller.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function respondWith(res, statusCode) {
3232
* restriction: 'admin'
3333
*/
3434
export function index(req, res) {
35-
<% if (filters.mongooseModels) { %>User.findAsync({}, '-salt -hashedPassword')<% }
35+
<% if (filters.mongooseModels) { %>User.findAsync({}, '-salt -password')<% }
3636
if (filters.sequelizeModels) { %>User.findAll({
3737
attributes: [
3838
'_id',
@@ -139,7 +139,7 @@ export function changePassword(req, res, next) {
139139
export function me(req, res, next) {
140140
var userId = req.user._id;
141141

142-
<% if (filters.mongooseModels) { %>User.findOneAsync({ _id: userId }, '-salt -hashedPassword')<% }
142+
<% if (filters.mongooseModels) { %>User.findOneAsync({ _id: userId }, '-salt -password')<% }
143143
if (filters.sequelizeModels) { %>User.find({
144144
where: {
145145
_id: userId

Diff for: endpoint/generator.js

+16-25
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default class Generator extends NamedBase {
3232

3333
prompting() {
3434
var done = this.async();
35-
var promptCb = function (props) {
35+
var promptCb = (props) => {
3636
if(props.route.charAt(0) !== '/') {
3737
props.route = '/' + props.route;
3838
}
@@ -49,7 +49,7 @@ export default class Generator extends NamedBase {
4949
this.filters[props.models + 'Models'] = true;
5050
}
5151
done();
52-
}.bind(this);
52+
};
5353

5454
if (this.options.route) {
5555
if (this.filters.mongoose && this.filters.sequelize) {
@@ -76,27 +76,19 @@ export default class Generator extends NamedBase {
7676
name = name + 's';
7777
}
7878

79-
var self = this;
80-
var prompts = [
81-
{
82-
name: 'route',
83-
message: 'What will the url of your endpoint be?',
84-
default: base + name
85-
},
86-
{
87-
type: 'list',
88-
name: 'models',
89-
message: 'What would you like to use for the endpoint\'s models?',
90-
choices: [ 'Mongoose', 'Sequelize' ],
91-
default: self.filters.sequelizeModels ? 1 : 0,
92-
filter: function( val ) {
93-
return val.toLowerCase();
94-
},
95-
when: function() {
96-
return self.filters.mongoose && self.filters.sequelize;
97-
}
98-
}
99-
];
79+
var prompts = [{
80+
name: 'route',
81+
message: 'What will the url of your endpoint be?',
82+
default: base + name
83+
}, {
84+
type: 'list',
85+
name: 'models',
86+
message: 'What would you like to use for the endpoint\'s models?',
87+
choices: [ 'Mongoose', 'Sequelize' ],
88+
default: this.filters.sequelizeModels ? 1 : 0,
89+
filter: (val) => val.toLowerCase(),
90+
when: () => this.filters.mongoose && this.filters.sequelize
91+
}];
10092

10193
this.prompt(prompts, promptCb);
10294
}
@@ -141,8 +133,7 @@ export default class Generator extends NamedBase {
141133

142134
if (this.filters.sequelize && this.config.get('insertModels')) {
143135
var modelsFile = this.config.get('registerModelsFile');
144-
var reqPath = this.relativeRequire(this.routeDest + '/' + this.basename +
145-
'.model', modelsFile);
136+
var reqPath = this.relativeRequire(this.routeDest + '/' + this.basename + '.model', modelsFile);
146137
var modelConfig = {
147138
file: modelsFile,
148139
needle: this.config.get('modelsNeedle'),

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-angular-fullstack",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node",
55
"keywords": [
66
"yeoman-generator",

Diff for: readme.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# AngularJS Full-Stack generator
2-
[![Build Status](https://travis-ci.org/DaftMonk/generator-angular-fullstack.svg?branch=master)](http://travis-ci.org/DaftMonk/generator-angular-fullstack)
2+
![Build Status](https://codeship.com/projects/26128390-800a-0133-c5f7-6a23b0487a18/status?branch=master)
33
[![npm version](https://badge.fury.io/js/generator-angular-fullstack.svg)](http://badge.fury.io/js/generator-angular-fullstack)
4-
[![Dependency Status](https://david-dm.org/daftmonk/generator-angular-fullstack.svg)](https://david-dm.org/daftmonk/generator-angular-fullstack)
5-
[![Dev-Dependency Status](https://david-dm.org/daftmonk/generator-angular-fullstack/dev-status.svg)](https://david-dm.org/daftmonk/generator-angular-fullstack#info=devDependencies)
4+
[![Dependency Status](https://david-dm.org/angular-fullstack/generator-angular-fullstack.svg)](https://david-dm.org/angular-fullstack/generator-angular-fullstack)
5+
[![Dev-Dependency Status](https://david-dm.org/angular-fullstack/generator-angular-fullstack/dev-status.svg)](https://david-dm.org/angular-fullstack/generator-angular-fullstack#info=devDependencies)
66
[![Gitter chat](https://badges.gitter.im/DaftMonk/generator-angular-fullstack.svg)](https://gitter.im/DaftMonk/generator-angular-fullstack)
77
> Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node - lets you quickly set up a project following best practices.
88

0 commit comments

Comments
 (0)