Skip to content

Commit

Permalink
sys deps removal. If there was a place where it was needed (ie: sys.i…
Browse files Browse the repository at this point in the history
…nherits) that is now util.inherits and util is a conditional based on the version.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
  • Loading branch information
ncb000gt committed Mar 9, 2011
1 parent db5bc49 commit 1739160
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 15 deletions.
3 changes: 1 addition & 2 deletions lib/cluster.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var utils = require('./utils'),
sys = require('sys');
var utils = require('./utils');

function Cluster() {
}
Expand Down
3 changes: 1 addition & 2 deletions lib/elasticsearch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var utils = require('./utils'),
Index = require('./index'),
sys = require('sys');
Index = require('./index');

function ElasticSearch(args) {
var opts = args[0],
Expand Down
3 changes: 1 addition & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var utils = require('./utils'),
sys = require('sys');
var utils = require('./utils');

function Index(opts) {
if (!opts) {
Expand Down
3 changes: 1 addition & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var http = require('http_compat'),
sys = require('sys');
var http = require('http_compat');

var default_config = module.exports.default_config = {
host: 'localhost',
Expand Down
3 changes: 1 addition & 2 deletions tests/suites/test-iface.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var sys = require('sys'),
Index = require('../../lib/index'),
var Index = require('../../lib/index'),
ES = require('../../lib/elasticsearch'),
lib = require('../../index');

Expand Down
3 changes: 1 addition & 2 deletions tests/suites/test-index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var sys = require('sys'),
testCase = require('../utils').indexTestCase;
var testCase = require('../utils').indexTestCase;

module.exports = testCase({
'check index status': function(assert) {
Expand Down
6 changes: 3 additions & 3 deletions tests/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var nodeunit = require('nodeunit'),
sys = require('sys'),
lib = require('../index'), //library index (more for noding this piece)
Index = require('../lib/index'), //search index
util = (process.version.match(/v0\.2/))?require('sys'):require('util'), //this needs to work in both 0.2.x and 0.4.x
exports = module.exports;

function clientTestCase(suite) {
Expand All @@ -22,7 +22,7 @@ function clientTestCase(suite) {
return clientTestCase.super_.call(this, suite);
}

sys.inherits(clientTestCase, nodeunit.testCase);
util.inherits(clientTestCase, nodeunit.testCase);
exports.clientTestCase = clientTestCase;

function indexTestCase(suite) {
Expand All @@ -44,5 +44,5 @@ function indexTestCase(suite) {
return indexTestCase.super_.call(this, suite);
}

sys.inherits(indexTestCase, nodeunit.testCase);
util.inherits(indexTestCase, nodeunit.testCase);
exports.indexTestCase = indexTestCase;

0 comments on commit 1739160

Please sign in to comment.