From 2a9e2bb0e0d2b1e6abde70f99c43d3706e36024a Mon Sep 17 00:00:00 2001 From: Farrin Reid Date: Sat, 23 Jun 2012 03:07:03 -0800 Subject: [PATCH] [fix] Changed require('sys') to require('util') for compatibility with node v0.8 --- autotest.js | 6 +++--- examples/commands.js | 2 +- lib/client.js | 2 +- spec/attach_handlers_spec.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/autotest.js b/autotest.js index 8690478..66e820c 100644 --- a/autotest.js +++ b/autotest.js @@ -5,17 +5,17 @@ var watch = require('nodewatch'); var growl = require('growl'); var Path= require('path'); var jasmine = require('jasmine-node'); -var sys = require('sys'); +var util = require('util'); growl.binVersion(function(err, version){ if (err) { - sys.puts('You have to install growlnotifier to be able to use autotest'); + util.puts('You have to install growlnotifier to be able to use autotest'); process.exit(1); } watch.add('./spec').add('./spec/spies').add('./lib').onChange(function(file,prev,curr){ - sys.puts('File ' + file + ' modified... Executing tests...'); + util.puts('File ' + file + ' modified... Executing tests...'); var specFolder = Path.join(process.cwd(), 'spec'); var libFolder = Path.join(process.cwd(), 'lib'); diff --git a/examples/commands.js b/examples/commands.js index 16c347f..bacbd13 100644 --- a/examples/commands.js +++ b/examples/commands.js @@ -14,7 +14,7 @@ // #### Include dependencies var connFu = require('connfu'); -var sys = require('sys'); +var util = require('util'); var express = require('express'); // #### Express Configuration diff --git a/lib/client.js b/lib/client.js index 246da62..33b42f3 100644 --- a/lib/client.js +++ b/lib/client.js @@ -49,7 +49,7 @@ exports = module.exports = client = function(apiKey, logger, options) { var https = options.useSsl ? require('https') : require('http'); var req = https.request(params, function(res) { var output = ''; - var sys = require('sys'); + var util = require('util'); // Read all the data from the response res.on('data', function(chunk) { diff --git a/spec/attach_handlers_spec.js b/spec/attach_handlers_spec.js index 7e588fa..412ff6a 100644 --- a/spec/attach_handlers_spec.js +++ b/spec/attach_handlers_spec.js @@ -1,5 +1,5 @@ var connFu = require('../index'); -sys = require('sys'); +util = require('util'); winston = require('winston'); /**