Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/nrstott/bogart
Browse files Browse the repository at this point in the history
  • Loading branch information
Davis Clark committed Nov 16, 2011
2 parents a675776 + 9375e44 commit 9767e5e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
9 changes: 9 additions & 0 deletions CHANGES.md
@@ -1,3 +1,12 @@
## v0.3.21

* `after` had been left off of the public API of router, added it

## v0.3.20

* Simplified and corrected code for `pipe` method on the request object for the `Parted` middleware.
* Added `Session` middleware.

## v0.3.19

* Updated Parted dependency to 0.8.0.
Expand Down
4 changes: 2 additions & 2 deletions lib/bogart.js
Expand Up @@ -9,7 +9,7 @@ var
fs = require('fs'),
view = require('./view');

exports.version = [0,3,19];
exports.version = [0,3,21];

exports.middleware = middleware;

Expand Down Expand Up @@ -147,7 +147,7 @@ exports.router = function(config, notFoundApp) {
}
};

['get','post','put','del','before'].forEach(function(x) {
['get','post','put','del','before','after'].forEach(function(x) {
fn[x] = router[x].bind(router);
});

Expand Down
12 changes: 1 addition & 11 deletions lib/middleware.js
Expand Up @@ -131,19 +131,9 @@ exports.Parted = function(nextApp, opts) {
}

emitter = new ForEachStream(oldBody);

req.on = emitter.on.bind(emitter);
req.pipe = emitter.pipe.bind(emitter);

req.pipe = function(stream) {
Q.when(oldBody.forEach(function(chunk) {
stream.write(chunk);
}), function() {
stream.end();
}, function(err) {
deferred.reject(err);
});
};

delete req.body;

fn(req, null, function() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "bogart",
"description": "Fast JSGI web framework taking inspiration from Sinatra",
"version": "0.3.19",
"version": "0.3.21",
"keywords": ["bogart", "framework", "sinatra", "REST"],
"author": "Nathan Stott",
"email": "nathan.stott@whiteboard-it.com",
Expand Down
2 changes: 1 addition & 1 deletion test/middleware.test.js
Expand Up @@ -120,7 +120,7 @@ exports["test gzip downloads as text/html"] = function(beforeExit) {
});

beforeExit(function() {
assert.isNotNull(response, 'Repsones should not be null');
assert.isNotNull(response, 'Responses should not be null');
assert.equal(200, response.status);
assert.equal('text/html', response.headers['content-type']);
});
Expand Down

0 comments on commit 9767e5e

Please sign in to comment.