Browse files

[fix] Updates to work with nconf@0.5.x

  • Loading branch information...
1 parent 391f007 commit a466c37b0202c151ce201265b554d6aa58b9f076 @indexzero committed Nov 28, 2011
Showing with 10 additions and 10 deletions.
  1. +3 −3 lib/nconf-redis.js
  2. +7 −7 test/nconf-redis-test.js
View
6 lib/nconf-redis.js
@@ -29,7 +29,7 @@ var Redis = exports.Redis = function (options) {
this.port = options.port || 6379;
this.db = options.db || 0;
this.ttl = options.ttl || 60 * 60 * 1000;
- this.cache = new nconf.stores.Memory();
+ this.cache = new nconf.Memory();
this.redis = redis.createClient(options.port, options.host);
this.redis.select(this.db);
@@ -45,10 +45,10 @@ var Redis = exports.Redis = function (options) {
};
//
-// Define a getter so that `nconf.stores.Redis`
+// Define a getter so that `nconf.Redis`
// is available and thus backwards compatible.
//
-nconf.stores.Redis = Redis;
+nconf.Redis = Redis;
//
// ### function get (key, callback)
View
14 test/nconf-redis-test.js
@@ -18,7 +18,7 @@ require('../lib/nconf-redis');
vows.describe('nconf/stores/redis').addBatch({
"When using the nconf redis store": {
- topic: new nconf.stores.Redis(),
+ topic: new nconf.Redis(),
"the set() method": {
"with a literal": {
topic: function (store) {
@@ -56,7 +56,7 @@ vows.describe('nconf/stores/redis').addBatch({
}
}).addBatch({
"When using the nconf redis store": {
- topic: new nconf.stores.Redis(),
+ topic: new nconf.Redis(),
"the get() method": {
"with a literal value": {
topic: function (store) {
@@ -102,7 +102,7 @@ vows.describe('nconf/stores/redis').addBatch({
}
}).addBatch({
"When using the nconf redis store": {
- topic: new nconf.stores.Redis(),
+ topic: new nconf.Redis(),
"the clear() method": {
topic: function (store) {
var that = this;
@@ -122,7 +122,7 @@ vows.describe('nconf/stores/redis').addBatch({
}
}).addBatch({
"When using the nconf redis store": {
- topic: new nconf.stores.Redis(),
+ topic: new nconf.Redis(),
"the save() method": {
topic: function (store) {
var that = this;
@@ -142,7 +142,7 @@ vows.describe('nconf/stores/redis').addBatch({
}
}).addBatch({
"When using the nconf redis store": {
- topic: new nconf.stores.Redis(),
+ topic: new nconf.Redis(),
"the load() method": {
topic: function (store) {
store.load(this.callback);
@@ -155,7 +155,7 @@ vows.describe('nconf/stores/redis').addBatch({
}
}).addBatch({
"when using the nconf redis store": {
- topic: new nconf.stores.Redis(),
+ topic: new nconf.Redis(),
"the merge() method": {
"when overriding an existing literal value": {
topic: function (store) {
@@ -216,7 +216,7 @@ vows.describe('nconf/stores/redis').addBatch({
}
}).addBatch({
"When using the nconf redis store": {
- topic: new nconf.stores.Redis(),
+ topic: new nconf.Redis(),
"the reset() method": {
topic: function (store) {
var that = this;

0 comments on commit a466c37

Please sign in to comment.