From 78f28081d1af41b18a702e66bb5a1970b22222c7 Mon Sep 17 00:00:00 2001 From: Trey Hunner Date: Sat, 7 Feb 2015 12:31:07 -0800 Subject: [PATCH] Add newlines to ends of files --- Dockerfile | 2 +- app/controllers/articles.server.controller.js | 2 +- app/controllers/core.server.controller.js | 2 +- app/controllers/errors.server.controller.js | 2 +- app/controllers/users.server.controller.js | 2 +- .../users/users.authentication.server.controller.js | 4 ++-- app/controllers/users/users.password.server.controller.js | 4 ++-- app/controllers/users/users.profile.server.controller.js | 2 +- app/models/article.server.model.js | 2 +- app/models/user.server.model.js | 2 +- app/routes/articles.server.routes.js | 2 +- app/routes/core.server.routes.js | 2 +- app/routes/users.server.routes.js | 2 +- app/tests/article.server.model.test.js | 2 +- app/tests/article.server.routes.test.js | 6 +++--- app/tests/user.server.model.test.js | 2 +- app/views/404.server.view.html | 2 +- app/views/500.server.view.html | 2 +- app/views/layout.server.view.html | 2 +- .../templates/reset-password-confirm-email.server.view.html | 2 +- app/views/templates/reset-password-email.server.view.html | 2 +- bower.json | 2 +- config/config.js | 4 ++-- config/env/all.js | 6 +++--- config/env/secure.js | 2 +- config/env/test.js | 2 +- config/init.js | 2 +- config/logger.js | 2 +- config/passport.js | 4 ++-- config/strategies/facebook.js | 2 +- config/strategies/github.js | 2 +- config/strategies/google.js | 2 +- config/strategies/linkedin.js | 2 +- config/strategies/local.js | 2 +- config/strategies/twitter.js | 2 +- fig.yml | 2 +- server.js | 2 +- 37 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Dockerfile b/Dockerfile index 96dc98b13a..de61a99205 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,4 +26,4 @@ ENV NODE_ENV development # Port 3000 for server # Port 35729 for livereload EXPOSE 3000 35729 -CMD ["grunt"] \ No newline at end of file +CMD ["grunt"] diff --git a/app/controllers/articles.server.controller.js b/app/controllers/articles.server.controller.js index 8eb757bc1b..c431fd3276 100644 --- a/app/controllers/articles.server.controller.js +++ b/app/controllers/articles.server.controller.js @@ -117,4 +117,4 @@ exports.hasAuthorization = function(req, res, next) { }); } next(); -}; \ No newline at end of file +}; diff --git a/app/controllers/core.server.controller.js b/app/controllers/core.server.controller.js index f2af8e1f7a..5dfdd5e494 100644 --- a/app/controllers/core.server.controller.js +++ b/app/controllers/core.server.controller.js @@ -8,4 +8,4 @@ exports.index = function(req, res) { user: req.user || null, request: req }); -}; \ No newline at end of file +}; diff --git a/app/controllers/errors.server.controller.js b/app/controllers/errors.server.controller.js index 41078b4d3a..5944d786af 100644 --- a/app/controllers/errors.server.controller.js +++ b/app/controllers/errors.server.controller.js @@ -39,4 +39,4 @@ exports.getErrorMessage = function(err) { } return message; -}; \ No newline at end of file +}; diff --git a/app/controllers/users.server.controller.js b/app/controllers/users.server.controller.js index 64e772e9a7..06ef00ea31 100755 --- a/app/controllers/users.server.controller.js +++ b/app/controllers/users.server.controller.js @@ -13,4 +13,4 @@ module.exports = _.extend( require('./users/users.authorization.server.controller'), require('./users/users.password.server.controller'), require('./users/users.profile.server.controller') -); \ No newline at end of file +); diff --git a/app/controllers/users/users.authentication.server.controller.js b/app/controllers/users/users.authentication.server.controller.js index c15c8a117c..d34642b5b6 100644 --- a/app/controllers/users/users.authentication.server.controller.js +++ b/app/controllers/users/users.authentication.server.controller.js @@ -24,7 +24,7 @@ exports.signup = function(req, res) { user.provider = 'local'; user.displayName = user.firstName + ' ' + user.lastName; - // Then save the user + // Then save the user user.save(function(err) { if (err) { return res.status(400).send({ @@ -203,4 +203,4 @@ exports.removeOAuthProvider = function(req, res, next) { } }); } -}; \ No newline at end of file +}; diff --git a/app/controllers/users/users.password.server.controller.js b/app/controllers/users/users.password.server.controller.js index 63c20b5d61..e246baed8f 100644 --- a/app/controllers/users/users.password.server.controller.js +++ b/app/controllers/users/users.password.server.controller.js @@ -12,7 +12,7 @@ var _ = require('lodash'), nodemailer = require('nodemailer'), async = require('async'), crypto = require('crypto'); - + var smtpTransport = nodemailer.createTransport(config.mailer.options); /** @@ -142,7 +142,7 @@ exports.reset = function(req, res, next) { if (err) { res.status(400).send(err); } else { - // Return authenticated user + // Return authenticated user res.json(user); done(err, user); diff --git a/app/controllers/users/users.profile.server.controller.js b/app/controllers/users/users.profile.server.controller.js index dd38936fce..8e438f7c17 100644 --- a/app/controllers/users/users.profile.server.controller.js +++ b/app/controllers/users/users.profile.server.controller.js @@ -53,4 +53,4 @@ exports.update = function(req, res) { */ exports.me = function(req, res) { res.json(req.user || null); -}; \ No newline at end of file +}; diff --git a/app/models/article.server.model.js b/app/models/article.server.model.js index 3f6fd0df1f..f2b89db815 100644 --- a/app/models/article.server.model.js +++ b/app/models/article.server.model.js @@ -31,4 +31,4 @@ var ArticleSchema = new Schema({ } }); -mongoose.model('Article', ArticleSchema); \ No newline at end of file +mongoose.model('Article', ArticleSchema); diff --git a/app/models/user.server.model.js b/app/models/user.server.model.js index 840464af0a..66d31bf6f5 100755 --- a/app/models/user.server.model.js +++ b/app/models/user.server.model.js @@ -143,4 +143,4 @@ UserSchema.statics.findUniqueUsername = function(username, suffix, callback) { }); }; -mongoose.model('User', UserSchema); \ No newline at end of file +mongoose.model('User', UserSchema); diff --git a/app/routes/articles.server.routes.js b/app/routes/articles.server.routes.js index 7d840e6fc2..9a93d05985 100644 --- a/app/routes/articles.server.routes.js +++ b/app/routes/articles.server.routes.js @@ -19,4 +19,4 @@ module.exports = function(app) { // Finish by binding the article middleware app.param('articleId', articles.articleByID); -}; \ No newline at end of file +}; diff --git a/app/routes/core.server.routes.js b/app/routes/core.server.routes.js index 1db9d40074..7138822689 100644 --- a/app/routes/core.server.routes.js +++ b/app/routes/core.server.routes.js @@ -4,4 +4,4 @@ module.exports = function(app) { // Root routing var core = require('../../app/controllers/core.server.controller'); app.route('/').get(core.index); -}; \ No newline at end of file +}; diff --git a/app/routes/users.server.routes.js b/app/routes/users.server.routes.js index 3120e9abb6..a3005346d8 100644 --- a/app/routes/users.server.routes.js +++ b/app/routes/users.server.routes.js @@ -54,4 +54,4 @@ module.exports = function(app) { // Finish by binding the user middleware app.param('userId', users.userByID); -}; \ No newline at end of file +}; diff --git a/app/tests/article.server.model.test.js b/app/tests/article.server.model.test.js index e3dd60c889..ee5fd067b5 100644 --- a/app/tests/article.server.model.test.js +++ b/app/tests/article.server.model.test.js @@ -61,4 +61,4 @@ describe('Article Model Unit Tests:', function() { User.remove().exec(); done(); }); -}); \ No newline at end of file +}); diff --git a/app/tests/article.server.routes.test.js b/app/tests/article.server.routes.test.js index 34255f5e18..a1622d414c 100644 --- a/app/tests/article.server.routes.test.js +++ b/app/tests/article.server.routes.test.js @@ -116,7 +116,7 @@ describe('Article CRUD tests', function() { .end(function(articleSaveErr, articleSaveRes) { // Set message assertion (articleSaveRes.body.message).should.match('Title cannot be blank'); - + // Handle article save error done(articleSaveErr); }); @@ -250,7 +250,7 @@ describe('Article CRUD tests', function() { }); it('should not be able to delete an article if not signed in', function(done) { - // Set article user + // Set article user article.user = user; // Create new article model instance @@ -277,4 +277,4 @@ describe('Article CRUD tests', function() { Article.remove().exec(); done(); }); -}); \ No newline at end of file +}); diff --git a/app/tests/user.server.model.test.js b/app/tests/user.server.model.test.js index 7369d41464..63983d1a15 100644 --- a/app/tests/user.server.model.test.js +++ b/app/tests/user.server.model.test.js @@ -72,4 +72,4 @@ describe('User Model Unit Tests:', function() { User.remove().exec(); done(); }); -}); \ No newline at end of file +}); diff --git a/app/views/404.server.view.html b/app/views/404.server.view.html index 0074fa456d..404076174c 100644 --- a/app/views/404.server.view.html +++ b/app/views/404.server.view.html @@ -5,4 +5,4 @@

