From b7a57abd306c495b4da256d1ca4f277c0c99eabb Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Fri, 18 Sep 2015 09:10:42 +0300 Subject: [PATCH] adding the required support to properly build the nodejs v4 edition updating grunt-node-inspector version to compatible version with nodejs v4 --- .travis.yml | 12 +++++++++++- .../users/tests/server/user.server.routes.tests.js | 10 +++++++++- package.json | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2b79696091..aa13bfbdc4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,23 @@ node_js: - 0.10 - 0.12 - 4 +# NodeJS v4 requires gcc 4.8 env: - - NODE_ENV=travis + - NODE_ENV=travis CXX="g++-4.8" CC="gcc-4.8" matrix: allow_failures: - node_js: 4 services: - mongodb +# gcc 4.8 requires ubuntu-toolchain-r-test +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 + - gcc-4.8 + - clang before_install: - gem update --system - gem install sass --version "=3.3.7" diff --git a/modules/users/tests/server/user.server.routes.tests.js b/modules/users/tests/server/user.server.routes.tests.js index 6f421fb51a..e104ba7152 100644 --- a/modules/users/tests/server/user.server.routes.tests.js +++ b/modules/users/tests/server/user.server.routes.tests.js @@ -97,7 +97,15 @@ describe('User CRUD tests', function () { } signoutRes.redirect.should.equal(true); - signoutRes.text.should.equal('Moved Temporarily. Redirecting to /'); + + // NodeJS v4 changed the status code representation so we must check + // before asserting, to be comptabile with all node versions. + if (process.version.indexOf('v4') === 0) { + signoutRes.text.should.equal('Found. Redirecting to /'); + } else { + signoutRes.text.should.equal('Moved Temporarily. Redirecting to /'); + } + return done(); }); }); diff --git a/package.json b/package.json index 3664739990..a5c07a6783 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "passport-twitter": "^1.0.2", "phantomjs": ">=1.9.0", "serve-favicon": "^2.3.0", - "socket.io": "^1.3.5", + "socket.io": "^1.3.7", "swig": "^1.4.2", "validator": "^3.41.2" }, @@ -79,7 +79,7 @@ "grunt-mocha-test": "~0.12.7", "grunt-mocha-istanbul": "^2.4.0", "grunt-ng-annotate": "^1.0.1", - "grunt-node-inspector": "~0.2.0", + "grunt-node-inspector": "~0.3.0", "grunt-nodemon": "~0.4.0", "grunt-protractor-runner": "^2.0.0", "gulp": "^3.9.0",