bassmaster
Advanced tools
Comparing version 0.3.2 to 0.4.0
@@ -84,3 +84,3 @@ // Load modules | ||
} | ||
}) | ||
}); | ||
}; | ||
@@ -87,0 +87,0 @@ |
@@ -22,3 +22,3 @@ // Load modules | ||
var requests = []; | ||
var requestRegex = /(?:\/)(?:\$(\d)+\.)?([\w:\.\?=&]*)/g; // /project/$1.project/tasks, does not allow using array responses | ||
var requestRegex = /(?:\/)(?:\$(\d)+\.)?([^\/\$]*)/g; // /project/$1.project/tasks, does not allow using array responses | ||
@@ -205,2 +205,3 @@ // Validate requests | ||
method: request.method, | ||
headers: batchRequest.headers, | ||
payload: body, | ||
@@ -207,0 +208,0 @@ session: batchRequest.session |
module.exports = { | ||
batchEndpoint: '/batch' | ||
}; |
@@ -0,0 +0,0 @@ // Load modules |
{ | ||
"name": "bassmaster", | ||
"description": "Batch processing plugin for hapi", | ||
"author": "Wyatt Preul <wpreul@gmail.com> (http://jsgeek.com)", | ||
"contributors": [ | ||
"Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)", | ||
"Van Nguyen <the.gol.effect@gmail.com>" | ||
], | ||
"repository": "git://github.com/spumko/bassmaster", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"main": "index", | ||
@@ -25,3 +20,3 @@ "keywords": [ | ||
"async": "0.2.x", | ||
"hoek": "0.9.x" | ||
"hoek": "1.x.x" | ||
}, | ||
@@ -31,4 +26,3 @@ "devDependencies": { | ||
"sinon": "1.x.x", | ||
"lab": "0.1.x", | ||
"complexity-report": "0.x.x" | ||
"lab": "1.x.x" | ||
}, | ||
@@ -35,0 +29,0 @@ "scripts": { |
@@ -0,0 +0,0 @@ <a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a> |
@@ -28,5 +28,6 @@ // Load modules | ||
var profileHandler = function (request) { | ||
var id = request.query.id || 'fa0dbda9b1b'; | ||
request.reply({ | ||
'id': 'fa0dbda9b1b', | ||
'id': id, | ||
'name': 'John Doe' | ||
@@ -175,2 +176,22 @@ }); | ||
it('supports query string in the request', function (done) { | ||
makeRequest('{ "requests": [{ "method": "get", "path": "/profile?id=someid" }] }', function (res) { | ||
expect(res[0].id).to.equal('someid'); | ||
expect(res[0].name).to.equal('John Doe'); | ||
expect(res.length).to.equal(1); | ||
done(); | ||
}); | ||
}); | ||
it('supports non alphanum characters in the request', function (done) { | ||
makeRequest('{ "requests": [{ "method": "get", "path": "/item/item-_^~&-end" }] }', function (res) { | ||
expect(res[0].id).to.equal('item-_^~&-end'); | ||
expect(res[0].name).to.equal('Item'); | ||
expect(res.length).to.equal(1); | ||
done(); | ||
}); | ||
}); | ||
it('shows two ordered responses when requesting two endpoints', function (done) { | ||
@@ -177,0 +198,0 @@ |
@@ -0,0 +0,0 @@ // Load modules |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
3
15
607
65586
2
- Removedhoek@0.9.1(transitive)
Updatedhoek@1.x.x