Page Not Found

 	{{url}} is not a valid path.
 
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/views/500.server.view.html b/app/views/500.server.view.html index 8e6711b72a..cc3b14785c 100644 --- a/app/views/500.server.view.html +++ b/app/views/500.server.view.html @@ -5,4 +5,4 @@

Server Error

 	{{error}}
 
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/views/layout.server.view.html b/app/views/layout.server.view.html index 220a2003e9..6ab58911e5 100644 --- a/app/views/layout.server.view.html +++ b/app/views/layout.server.view.html @@ -76,4 +76,4 @@

Hello there!

- \ No newline at end of file + diff --git a/app/views/templates/reset-password-confirm-email.server.view.html b/app/views/templates/reset-password-confirm-email.server.view.html index 626ddc3fa4..bfbcb157fc 100644 --- a/app/views/templates/reset-password-confirm-email.server.view.html +++ b/app/views/templates/reset-password-confirm-email.server.view.html @@ -10,4 +10,4 @@

The {{appName}} Support Team

- \ No newline at end of file + diff --git a/app/views/templates/reset-password-email.server.view.html b/app/views/templates/reset-password-email.server.view.html index 262edf0020..4869dfd859 100644 --- a/app/views/templates/reset-password-email.server.view.html +++ b/app/views/templates/reset-password-email.server.view.html @@ -15,4 +15,4 @@

