0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Merge pull request #5580 from halfdan/update-deps

Update lodash and cheerio
This commit is contained in:
Hannah Wolfe 2015-07-22 21:35:02 +01:00
commit ab2049e35c
4 changed files with 11 additions and 8 deletions

View file

@ -1,6 +1,6 @@
// # Mail API // # Mail API
// API for sending Mail // API for sending Mail
var _ = require('lodash'), var _ = require('lodash').runInContext(),
Promise = require('bluebird'), Promise = require('bluebird'),
config = require('../config'), config = require('../config'),
canThis = require('../permissions').canThis, canThis = require('../permissions').canThis,
@ -99,12 +99,12 @@ mail = {
} }
// insert user-specific data into the email // insert user-specific data into the email
var htmlContent = _.template(fileContent, emailData), var compiled = _.template(fileContent),
htmlContent = compiled(emailData),
textContent; textContent;
// generate a plain-text version of the same email // generate a plain-text version of the same email
textContent = htmlToText.fromString(htmlContent); textContent = htmlToText.fromString(htmlContent);
resolve({ resolve({
html: htmlContent, html: htmlContent,
text: textContent text: textContent

View file

@ -832,7 +832,7 @@ describe('Config', function () {
it('displays warning when updateCheck exists and is falsy', function () { it('displays warning when updateCheck exists and is falsy', function () {
config.set({ config.set({
updateCheck: undefined updateCheck: false
}); });
// Run the test code // Run the test code
config.checkDeprecated(); config.checkDeprecated();
@ -865,13 +865,14 @@ describe('Config', function () {
it('displays warning when mail.fromaddress exists and is falsy', function () { it('displays warning when mail.fromaddress exists and is falsy', function () {
config.set({ config.set({
mail: { mail: {
fromaddress: undefined fromaddress: false
} }
}); });
// Run the test code // Run the test code
config.checkDeprecated(); config.checkDeprecated();
logStub.calledOnce.should.be.true; logStub.calledOnce.should.be.true;
logStub.calledWithMatch('mail.fromaddress').should.be.true; logStub.calledWithMatch('mail.fromaddress').should.be.true;
// Future tests: This is important here! // Future tests: This is important here!

View file

@ -478,7 +478,9 @@ doAuth = function doAuth() {
delete options[0]; delete options[0];
// No DB setup, but override the owner // No DB setup, but override the owner
options = _.merge({'owner:post': true}, _.transform(options, function (result, val) { options = _.merge({'owner:post': true}, _.transform(options, function (result, val) {
result[val] = true; if (val) {
result[val] = true;
}
})); }));
fixtureOps = getFixtureOps(options); fixtureOps = getFixtureOps(options);

View file

@ -32,7 +32,7 @@
"bookshelf": "0.7.9", "bookshelf": "0.7.9",
"busboy": "0.2.9", "busboy": "0.2.9",
"chalk": "1.0.0", "chalk": "1.0.0",
"cheerio": "0.18.0", "cheerio": "0.19.0",
"compression": "1.4.4", "compression": "1.4.4",
"connect-slashes": "1.3.1", "connect-slashes": "1.3.1",
"cookie-session": "1.1.0", "cookie-session": "1.1.0",
@ -44,7 +44,7 @@
"glob": "4.3.2", "glob": "4.3.2",
"html-to-text": "1.3.0", "html-to-text": "1.3.0",
"knex": "0.7.3", "knex": "0.7.3",
"lodash": "2.4.1", "lodash": "3.10.0",
"moment": "2.10.3", "moment": "2.10.3",
"morgan": "1.5.3", "morgan": "1.5.3",
"node-uuid": "1.4.3", "node-uuid": "1.4.3",