diff --git a/.gitignore b/.gitignore index 4227a71..2511131 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ temp/ test/temp +.idea/ \ No newline at end of file diff --git a/app/templates/_package.json b/app/templates/_package.json index fa25251..b3467fc 100755 --- a/app/templates/_package.json +++ b/app/templates/_package.json @@ -13,13 +13,13 @@ "postinstall": "bower install --config.interactive=false" }, "dependencies": { - "express": "~4.7.2", - "express-session": "~1.7.2", - "body-parser": "~1.5.2", + "express": "~4.9.5", + "express-session": "~1.8.2", + "body-parser": "~1.9.0", "cookie-parser": "~1.3.2", - "compression": "~1.0.9", - "method-override": "~2.1.2", - "morgan": "~1.2.2", + "compression": "~1.1.0", + "method-override": "~2.2.0", + "morgan": "~1.3.2", "connect-mongo": "~0.4.1", "connect-flash": "~0.1.1", "helmet": "~0.4.0", @@ -39,23 +39,23 @@ "grunt-cli": "~0.1.13", "glob": "~4.0.5", "async": "~0.9.0", - "nodemailer": "~1.1.1" + "nodemailer": "~1.3.0" }, "devDependencies": { - "supertest": "~0.13.0", + "supertest": "~0.14.0", "should": "~4.0.4", "grunt-env": "~0.4.1", "grunt-node-inspector": "~0.1.3", "grunt-contrib-watch": "~0.6.1", "grunt-contrib-jshint": "~0.10.0", - "grunt-contrib-csslint": "^0.2.0", - "grunt-ngmin": "0.0.3", - "grunt-contrib-uglify": "~0.5.1", + "grunt-contrib-csslint": "^0.3.1", + "grunt-ng-annotate": "~0.4.0", + "grunt-contrib-uglify": "~0.6.0", "grunt-contrib-cssmin": "~0.10.0", "grunt-nodemon": "~0.3.0", - "grunt-concurrent": "~0.5.0", - "grunt-mocha-test": "~0.11.0", - "grunt-karma": "~0.8.2", + "grunt-concurrent": "~1.0.0", + "grunt-mocha-test": "~0.12.1", + "grunt-karma": "~0.9.0", "load-grunt-tasks": "~0.6.0", "karma": "~0.12.0", "karma-jasmine": "~0.2.1", diff --git a/app/templates/app/controllers/errors.server.controller.js b/app/templates/app/controllers/errors.server.controller.js index e4604f8..5e1462c 100644 --- a/app/templates/app/controllers/errors.server.controller.js +++ b/app/templates/app/controllers/errors.server.controller.js @@ -8,10 +8,10 @@ var getUniqueErrorMessage = function(err) { try { var fieldName = err.err.substring(err.err.lastIndexOf('.$') + 2, err.err.lastIndexOf('_1')); - output = fieldName.charAt(0).toUpperCase() + fieldName.slice(1) + ' already exist'; + output = fieldName.charAt(0).toUpperCase() + fieldName.slice(1) + ' already exists'; } catch(ex) { - output = 'Unique field already exist'; + output = 'Unique field already exists'; } return output; @@ -22,7 +22,7 @@ var getUniqueErrorMessage = function(err) { */ exports.getErrorMessage = function(err) { var message = ''; - + if (err.code) { switch (err.code) { case 11000: diff --git a/app/templates/app/controllers/users/users.password.server.controller.js b/app/templates/app/controllers/users/users.password.server.controller.js index f5b1a6b..00d4ffa 100644 --- a/app/templates/app/controllers/users/users.password.server.controller.js +++ b/app/templates/app/controllers/users/users.password.server.controller.js @@ -10,7 +10,6 @@ var _ = require('lodash'), User = mongoose.model('User'), config = require('../../../config/config'), nodemailer = require('nodemailer'), - crypto = require('crypto'), async = require('async'), crypto = require('crypto'); @@ -112,7 +111,6 @@ exports.validateResetToken = function(req, res) { exports.reset = function(req, res, next) { // Init Variables var passwordDetails = req.body; - var message = null; async.waterfall([ @@ -176,7 +174,7 @@ exports.reset = function(req, res, next) { subject: 'Your password has been changed', html: emailHTML }; - + smtpTransport.sendMail(mailOptions, function(err) { done(err, 'done'); }); @@ -189,10 +187,9 @@ exports.reset = function(req, res, next) { /** * Change Password */ -exports.changePassword = function(req, res, next) { +exports.changePassword = function(req, res) { // Init Variables var passwordDetails = req.body; - var message = null; if (req.user) { if (passwordDetails.newPassword) { diff --git a/app/templates/config/env/_production.js b/app/templates/config/env/_production.js index b47fefc..2c2d875 100644 --- a/app/templates/config/env/_production.js +++ b/app/templates/config/env/_production.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/<%= slugifiedAppName %>', + db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/<%= slugifiedAppName %>', assets: { lib: { css: [ diff --git a/app/templates/config/strategies/local.js b/app/templates/config/strategies/local.js index 5471473..7101cac 100644 --- a/app/templates/config/strategies/local.js +++ b/app/templates/config/strategies/local.js @@ -22,12 +22,12 @@ module.exports = function() { } if (!user) { return done(null, false, { - message: 'Unknown user' + message: 'Unknown user or invalid password' }); } if (!user.authenticate(password)) { return done(null, false, { - message: 'Invalid password' + message: 'Unknown user or invalid password' }); } diff --git a/app/templates/gruntfile.js b/app/templates/gruntfile.js index ca48bbd..ab24301 100644 --- a/app/templates/gruntfile.js +++ b/app/templates/gruntfile.js @@ -3,7 +3,7 @@ module.exports = function(grunt) { // Unified Watch Object var watchFiles = { - serverViews: ['app/views/**/*.*'], + serverViews: ['app/views/**/*.*'], serverJS: ['gruntfile.js', 'server.js', 'config/**/*.js', 'app/**/*.js'], clientViews: ['public/modules/**/views/**/*.html'], clientJS: ['public/js/*.js', 'public/modules/**/*.js'], @@ -105,18 +105,19 @@ module.exports = function(grunt) { } } }, - ngmin: { - production: { - files: { - 'public/dist/application.js': '<%= applicationJavaScriptFiles %>' - } - } - }, + ngAnnotate: { + production: { + files: { + 'public/dist/application.js': '<%= applicationJavaScriptFiles %>' + } + } + }, concurrent: { default: ['nodemon', 'watch'], debug: ['nodemon', 'watch', 'node-inspector'], options: { - logConcurrentOutput: true + logConcurrentOutput: true, + limit: 10 } }, env: { @@ -138,7 +139,7 @@ module.exports = function(grunt) { } }); - // Load NPM tasks + // Load NPM tasks require('load-grunt-tasks')(grunt); // Making grunt default to force in order not to break the project. @@ -163,8 +164,8 @@ module.exports = function(grunt) { grunt.registerTask('lint', ['jshint', 'csslint']); // Build task(s). - grunt.registerTask('build', ['lint', 'loadConfig', 'ngmin', 'uglify', 'cssmin']); + grunt.registerTask('build', ['lint', 'loadConfig', 'ngAnnotate', 'uglify', 'cssmin']); // Test task. grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']); -}; \ No newline at end of file +}; diff --git a/app/templates/public/modules/users/views/authentication/signin.client.view.html b/app/templates/public/modules/users/views/authentication/signin.client.view.html index 1a1768e..91e256e 100644 --- a/app/templates/public/modules/users/views/authentication/signin.client.view.html +++ b/app/templates/public/modules/users/views/authentication/signin.client.view.html @@ -33,7 +33,7 @@

Or with your account

  or  Sign up -
+
Forgot your password?
diff --git a/package.json b/package.json index 322619c..bfdfdef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-meanjs", - "version": "0.1.9", + "version": "0.1.10", "description": "MEAN.JS Official Yeoman Generator", "main": "app/index.js", "repository": "meanjs/generator-meanjs",