The {{appName}} Support Team

- \ No newline at end of file + diff --git a/bower.json b/bower.json index a49e03392d..51e865536a 100644 --- a/bower.json +++ b/bower.json @@ -11,6 +11,6 @@ "angular-bootstrap": "~0.11.2", "angular-bootstrap": "~0.12.0", "angular-ui-utils": "~0.1.1", - "angular-ui-router": "~0.2.11" + "angular-ui-router": "~0.2.11" } } diff --git a/config/config.js b/config/config.js index 3baa02e552..ef4a4c2c30 100644 --- a/config/config.js +++ b/config/config.js @@ -27,7 +27,7 @@ module.exports.getGlobbedFiles = function(globPatterns, removeRoot) { // The output array var output = []; - // If glob pattern is array so we use each pattern in a recursive way, otherwise we use glob + // If glob pattern is array so we use each pattern in a recursive way, otherwise we use glob if (_.isArray(globPatterns)) { globPatterns.forEach(function(globPattern) { output = _.union(output, _this.getGlobbedFiles(globPattern, removeRoot)); @@ -73,4 +73,4 @@ module.exports.getJavaScriptAssets = function(includeTests) { module.exports.getCSSAssets = function() { var output = this.getGlobbedFiles(this.assets.lib.css.concat(this.assets.css), 'public/'); return output; -}; \ No newline at end of file +}; diff --git a/config/env/all.js b/config/env/all.js index 66fc2082c0..34bc24e7a6 100644 --- a/config/env/all.js +++ b/config/env/all.js @@ -14,7 +14,7 @@ module.exports = { // The name of the MongoDB collection to store sessions in sessionCollection: 'sessions', // The session cookie settings - sessionCookie: { + sessionCookie: { path: '/', httpOnly: true, // If secure is set to true then it will cause the cookie to be set @@ -25,7 +25,7 @@ module.exports = { // Only set the maxAge to null if the cookie shouldn't be expired // at all. The cookie will expunge when the browser is closed. maxAge: null, - // To set the cookie in a specific domain uncomment the following + // To set the cookie in a specific domain uncomment the following // setting: // domain: 'yourdomain.com' }, @@ -69,4 +69,4 @@ module.exports = { 'public/modules/*/tests/*.js' ] } -}; \ No newline at end of file +}; diff --git a/config/env/secure.js b/config/env/secure.js index 9ced6d7e96..320d0fb5d7 100644 --- a/config/env/secure.js +++ b/config/env/secure.js @@ -71,4 +71,4 @@ module.exports = { } } } -}; \ No newline at end of file +}; diff --git a/config/env/test.js b/config/env/test.js index 1d42d4e798..f9e3116f73 100644 --- a/config/env/test.js +++ b/config/env/test.js @@ -56,4 +56,4 @@ module.exports = { } } } -}; \ No newline at end of file +}; diff --git a/config/init.js b/config/init.js index 34af434f3b..3a5b1e5203 100644 --- a/config/init.js +++ b/config/init.js @@ -28,4 +28,4 @@ module.exports = function() { } }); -}; \ No newline at end of file +}; diff --git a/config/logger.js b/config/logger.js index 98b3a4c5b9..e6d1f1dcbc 100644 --- a/config/logger.js +++ b/config/logger.js @@ -33,4 +33,4 @@ module.exports = { return options; } -}; \ No newline at end of file +}; diff --git a/config/passport.js b/config/passport.js index fabbf77c05..5abfae766e 100755 --- a/config/passport.js +++ b/config/passport.js @@ -7,7 +7,7 @@ var passport = require('passport'), User = require('mongoose').model('User'), path = require('path'), config = require('./config'); - + /** * Module init function. */ @@ -30,4 +30,4 @@ module.exports = function() { config.getGlobbedFiles('./config/strategies/**/*.js').forEach(function(strategy) { require(path.resolve(strategy))(); }); -}; \ No newline at end of file +}; diff --git a/config/strategies/facebook.js b/config/strategies/facebook.js index 5508bece69..34ddc68f16 100644 --- a/config/strategies/facebook.js +++ b/config/strategies/facebook.js @@ -38,4 +38,4 @@ module.exports = function() { users.saveOAuthUserProfile(req, providerUserProfile, done); } )); -}; \ No newline at end of file +}; diff --git a/config/strategies/github.js b/config/strategies/github.js index 97c7c76727..f10a413e20 100644 --- a/config/strategies/github.js +++ b/config/strategies/github.js @@ -43,4 +43,4 @@ module.exports = function() { users.saveOAuthUserProfile(req, providerUserProfile, done); } )); -}; \ No newline at end of file +}; diff --git a/config/strategies/google.js b/config/strategies/google.js index f8b454c60e..8044ed4eec 100644 --- a/config/strategies/google.js +++ b/config/strategies/google.js @@ -38,4 +38,4 @@ module.exports = function() { users.saveOAuthUserProfile(req, providerUserProfile, done); } )); -}; \ No newline at end of file +}; diff --git a/config/strategies/linkedin.js b/config/strategies/linkedin.js index c6ce09001f..1ee5b3f5bc 100644 --- a/config/strategies/linkedin.js +++ b/config/strategies/linkedin.js @@ -39,4 +39,4 @@ module.exports = function() { users.saveOAuthUserProfile(req, providerUserProfile, done); } )); -}; \ No newline at end of file +}; diff --git a/config/strategies/local.js b/config/strategies/local.js index 7101cac2bc..ad56052422 100644 --- a/config/strategies/local.js +++ b/config/strategies/local.js @@ -35,4 +35,4 @@ module.exports = function() { }); } )); -}; \ No newline at end of file +}; diff --git a/config/strategies/twitter.js b/config/strategies/twitter.js index 2bc57cb259..5dcc93f4ed 100644 --- a/config/strategies/twitter.js +++ b/config/strategies/twitter.js @@ -42,4 +42,4 @@ module.exports = function() { users.saveOAuthUserProfile(req, providerUserProfile, done); } )); -}; \ No newline at end of file +}; diff --git a/fig.yml b/fig.yml index 4726a15100..967ac7d1d1 100644 --- a/fig.yml +++ b/fig.yml @@ -9,4 +9,4 @@ web: db: image: mongo ports: - - "27017:27017" \ No newline at end of file + - "27017:27017" diff --git a/server.js b/server.js index abb888cfcb..6d5f4c2d30 100755 --- a/server.js +++ b/server.js @@ -46,4 +46,4 @@ console.log(chalk.green('Database:\t\t\t' + config.db.uri)); if (process.env.NODE_ENV === 'secure') { console.log(chalk.green('HTTPs:\t\t\t\ton')); } -console.log('--'); \ No newline at end of file +console.log('--');