From 0e9743d7094ae9cff7dd00e245650a9bbf7b95e2 Mon Sep 17 00:00:00 2001 From: Henriet Vivien Date: Wed, 29 Mar 2017 11:53:49 +0200 Subject: [PATCH 1/3] Update dependencies --- package.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index b01a869..a57af02 100644 --- a/package.json +++ b/package.json @@ -14,24 +14,24 @@ "url": "https://github.com/vesln/hippie" }, "devDependencies": { - "chai": "~1.8.1", - "jshint": "~2.3.0", - "istanbul": "~0.1.44", + "chai": "~3.5.0", + "jshint": "~2.9.4", + "istanbul": "~0.4.5", "express": "~3.4.4", - "hydro": "~0.8.7", - "hydro-bdd": "~0.1.0", - "hydro-dot": "~1.0.5", - "hydro-clean-stacks": "~0.1.0", - "hydro-chai": "~0.1.3" + "hydro": "~0.10.1", + "hydro-bdd": "~0.2.0", + "hydro-dot": "~2.0.1", + "hydro-clean-stacks": "~0.2.0", + "hydro-chai": "~0.3.1" }, "author": "Veselin Todorov ", "license": "MIT", "dependencies": { "assertion-error": "~1.0.0", - "deep-eql": "~0.1.3", - "es6-promise": "^3.0.2", + "deep-eql": "~2.0.1", + "es6-promise": "^4.1.0", "pathval": "0.0.1", - "qs": "~0.6.5", - "request": "~2.74.0" + "qs": "~6.4.0", + "request": "~2.81.0" } } From 20340aab2044c9bf7e5cdb9fc834be3d8d794bd4 Mon Sep 17 00:00:00 2001 From: Henriet Vivien Date: Wed, 29 Mar 2017 12:05:30 +0200 Subject: [PATCH 2/3] Update express to 4.15.2 --- package.json | 12 +++++++----- test/support/server.js | 10 ++++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index a57af02..cfc289b 100644 --- a/package.json +++ b/package.json @@ -14,15 +14,17 @@ "url": "https://github.com/vesln/hippie" }, "devDependencies": { + "basic-auth-connect": "^1.0.0", + "body-parser": "^1.17.1", "chai": "~3.5.0", - "jshint": "~2.9.4", - "istanbul": "~0.4.5", - "express": "~3.4.4", + "express": "~4.15.2", "hydro": "~0.10.1", "hydro-bdd": "~0.2.0", - "hydro-dot": "~2.0.1", + "hydro-chai": "~0.3.1", "hydro-clean-stacks": "~0.2.0", - "hydro-chai": "~0.3.1" + "hydro-dot": "~2.0.1", + "istanbul": "~0.4.5", + "jshint": "~2.9.4" }, "author": "Veselin Todorov ", "license": "MIT", diff --git a/test/support/server.js b/test/support/server.js index 139a307..4e9c3a3 100644 --- a/test/support/server.js +++ b/test/support/server.js @@ -3,6 +3,8 @@ */ var express = require('express'); +var basicAuth = require('basic-auth-connect'); +var bodyParser = require('body-parser'); /** * Server. @@ -24,23 +26,23 @@ app.get('/qs', function(req, res) { app.get('/slow', function() {}); -app.post('/send-form', express.urlencoded(), function(req, res) { +app.post('/send-form', bodyParser.urlencoded({ extended: false }), function(req, res) { res.send(JSON.stringify(req.body)); }); -app.post('/send-json', express.json(), function(req, res) { +app.post('/send-json', bodyParser.json(), function(req, res) { res.send(JSON.stringify(req.body)); }); app.get('/empty-response', function(req, res) { - res.send(204); + res.sendStatus(204); }); app.get('/redirect', function(req, res) { res.redirect('/list'); }); -app.get('/auth', express.basicAuth('user', 'pass'), function(req, res) { +app.get('/auth', basicAuth('user', 'pass'), function(req, res) { res.send('ok'); }); From 6e5ba0cff4b2afa16185572818ee1fdac8e6846f Mon Sep 17 00:00:00 2001 From: Henriet Vivien Date: Wed, 29 Mar 2017 12:13:13 +0200 Subject: [PATCH 3/3] Update pathval to 1.1.0 --- lib/hippie/expect.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hippie/expect.js b/lib/hippie/expect.js index 88f83bd..d4da508 100644 --- a/lib/hippie/expect.js +++ b/lib/hippie/expect.js @@ -51,7 +51,7 @@ exports.header = function(key, val) { exports.value = function(key, val) { return function value(res, body, next) { - next(assert(pathval(key, body), val, 'Value - ' + key)); + next(assert(pathval.getPathValue(body, key), val, 'Value - ' + key)); }; }; @@ -65,7 +65,7 @@ exports.value = function(key, val) { exports.keyCheck = function(keyParam) { return function keyCheck(res, body, next) { - var value = pathval(keyParam, body); + var value = pathval.getPathValue(body, keyParam); var notUndefined = typeof value !== 'undefined'; next(assert(notUndefined, true, 'Key - ' + keyParam)); }; diff --git a/package.json b/package.json index cfc289b..33fd621 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "assertion-error": "~1.0.0", "deep-eql": "~2.0.1", "es6-promise": "^4.1.0", - "pathval": "0.0.1", + "pathval": "1.1.0", "qs": "~6.4.0", "request": "~2.81.0" }