Merge pull request #381 from treyhunner/fix-editorconfig

Fix .editorconfig file
This commit is contained in:
Ilan Biala
2015-03-03 16:04:41 -05:00
36 changed files with 47 additions and 58 deletions

View File

@@ -1,36 +1,25 @@
# EditorConfig is awesome: http://EditorConfig.org
# Howto with your editor:
# Sublime: https://github.com/sindresorhus/editorconfig-sublime
# How-to with your editor: http://editorconfig.org/#download
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[**]
[*]
end_of_line = lf
indent_style = tab
insert_final_newline = true
# Standard at: https://github.com/felixge/node-style-guide
[**.js, **.json]
[{Dockerfile,Procfile}]
trim_trailing_whitespace = true
# Standard at: https://github.com/felixge/node-style-guide
[{*.js,*.json}]
trim_trailing_whitespace = true
indent_style = tab
quote_type = single
curly_bracket_next_line = false
spaces_around_operators = true
space_after_control_statements = true
space_after_anonymous_functions = false
spaces_in_brackets = false
# No Standard. Please document a standard if different from .js
[**.yml, **.html, **.css]
trim_trailing_whitespace = true
indent_style = tab
# No standard. Please document a standard if different from .js
[**.md]
indent_style = tab
# Standard at:
[Makefile]
indent_style = tab

View File

@@ -26,4 +26,4 @@ ENV NODE_ENV development
# Port 3000 for server
# Port 35729 for livereload
EXPOSE 3000 35729
CMD ["grunt"]
CMD ["grunt"]

View File

@@ -117,4 +117,4 @@ exports.hasAuthorization = function(req, res, next) {
});
}
next();
};
};

View File

@@ -8,4 +8,4 @@ exports.index = function(req, res) {
user: req.user || null,
request: req
});
};
};

View File

@@ -39,4 +39,4 @@ exports.getErrorMessage = function(err) {
}
return message;
};
};

View File

@@ -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')
);
);

View File

@@ -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) {
}
});
}
};
};

View File

@@ -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);

View File

@@ -53,4 +53,4 @@ exports.update = function(req, res) {
*/
exports.me = function(req, res) {
res.json(req.user || null);
};
};

View File

@@ -31,4 +31,4 @@ var ArticleSchema = new Schema({
}
});
mongoose.model('Article', ArticleSchema);
mongoose.model('Article', ArticleSchema);

View File

@@ -143,4 +143,4 @@ UserSchema.statics.findUniqueUsername = function(username, suffix, callback) {
});
};
mongoose.model('User', UserSchema);
mongoose.model('User', UserSchema);

View File

@@ -19,4 +19,4 @@ module.exports = function(app) {
// Finish by binding the article middleware
app.param('articleId', articles.articleByID);
};
};

View File

@@ -4,4 +4,4 @@ module.exports = function(app) {
// Root routing
var core = require('../../app/controllers/core.server.controller');
app.route('/').get(core.index);
};
};

View File

@@ -54,4 +54,4 @@ module.exports = function(app) {
// Finish by binding the user middleware
app.param('userId', users.userByID);
};
};

View File

@@ -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

View File

@@ -5,4 +5,4 @@
<pre>
{{url}} is not a valid path.
</pre>
{% endblock %}
{% endblock %}

View File

@@ -5,4 +5,4 @@
<pre>
{{error}}
</pre>
{% endblock %}
{% endblock %}

View File

@@ -78,4 +78,4 @@
<![endif]-->
</body>
</html>
</html>

View File

@@ -10,4 +10,4 @@
<br>
<p>The {{appName}} Support Team</p>
</body>
</html>
</html>

View File

@@ -15,4 +15,4 @@
<br>
<p>The {{appName}} Support Team</p>
</body>
</html>
</html>

View File

@@ -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"
}
}

View File

@@ -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;
};
};

2
config/env/all.js vendored
View File

@@ -69,4 +69,4 @@ module.exports = {
'public/modules/*/tests/*.js'
]
}
};
};

View File

@@ -71,4 +71,4 @@ module.exports = {
}
}
}
};
};

2
config/env/test.js vendored
View File

@@ -56,4 +56,4 @@ module.exports = {
}
}
}
};
};

View File

@@ -28,4 +28,4 @@ module.exports = function() {
}
});
};
};

View File

@@ -33,4 +33,4 @@ module.exports = {
return options;
}
};
};

View File

@@ -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))();
});
};
};

View File

@@ -38,4 +38,4 @@ module.exports = function() {
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));
};
};

View File

@@ -43,4 +43,4 @@ module.exports = function() {
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));
};
};

View File

@@ -38,4 +38,4 @@ module.exports = function() {
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));
};
};

View File

@@ -39,4 +39,4 @@ module.exports = function() {
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));
};
};

View File

@@ -35,4 +35,4 @@ module.exports = function() {
});
}
));
};
};

View File

@@ -42,4 +42,4 @@ module.exports = function() {
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));
};
};

View File

@@ -9,4 +9,4 @@ web:
db:
image: mongo
ports:
- "27017:27017"
- "27017:27017"

View File

@@ -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('--');
console.log('--');