Permalink
Browse files

[fix] Changed require('sys') to require('util') for compatibility wit…

…h node v0.8
  • Loading branch information...
1 parent 688ea72 commit f63da5739cbcece315aeba8982238c8e29196af3 @blakmatrix blakmatrix committed Jun 23, 2012
Showing with 15 additions and 15 deletions.
  1. +9 −9 examples/person.js
  2. +5 −5 lib/dep/couchdb.js
  3. +1 −1 tests/index.js
View
@@ -1,5 +1,5 @@
-var sys = require('sys');
-sys.puts('Running... Hit CTRL-C To Exit.');
+var util = require('util');
+util.puts('Running... Hit CTRL-C To Exit.');
var endtable = require('../lib');
@@ -10,14 +10,14 @@ var engine = new endtable.Engine({
password: '',
errorCallback: function(error) {
// When views aren't found they raise a warning.
- sys.puts(JSON.stringify(error));
+ util.puts(JSON.stringify(error));
}
});
var Person = endtable.Object.extend(
{
sayName: function() {
- sys.puts('Hello, my name is ' + this.name + '!');
+ util.puts('Hello, my name is ' + this.name + '!');
}
},
{
@@ -29,7 +29,7 @@ var Person = endtable.Object.extend(
var Dog = endtable.Object.extend(
{
bark: function() {
- sys.puts('Woof!!!');
+ util.puts('Woof!!!');
}
},
{
@@ -39,14 +39,14 @@ var Dog = endtable.Object.extend(
);
function populateData() {
- sys.puts('Populating fake data.');
+ util.puts('Populating fake data.');
var christian = new Person({
name: 'Christian',
age: 28,
sex: 'male'
}, function(error, obj) {
- sys.puts('Created person.')
+ util.puts('Created person.')
})
setTimeout(function() {
@@ -90,7 +90,7 @@ function populateData() {
function performQuery() {
setTimeout(function() {
- sys.puts('Performing query.');
+ util.puts('Performing query.');
Person.load({
keys: 'age',
@@ -117,7 +117,7 @@ function performQuery() {
}
(function resetDatabase(callback) {
- sys.puts('Resetting database.');
+ util.puts('Resetting database.');
engine.connector.deleteDatabase(function() {
engine.connector.createDatabase(function(error, doc) {
callback();
View
@@ -1,9 +1,9 @@
var
- sys = require("sys"),
+ util = require('util'),
events = require("events"),
http = require('http'),
fs = require('fs'),
- sys = require('sys'),
+ util = require('util'),
querystring = require('querystring'),
mime = require('./mime'),
base64 = require('./base64');
@@ -223,8 +223,8 @@ function requestOptions (args) {
// and then a function
var args = Array.prototype.slice.call(args, 0);
cb = (typeof args[args.length-1] === "function") ? args.pop() : null;
- // sys.debug(args.length);
- // sys.debug(sys.inspect(args));
+ // util.debug(args.length);
+ // util.debug(util.inspect(args));
var method = args.shift(),
path = args.shift(),
@@ -245,7 +245,7 @@ function requestOptions (args) {
}
}
options.cb = cb;
- // sys.debug("requestOptions2 "+sys.inspect(options));
+ // util.debug("requestOptions2 "+util.inspect(options));
return options;
}
View
@@ -1,5 +1,5 @@
var endtable = require('../lib'),
- puts = require('sys').puts,
+ puts = require('util').puts,
tests = [],
couchConnectorTests = require('./couch-connector-test'),
endtableObjectTests = require('./endtable-object-test'),

0 comments on commit f63da57

Please sign in to comment.