Permalink
Browse files

Replaced 'sys' with 'util'.

  • Loading branch information...
1 parent 1d53ff1 commit b408a90c1fe9d2470eebf78b9cdd5d80c009b70a @cskr committed Oct 22, 2010
@@ -1,12 +1,12 @@
var EventEmitter = require('events').EventEmitter,
- sys = require('sys');
+ util = require('util');
function ItemRepo() {
EventEmitter.call(this);
this.items = {};
}
-sys.inherits(ItemRepo, EventEmitter);
+util.inherits(ItemRepo, EventEmitter);
ItemRepo.prototype.add = function(item) {
var self = this;
View
@@ -15,7 +15,7 @@
*/
exports.api = {};
-var sys = require('sys'),
+var util = require('util'),
ResponseWrapper = require('./wrapper.js').api.ResponseWrapper
try {
var compress = require('compress');
@@ -39,7 +39,7 @@ function GzipResponseWrapper(response, compressionLevel) {
});
}
-sys.inherits(GzipResponseWrapper, ResponseWrapper);
+util.inherits(GzipResponseWrapper, ResponseWrapper);
GzipResponseWrapper.prototype.writeHead = function(statusCode, reasonPhrase,
headers) {
@@ -14,7 +14,6 @@
* limitations under the License.
*/
var fs = require('fs'),
- sys = require('sys'),
uuid = require('./uuid'),
formidable = require('formidable');
@@ -15,7 +15,7 @@
*/
var fs = require('fs'),
url = require('url'),
- sys = require('sys'),
+ util = require('util'),
crypto = require('crypto'),
Buffer = require('buffer').Buffer,
mime = require('./mime'),
@@ -421,7 +421,7 @@ function sendStatic(staticFile, stats, ctx) {
ctx.response.writeHead(ctx.status, ctx.headers);
if(ctx.request.method == 'GET') {
- sys.pump(stream, ctx.response);
+ util.pump(stream, ctx.response);
} else {
ctx.response.end();
}
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-var sys = require('sys'),
+var util = require('util'),
events = require('events');
exports.api = {};
@@ -36,7 +36,7 @@ function ResponseWrapper(response) {
});
}
-sys.inherits(ResponseWrapper, events.EventEmitter);
+util.inherits(ResponseWrapper, events.EventEmitter);
ResponseWrapper.prototype.writeHead = function(statusCode, reasonPhrase,
headers) {
View
@@ -23,7 +23,7 @@ function MockRequest(method, url, headers) {
this.url = url;
this.headers = headers;
}
-require('sys').inherits(MockRequest, EventEmitter);
+require('util').inherits(MockRequest, EventEmitter);
MockRequest.prototype.setEncoding = function(encoding) {
this.encoding = encoding;
@@ -32,7 +32,7 @@ MockRequest.prototype.setEncoding = function(encoding) {
function MockResponse() {
this.writable = true;
}
-require('sys').inherits(MockResponse, EventEmitter);
+require('util').inherits(MockResponse, EventEmitter);
MockResponse.prototype.writeHead = function(statusCode, reasonPhrase, headers) {
this.statusCode = statusCode;
View
@@ -1,4 +1,3 @@
-var sys = require('sys');
var suites = [
'./ghp-test', './model-test', './helpers-test', './i18n-test',
'./auth-test', './routes-test', './dispatcher-test', './wrapper-test',

0 comments on commit b408a90

Please sign in to comment.