Skip to content
This repository
Browse code

[cookies] fixes #77 #73 and #71

  • Loading branch information...
commit 003127da80c99b4338dbd93f7d08344081bf9164 1 parent 2f88c16
Nuno Job authored May 23, 2012
2  nano.js
@@ -801,7 +801,7 @@ module.exports = exports = nano = function database_module(cfg) {
801 801
       }
802 802
     }
803 803
   }
804  
-  
  804
+
805 805
   if(!(cfg && cfg.url)) {
806 806
     throw errs.create(
807 807
         { "scope"       : "init"
2  package.json
@@ -2,7 +2,7 @@
2 2
 , "description"     : "minimalistic couchdb driver for node.js"
3 3
 , "homepage"        : "http://github.com/dscape/nano"
4 4
 , "repository"      : "git://github.com/dscape/nano"
5  
-, "version"         : "3.0.3"
  5
+, "version"         : "3.0.4"
6 6
 , "author"          : "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)"
7 7
 , "contributors"    :
8 8
   [ "Thiago Arrais <thiago.arrais@gmail.com> (http://thiagoarrais.com)"
1  tests/fixtures/cfg.json
... ...
@@ -1,3 +1,4 @@
1 1
 { "timeout" : 20000
2 2
 , "couch"   : "http://localhost:5984"
  3
+, "admin"   : "http://admin:password@localhost:5984"
3 4
 }
9  tests/fixtures/shared/cookie.json
@@ -4,6 +4,11 @@
@@ -17,6 +22,10 @@
16  tests/helpers.js
@@ -31,11 +31,17 @@ function fake_chain() {
31 31
 }
32 32
 
33 33
 helpers.timeout = cfg.timeout;
34  
-helpers.nano = nano(cfg.couch);
35  
-helpers.Nano = nano;
36  
-helpers.couch = cfg.couch;
37  
-helpers.pixel = "Qk06AAAAAAAAADYAAAAoAAAAAQAAAP////8BABgAAAAA" + 
38  
-                "AAAAAAATCwAAEwsAAAAAAAAAAAAAWm2CAA==";
  34
+helpers.nano    = nano(cfg.couch);
  35
+helpers.Nano    = nano;
  36
+helpers.couch   = cfg.couch;
  37
+helpers.admin   = cfg.admin;
  38
+helpers.pixel   = "Qk06AAAAAAAAADYAAAAoAAAAAQAAAP////8BABgAAAAA" + 
  39
+                  "AAAAAAATCwAAEwsAAAAAAAAAAAAAWm2CAA==";
  40
+
  41
+var auth        = require("url").parse(cfg.admin).auth.split(":");
  42
+
  43
+helpers.username = auth[0];
  44
+helpers.password = auth[1];
39 45
 
40 46
 helpers.loadFixture = function helpersLoadFixture(filename, json) {
41 47
   var contents = fs.readFileSync(
56  tests/shared/cookie.js
@@ -6,31 +6,44 @@ var specify    = require("specify")
@@ -38,10 +51,17 @@ specify("shared_cookie:test", timeout, function (assert) {

0 notes on commit 003127d

Please sign in to comment.
Something went wrong with that request. Please try again.