Permalink
Browse files

Cleaned up (removed unnecessary submodules)

Converted tests to new redis lib
  • Loading branch information...
1 parent b701411 commit fff322ccce6e810354cba195aff66afb9ac09327 @maritz committed Oct 25, 2010
Showing with 12 additions and 25 deletions.
  1. +0 −9 .gitmodules
  2. +0 −1 lib/conductor
  3. +1 −1 lib/nohm.js
  4. +0 −1 lib/redis-node
  5. +0 −1 lib/redis-node-multi
  6. +2 −2 package.json
  7. +5 −5 test/features.js
  8. +1 −1 test/find.js
  9. +1 −1 test/relations.js
  10. +2 −3 test/tests.js
View
9 .gitmodules
@@ -1,15 +1,6 @@
-[submodule "lib/redis-node"]
- path = lib/redis-node
- url = git://github.com/fictorial/redis-node-client.git
[submodule "test/nodeunit"]
path = test/nodeunit
url = git://github.com/caolan/nodeunit.git
[submodule "lib/double-metaphone"]
path = lib/double-metaphone
url = git://github.com/maritz/js-double-metaphone.git
-[submodule "lib/conductor"]
- path = lib/conductor
- url = git://github.com/creationix/conductor.git
-[submodule "lib/redis-node-multi"]
- path = lib/redis-node-multi
- url = git://github.com/spahl/redis-node-client.git
1 lib/conductor
@@ -1 +0,0 @@
-Subproject commit c00ff7a6baa87909fcc35890a7c2fe98b524a7b8
View
2 lib/nohm.js
@@ -4,7 +4,7 @@ var sys = require('sys'),
Class = require(__dirname + '/class').Class,
redis = require('redis'),
client = redis.createClient(),
-Conduct = require(__dirname + '/conductor/lib/conductor'),
+Conduct = require('conductor'),
helpers = require(__dirname + '/helpers'),
intersections = helpers.intersections,
numToAlpha = helpers.numToAlpha,
1 lib/redis-node
@@ -1 +0,0 @@
-Subproject commit 583f75104662fdc87cc06510948494d2e2134f8f
1 lib/redis-node-multi
@@ -1 +0,0 @@
-Subproject commit 71ac6e2afb8252d5dace4ebc7d36f5ee24c278b1
View
4 package.json
@@ -1,8 +1,8 @@
{
"name": "nohm",
- "version": "0.1.4",
+ "version": "0.1.5",
"engines": {
- "node" : ">=0.2.0"
+ "node" : ">=0.2.3"
},
"author": "Moritz Peters",
"directories": {
View
10 test/features.js
@@ -5,8 +5,8 @@ exports.checkModules = function (t) {
var redis, nohm, Class, Conduct;
t.expect(4);
- redis = require('redis-client');
- t.ok(typeof redis.Client === 'function', 'redis-client should be available -- forgot to do "git submodule update --init"?');
+ redis = require('redis');
+ t.ok(typeof redis.createClient === 'function', 'the redis client library should be available.');
nohm = require('nohm');
t.ok(typeof nohm.Model === 'function', 'nohm should be available -- something is fishy here.');
@@ -15,7 +15,7 @@ exports.checkModules = function (t) {
t.ok(typeof Class.Class === 'function', 'Class should be available -- forgot to do "git submodule update --init"?');
Conduct = require('conductor');
- t.ok(typeof Conduct === 'function', 'Conductor should be available -- forgot to do "git submodule update --init"?');
+ t.ok(typeof Conduct === 'function', 'Conductor should be available.');
t.done();
};
@@ -29,7 +29,7 @@ process.argv.forEach(function (val, index) {
});
// real tests start in 3.. 2.. 1.. NOW!
-var redis = require('redis-client').createClient();
+var redis = require('redis').createClient();
var nohm = require('nohm');
var Conduct = require('conductor');
var UserMockup = nohm.Model.extend({
@@ -460,7 +460,7 @@ exports.indexes = function (t) {
function checkVisitsIndex(callback) {
redis.zscore(prefix + ':scoredindex:UserMockup:visits', user.id, function (err, value) {
t.ok(!err, 'There was an unexpected problem: ' + sys.inspect(err));
- t.ok(value === user.p('visits'), 'The visits index did not have the correct score.');
+ t.ok(value == user.p('visits'), 'The visits index did not have the correct score.');
redis.sismember(prefix + ':index:UserMockup:visits:' + user.p('visits'), user.id, function (err, value) {
t.ok(!err, 'There was an unexpected problem: ' + sys.inspect(err));
t.ok(value === 1, 'The visits index did not have the user as one of its ids.');
View
2 test/find.js
@@ -10,7 +10,7 @@ process.argv.forEach(function (val, index) {
});
var relationsprefix = prefix + ':relations:';
-var redis = require('redis-client').createClient();
+var redis = require('redis').createClient();
var nohm = require('nohm');
var UserFindMockup = nohm.Model.extend({
constructor: function () {
View
2 test/relations.js
@@ -10,7 +10,7 @@ process.argv.forEach(function (val, index) {
});
var relationsprefix = prefix + ':relations:';
-var redis = require('redis-client').createClient();
+var redis = require('redis').createClient();
var nohm = require('nohm');
var UserLinkMockup = nohm.Model.extend({
constructor: function () {
View
5 test/tests.js
@@ -1,8 +1,7 @@
require.paths.unshift(__dirname); //tests
require.paths.unshift(__dirname + '/../lib'); // nohm itself
-require.paths.unshift(__dirname + '/../lib/redis-node-multi/lib'); // redis-node client lib
require.paths.unshift(__dirname + '/../lib/class/lib'); // class system
-require.paths.unshift(__dirname + '/../lib/conductor/lib'); // class system
+require.paths.unshift(__dirname + '/../lib/conductor/lib'); // conductor
var nodeunit = require('nodeunit')
, sys = require('sys');
@@ -68,7 +67,7 @@ var runner = function () {
run(['features.js', 'validations.js', 'relations.js', 'find.js']);
}
-var redis = require('redis-client').createClient();
+var redis = require('redis').createClient();
redis.keys(prefix + ':*', function (err, keys) {
if (!keys || keys.length == 0) {
return runner();

0 comments on commit fff322c

Please sign in to comment.