diff --git a/file/tests/file_spec.js b/file/tests/file_spec.js index 19bee95..2347499 100644 --- a/file/tests/file_spec.js +++ b/file/tests/file_spec.js @@ -1,5 +1,5 @@ var assert = require("assert"); -var sys = require("sys"); +var util = require('util'); var minitest = require("../vendor/minitest.js/minitest"); var file = require("../lib/main"); var fs = require("fs"); diff --git a/file/vendor/minitest.js/minitest.js b/file/vendor/minitest.js/minitest.js index 8a8520c..d508e2b 100644 --- a/file/vendor/minitest.js/minitest.js +++ b/file/vendor/minitest.js/minitest.js @@ -1,4 +1,4 @@ -var sys = require("sys"); +var util = require('util'); var colours = require("./colours"); /* suite */ @@ -9,10 +9,10 @@ function Suite () { Suite.prototype.report = function () { var suite = this; this.contexts.forEach(function(context, index) { - sys.puts(context.contextHeader()); + util.puts(context.contextHeader()); context.report(); if (suite.contexts.length === index) { - sys.puts(""); + util.puts(""); }; }); }; @@ -74,9 +74,9 @@ Test.prototype.failed = function (error) { Test.prototype.report = function () { if (this.result) { - sys.puts(this.result); + util.puts(this.result); } else { - sys.puts(this.reportNotFinished()); + util.puts(this.reportNotFinished()); }; }; @@ -140,7 +140,7 @@ function setupUncaughtExceptionListener () { // so we could just set test.result, so everything would be // reported properly on the correct place, not in the middle of tests process.addListener("uncaughtException", function (error) { - sys.puts(Test.prototype.reportError(error)); + util.puts(Test.prototype.reportError(error)); }); }; diff --git a/pool/README.md b/pool/README.md index 0ab4be7..55057de 100644 --- a/pool/README.md +++ b/pool/README.md @@ -12,14 +12,14 @@ Pool has two core usage scenarios: creating a pool and creating a set of pools.
var pool = require('pool'),
- sys = require('sys'),
+ util = require('util'),
local = pool.createPool('80', 'localhost');
client = local.request('GET', '/', function (request) {
// You can work with the request here just as you would as if it
// was returned from http.createClient
request.on('end', function () {
- sys.puts('Request ended');
+ util.puts('Request ended');
});
});
@@ -35,7 +35,7 @@ Creating a set of pools can be accomplished using a PoolManager:
// You can work with the request here just as you would as if it
// was returned from http.createClient
request.on('end', function () {
- sys.puts('Request ended');
+ util.puts('Request ended');
});
});
\ No newline at end of file
diff --git a/pool/main.js b/pool/main.js
index 774cf6b..69246fb 100644
--- a/pool/main.js
+++ b/pool/main.js
@@ -1,4 +1,4 @@
-var sys = require('sys')
+var util = require('util')
, http = require('http')
, events = require('events')
;
@@ -13,7 +13,7 @@ function Pool (port, host, https, credentials) {
this.minClients = 0;
this.maxClients = 8;
}
-sys.inherits(Pool, events.EventEmitter);
+util.inherits(Pool, events.EventEmitter);
Pool.prototype.getClient = function (cb) {
for (var i=0;i