From 07cbe984ae78163c3a653ad1f728ce5cc4feb681 Mon Sep 17 00:00:00 2001 From: Gabor Javorszky Date: Sat, 22 Jun 2013 12:25:43 +0100 Subject: [PATCH 1/2] Fix forge returning null on empty fetch Closes #184. It got broken because of https://github.com/tgriesser/bookshelf/commit/a9c4a5409e6bd422df2500aefded41bf50e134d3 --- core/shared/models/user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/shared/models/user.js b/core/shared/models/user.js index c16ba2c14c..347f72e664 100644 --- a/core/shared/models/user.js +++ b/core/shared/models/user.js @@ -74,9 +74,9 @@ */ return this.forge().fetch().then(function (user) { - _.each(user.attributes, function (value, key, list) { + if (user) { fail = true; - }); + } if (fail) { return when.reject(new Error('A user is already registered. Only one user for now!')); @@ -167,4 +167,4 @@ Users: Users }; -}()); \ No newline at end of file +}()); From ae58257630b3fe1ce65a8b02ac50ef095a2209e0 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Sat, 22 Jun 2013 15:23:36 +0100 Subject: [PATCH 2/2] Freezing dependency versions Updating package.json with full version numbers so that we can be certain this version will continue to work in future --- package.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 9b6f4a1e45..c5b7ea76b8 100644 --- a/package.json +++ b/package.json @@ -7,24 +7,24 @@ "test": "grunt validate --verbose" }, "dependencies": { - "express": "3.1.x", - "express-hbs": "0.2.x", - "connect-flash": "0.1.x", - "node-polyglot": "0.2.x", - "css": "1.1.x", - "moment": "2.0.x", - "underscore": "1.4.x", - "showdown": "0.3.x", - "sqlite3": "2.1.x", - "bookshelf": ">=0.1.6", - "knex": "0.1.x", - "when": "2.1.x", + "express": "3.1.2", + "express-hbs": "0.2.0", + "connect-flash": "0.1.1", + "node-polyglot": "0.2.1", + "css": "1.1.0", + "moment": "2.0.0", + "underscore": "1.4.4", + "showdown": "0.3.1", + "sqlite3": "2.1.10", + "bookshelf": "0.1.9", + "knex": "0.1.7", + "when": "2.1.1", "bcrypt-nodejs": "0.0.3", - "node-uuid": "~1.4.0" + "node-uuid": "1.4.0" }, "devDependencies": { "grunt": "~0.4.1", - "grunt-jslint": ">=0.2.6", + "grunt-jslint": "~0.2.6", "should": "~1.2.2", "grunt-mocha-test": "~0.4.0", "grunt-shell": "~0.2.2", @@ -33,7 +33,7 @@ "mocha": "~1.10.0", "grunt-contrib-handlebars": "~0.5.9", "grunt-contrib-watch": "~0.4.4", - "grunt-bump": "0.0.2", + "grunt-bump": "~0.0.2", "grunt-contrib-copy": "~0.4.1", "grunt-contrib-compress": "~0.5.2", "mocha-as-promised": "~1.4.0"