Skip to content

Commit 507e45a

Browse files
committed
Merge branch 'master' of https://github.com/DaftMonk/generator-angular-fullstack into fix/remove-oauth-code
Conflicts: app/templates/server/config/_local.env.js
2 parents 316bd9d + cb866d1 commit 507e45a

File tree

13 files changed

+81
-45
lines changed

13 files changed

+81
-45
lines changed

Diff for: CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
<a name="v2.0.5"></a>
2+
### v2.0.5 (2014-07-17)
3+
4+
#### Bug Fixes
5+
6+
* **account:** add authentication requirement for settings view ([9105c0fd](http://github.com/DaftMonk/generator-angular-fullstack/commit/9105c0fdbabdbde68fb6cf0fe0d6993ead6e7095), closes [#327](http://github.com/DaftMonk/generator-angular-fullstack/issues/327))
7+
* **app:**
8+
* use correct path for font awesome and glyphicons ([1917ba31](http://github.com/DaftMonk/generator-angular-fullstack/commit/1917ba31264fc90bea0fce36b8d144f897e8bf08))
9+
* wait for currentUser to resolve before checking if logged in on route changes ([6d6090d9](http://github.com/DaftMonk/generator-angular-fullstack/commit/6d6090d9c4dcd5d8a1f6ecb2cf5dc0bb4c8598fe))
10+
* bootstrap glyphicons not correctly linked on grunt build ([53d193d0](http://github.com/DaftMonk/generator-angular-fullstack/commit/53d193d011c7c1ea8c9477e8f17ad56cc4214362))
11+
* **dependencies:** include certain dependencies only when answering yes to their respective prompts ([040c57de](http://github.com/DaftMonk/generator-angular-fullstack/commit/040c57de8689f2e0fc35410d0b6935363aaa8458))
12+
* **server:**
13+
* fix seeding of db in test mode causing tests to randomly fail ([05f7f433](http://github.com/DaftMonk/generator-angular-fullstack/commit/05f7f43372bc3bd54bead811952b775adeec1f05))
14+
* make user tests run more consistently ([addb5061](http://github.com/DaftMonk/generator-angular-fullstack/commit/addb5061f62696c7a0078a8d2c7443d428e69376))
15+
* warnings that express was using deprecated features ([8dc2f1e4](http://github.com/DaftMonk/generator-angular-fullstack/commit/8dc2f1e48503c27cbd2aac3c455adac7781a6539))
16+
* missing `res` param for handleError ([eb7d50c8](http://github.com/DaftMonk/generator-angular-fullstack/commit/eb7d50c8d27820a6b26caf2a1aaa0e4fa8eee367))
17+
18+
#### Features
19+
20+
* **app:**
21+
* added oath buttons to signup page ([a408f58e](http://github.com/DaftMonk/generator-angular-fullstack/commit/a408f58edb923cd14bf7c7b3411b874dce5f0724))
22+
* upgrade socket.io to use v1.0.6
23+
* **gen:**
24+
* add option for Stylus as a preprocessor ([1b90c448](http://github.com/DaftMonk/generator-angular-fullstack/commit/1b90c448fbf374287fe07f782f9788dfb9a23613))
25+
* make bootstrap and bootstrap ui optional ([f50d0942](http://github.com/DaftMonk/generator-angular-fullstack/commit/f50d094226fdbf6a7e65ba3783a26efc8544ba08))
26+
127
<a name="v2.0.4"></a>
228
### v2.0.4 (2014-07-08)
329

Diff for: Gruntfile.js

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ module.exports = function (grunt) {
2525
options: {
2626
files: ['CHANGELOG.md']
2727
}
28+
},
29+
jshint: {
30+
options: {
31+
curly: false,
32+
node: true
33+
},
34+
all: ['Gruntfile.js', '*/index.js']
2835
}
2936
});
3037

Diff for: app/index.js

+19-19
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
104104
this.filters[answers.markup] = true;
105105
this.filters[answers.stylesheet] = true;
106106
this.filters[answers.router] = true;
107-
this.filters['bootstrap'] = answers.bootstrap;
108-
this.filters['uibootstrap'] = answers.uibootstrap;
107+
this.filters.bootstrap = answers.bootstrap;
108+
this.filters.uibootstrap = answers.uibootstrap;
109109
cb();
110110
}.bind(this));
111111
},
@@ -162,9 +162,9 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
162162
},
163163
default: true
164164
}], function (answers) {
165-
if(answers.socketio) this.filters['socketio'] = true;
166-
if(answers.mongoose) this.filters['mongoose'] = true;
167-
if(answers.auth) this.filters['auth'] = true;
165+
if(answers.socketio) this.filters.socketio = true;
166+
if(answers.mongoose) this.filters.mongoose = true;
167+
if(answers.auth) this.filters.auth = true;
168168
if(answers.oauth) {
169169
if(answers.oauth.length) this.filters['oauth'] = true;
170170
answers.oauth.forEach(function(oauthStrategy) {
@@ -199,16 +199,16 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
199199
var extensions = [];
200200
var filters = [];
201201

202-
if(this.filters['ngroute']) filters.push('ngroute');
203-
if(this.filters['uirouter']) filters.push('uirouter');
204-
if(this.filters['coffee']) extensions.push('coffee');
205-
if(this.filters['js']) extensions.push('js');
206-
if(this.filters['html']) extensions.push('html');
207-
if(this.filters['jade']) extensions.push('jade');
208-
if(this.filters['css']) extensions.push('css');
209-
if(this.filters['stylus']) extensions.push('styl');
210-
if(this.filters['sass']) extensions.push('scss');
211-
if(this.filters['less']) extensions.push('less');
202+
if(this.filters.ngroute) filters.push('ngroute');
203+
if(this.filters.uirouter) filters.push('uirouter');
204+
if(this.filters.coffee) extensions.push('coffee');
205+
if(this.filters.js) extensions.push('js');
206+
if(this.filters.html) extensions.push('html');
207+
if(this.filters.jade) extensions.push('jade');
208+
if(this.filters.css) extensions.push('css');
209+
if(this.filters.stylus) extensions.push('styl');
210+
if(this.filters.sass) extensions.push('scss');
211+
if(this.filters.less) extensions.push('less');
212212

213213
this.composeWith('ng-component', {
214214
options: {
@@ -234,10 +234,10 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
234234
"'ngResource'",
235235
"'ngSanitize'"
236236
];
237-
if(this.filters['ngroute']) angModules.push("'ngRoute'");
238-
if(this.filters['socketio']) angModules.push("'btford.socket-io'");
239-
if(this.filters['uirouter']) angModules.push("'ui.router'");
240-
if(this.filters['uibootstrap']) angModules.push("'ui.bootstrap'");
237+
if(this.filters.ngroute) angModules.push("'ngRoute'");
238+
if(this.filters.socketio) angModules.push("'btford.socket-io'");
239+
if(this.filters.uirouter) angModules.push("'ui.router'");
240+
if(this.filters.uibootstrap) angModules.push("'ui.bootstrap'");
241241

242242
this.angularModules = "\n " + angModules.join(",\n ") +"\n";
243243
},

Diff for: app/templates/Gruntfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ module.exports = function (grunt) {
316316

317317
// Allow the use of non-minsafe AngularJS files. Automatically makes it
318318
// minsafe compatible so Uglify does not destroy the ng references
319-
ngmin: {
319+
ngAnnotate: {
320320
dist: {
321321
files: [{
322322
expand: true,
@@ -782,7 +782,7 @@ module.exports = function (grunt) {
782782
'autoprefixer',
783783
'ngtemplates',
784784
'concat',
785-
'ngmin',
785+
'ngAnnotate',
786786
'copy:dist',
787787
'cdnify',
788788
'cssmin',

Diff for: app/templates/_package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"grunt-contrib-less": "^0.11.0",<% } %>
4848
"grunt-google-cdn": "~0.4.0",
4949
"grunt-newer": "~0.7.0",
50-
"grunt-ngmin": "~0.0.3",
50+
"grunt-ng-annotate": "^0.2.3",
5151
"grunt-rev": "~0.1.0",
5252
"grunt-svgmin": "~0.4.0",
5353
"grunt-usemin": "~2.1.1",

Diff for: app/templates/client/app/app(stylus).styl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@import "bootstrap/dist/css/bootstrap.css"
21
@import "font-awesome/css/font-awesome.css"
2+
<% if(filters.bootstrap) { %>@import "bootstrap/dist/css/bootstrap.css"
33

44
//
55
// Bootstrap Fonts
@@ -12,7 +12,7 @@
1212
url('../bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'),
1313
url('../bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'),
1414
url('../bower_components/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
15-
15+
<% } %>
1616
//
1717
// Font Awesome Fonts
1818
//

Diff for: app/templates/server/config/_local.env.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
// This file should not be tracked by git.
77

88
module.exports = {
9+
DOMAIN: 'http://localhost:9000',
910
SESSION_SECRET: "<%= _.slugify(appname) + '-secret' %>",<% if (filters.facebookAuth) { %>
10-
FACEBOOK_ID: "app-id",
11-
FACEBOOK_SECRET: "secret",<% } if (filters.twitterAuth) { %>
12-
TWITTER_ID: "app-id",
13-
TWITTER_SECRET: "secret",<% } if (filters.googleAuth) { %>
14-
GOOGLE_ID: "app-id",
15-
GOOGLE_SECRET: "secret",<% } %>
11+
FACEBOOK_ID: 'app-id',
12+
FACEBOOK_SECRET: 'secret',<% } if (filters.twitterAuth) { %>
13+
TWITTER_ID: 'app-id',
14+
TWITTER_SECRET: 'secret',<% } if (filters.googleAuth) { %>
15+
GOOGLE_ID: 'app-id',
16+
GOOGLE_SECRET: 'secret',<% } %>
1617
// Control debug level for modules using visionmedia/debug
17-
DEBUG: ""
18+
DEBUG: ''
1819
};

Diff for: app/templates/server/config/environment/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ var all = {
4444
facebook: {
4545
clientID: process.env.FACEBOOK_ID || 'id',
4646
clientSecret: process.env.FACEBOOK_SECRET || 'secret',
47-
callbackURL: 'http://localhost:9000/auth/facebook/callback'
47+
callbackURL: process.env.DOMAIN + '/auth/facebook/callback'
4848
},
4949
<% } %><% if(filters.twitterAuth) { %>
5050
twitter: {
5151
clientID: process.env.TWITTER_ID || 'id',
5252
clientSecret: process.env.TWITTER_SECRET || 'secret',
53-
callbackURL: 'http://localhost:9000/auth/twitter/callback'
53+
callbackURL: process.env.DOMAIN + '/auth/twitter/callback'
5454
},
5555
<% } %><% if(filters.googleAuth) { %>
5656
google: {
5757
clientID: process.env.GOOGLE_ID || 'id',
5858
clientSecret: process.env.GOOGLE_SECRET || 'secret',
59-
callbackURL: 'http://localhost:9000/auth/google/callback'
59+
callbackURL: process.env.DOMAIN + '/auth/google/callback'
6060
}<% } %>
6161
};
6262

Diff for: app/templates/server/config/socketio(socketio).js

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ module.exports = function (socketio) {
3838
// }));
3939

4040
socketio.on('connection', function (socket) {
41-
socket.address = socket.handshake.address.address + ':' +
42-
socket.handshake.address.port;
41+
socket.address = socket.handshake.address !== null ?
42+
socket.handshake.address.address + ':' + socket.handshake.address.port :
43+
process.env.DOMAIN;
44+
4345
socket.connectedAt = new Date();
4446

4547
// Call onDisconnect.

Diff for: endpoint/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,26 @@ Generator.prototype.askFor = function askFor() {
4545

4646
Generator.prototype.registerEndpoint = function registerEndpoint() {
4747
if(this.config.get('insertRoutes')) {
48-
var config = {
48+
var routeConfig = {
4949
file: this.config.get('registerRoutesFile'),
5050
needle: this.config.get('routesNeedle'),
5151
splicable: [
5252
"app.use(\'" + this.route +"\', require(\'./api/" + this.name + "\'));"
5353
]
5454
};
55-
ngUtil.rewriteFile(config);
55+
ngUtil.rewriteFile(routeConfig);
5656
}
5757

5858
if (this.filters.socketio) {
5959
if(this.config.get('insertSockets')) {
60-
var config = {
60+
var socketConfig = {
6161
file: this.config.get('registerSocketsFile'),
6262
needle: this.config.get('socketsNeedle'),
6363
splicable: [
6464
"require(\'../api/" + this.name + '/' + this.name + ".socket\').register(socket);"
6565
]
6666
};
67-
ngUtil.rewriteFile(config);
67+
ngUtil.rewriteFile(socketConfig);
6868
}
6969
}
7070
};

Diff for: endpoint/templates/name.controller.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ exports.create = function(req, res) {
3333
exports.update = function(req, res) {
3434
if(req.body._id) { delete req.body._id; }
3535
<%= classedName %>.findById(req.params.id, function (err, <%= name %>) {
36-
if (err) { return handleError(err); }
36+
if (err) { return handleError(res, err); }
3737
if(!<%= name %>) { return res.send(404); }
3838
var updated = _.merge(<%= name %>, req.body);
3939
updated.save(function (err) {
40-
if (err) { return handleError(err); }
40+
if (err) { return handleError(res, err); }
4141
return res.json(200, <%= name %>);
4242
});
4343
});

Diff for: openshift/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Generator.prototype.rhcAppShow = function rhcAppShow() {
105105
this.abort = true;
106106
}
107107
// No remote found
108-
else if (!stdout.search('not found.') >= 0) {
108+
else if (stdout.search('not found.') < 0) {
109109
console.log('No existing app found.');
110110
}
111111
// Error

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-angular-fullstack",
3-
"version": "2.0.4",
3+
"version": "2.0.5",
44
"description": "Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node",
55
"keywords": [
66
"yeoman-generator",
@@ -38,7 +38,7 @@
3838
"chai": "^1.9.1",
3939
"fs-extra": "^0.9.1",
4040
"grunt": "~0.4.1",
41-
"grunt-contrib-jshint": "~0.7.2",
41+
"grunt-contrib-jshint": "^0.10.0",
4242
"grunt-conventional-changelog": "~1.0.0",
4343
"grunt-release": "~0.6.0",
4444
"load-grunt-tasks": "~0.2.0",

0 commit comments

Comments
 (0)