Skip to content

Commit

Permalink
Update to new version
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed Oct 7, 2014
1 parent 281d056 commit 927e2e3
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
node_modules/
temp/
test/temp
.idea/
28 changes: 14 additions & 14 deletions app/templates/_package.json
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions app/templates/app/controllers/errors.server.controller.js
Expand Up @@ -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;
Expand All @@ -22,7 +22,7 @@ var getUniqueErrorMessage = function(err) {
*/
exports.getErrorMessage = function(err) {
var message = '';

if (err.code) {
switch (err.code) {
case 11000:
Expand Down
Expand Up @@ -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');

Expand Down Expand Up @@ -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([

Expand Down Expand Up @@ -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');
});
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion 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: [
Expand Down
4 changes: 2 additions & 2 deletions app/templates/config/strategies/local.js
Expand Up @@ -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'
});
}

Expand Down
25 changes: 13 additions & 12 deletions app/templates/gruntfile.js
Expand Up @@ -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'],
Expand Down Expand Up @@ -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: {
Expand All @@ -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.
Expand All @@ -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']);
};
};
Expand Up @@ -33,7 +33,7 @@ <h3 class="col-md-12 text-center">Or with your account</h3>
<button type="submit" class="btn btn-primary">Sign in</button>&nbsp; or&nbsp;
<a href="/#!/signup">Sign up</a>
</div>
<div class "forgot-password">
<div class="forgot-password">
<a href="/#!/password/forgot">Forgot your password?</a>
</div>
<div data-ng-show="error" class="text-center text-danger">
Expand Down
2 changes: 1 addition & 1 deletion 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",
Expand Down

0 comments on commit 927e2e3

Please sign in to comment.