Skip to content
Browse files

cleanup, converted more promised-io/lib/promise refs that were merged…

… from main to q refs
  • Loading branch information...
1 parent 11aa183 commit 3b06b7471335f943669af69c32ffffeacc62b914 @nrstott committed Dec 6, 2011
View
6 examples/haml-view/app.js
@@ -1,6 +1,4 @@
-var
- jsgi = require('jsgi'),
- bogart = require('../../lib/bogart')
+var bogart = require('../../lib/bogart')
var app = bogart.app(function(show) {
var viewEngine = bogart.viewEngine("haml");
@@ -10,4 +8,4 @@ var app = bogart.app(function(show) {
});
});
-jsgi.start(app)
+bogart.start(app)
View
2 lib/forEachStream.js
@@ -1,6 +1,6 @@
var util = require('util')
, Stream = require('stream').Stream
- , Q = require('promised-io/lib/promise');
+ , Q = require('q');
function ForEachStream(forEachable) {
if (!(this instanceof ForEachStream)) return new ForEachStream(forEachable);
View
2 lib/session/session.js
@@ -1,4 +1,4 @@
-var Q = require('promised-io/lib/promise'),
+var Q = require('q'),
when = Q.when,
DefaultIdProvider = require("./idProvider").IdProvider,
DefaultDataProvider = require("./dataProvider").DataProvider;
View
2 lib/stream.js
@@ -1,4 +1,4 @@
-var Q = require('promised-io/lib/promise')
+var Q = require('q')
, Stream = require('stream').Stream
, util = require('util')
, ForEachStream = require('./forEachStream');
View
11 test/middleware.test.js
@@ -276,11 +276,14 @@ exports["test session"] = function(beforeExit) {
}
});
- var initialResp = app(request);
- var cookieStr = initialResp.headers["Set-Cookie"].join("").replace(/;$/, "");
+ Q.when(app(request), function(resp) {
+ initialResp = resp;
+ var cookieStr = initialResp.headers["Set-Cookie"].join("").replace(/;$/, "");
+
+ request.headers.cookie = cookieStr;
+ var secondResp = app(request);
+ });
- request.headers.cookie = cookieStr;
- var secondResp = app(request);
beforeExit(function() {
assert.equal(values.length, 2);
View
2 test/response-builder.test.js
@@ -1,6 +1,6 @@
var bogart = require('../lib/bogart')
, assert = require('assert')
- , Q = require('promised-io/lib/promise')
+ , Q = require('q')
, fs = require('fs')
, path = require('path');
View
2 test/stream.test.js
@@ -1,5 +1,5 @@
var bogart = require('../lib/bogart')
- , Q = require('promised-io/lib/promise')
+ , Q = require('q')
, assert = require('assert')
, fs = require('fs')
, ForEachStream = require('../lib/forEachStream')
View
2 test/util.test.js
@@ -1,5 +1,5 @@
var bogart = require('../lib/bogart'),
- Q = require("promised-io/lib/promise"),
+ Q = require('q'),
assert = require('assert'),
path = require('path'),
security = require("../lib/security");
View
3 test/view.test.js
@@ -1,7 +1,6 @@
var bogart = require('../lib/bogart')
, view = require('../lib/view')
- , jsgi = require('jsgi')
- , when = require('promised-io/lib/promise').when
+ , when = require('q').when
, assert = require('assert')
, path = require('path')
, fixturesPath = path.join(__dirname, 'fixtures');

0 comments on commit 3b06b74

Please sign in to comment.
Something went wrong with that request. Please try again.