Permalink
Browse files

sys deps removal. If there was a place where it was needed (ie: sys.i…

…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...
1 parent db5bc49 commit 17391604347ed5fca8bc9cdcbedb772b5f61178c @ncb000gt committed Mar 9, 2011
Showing with 9 additions and 15 deletions.
  1. +1 −2 lib/cluster.js
  2. +1 −2 lib/elasticsearch.js
  3. +1 −2 lib/index.js
  4. +1 −2 lib/utils.js
  5. +1 −2 tests/suites/test-iface.js
  6. +1 −2 tests/suites/test-index.js
  7. +3 −3 tests/utils.js
View
@@ -1,5 +1,4 @@
-var utils = require('./utils'),
- sys = require('sys');
+var utils = require('./utils');
function Cluster() {
}
@@ -1,6 +1,5 @@
var utils = require('./utils'),
- Index = require('./index'),
- sys = require('sys');
+ Index = require('./index');
function ElasticSearch(args) {
var opts = args[0],
View
@@ -1,5 +1,4 @@
-var utils = require('./utils'),
- sys = require('sys');
+var utils = require('./utils');
function Index(opts) {
if (!opts) {
View
@@ -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',
@@ -1,5 +1,4 @@
-var sys = require('sys'),
- Index = require('../../lib/index'),
+var Index = require('../../lib/index'),
ES = require('../../lib/elasticsearch'),
lib = require('../../index');
@@ -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) {
View
@@ -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) {
@@ -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) {
@@ -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.