diff --git a/package.json b/package.json index ff57124..0355b45 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "test": "grunt test" }, "dependencies": { - "couchapp": "0.10.1", + "couchapp": "0.10.*", "grunt": "~0.3.12", "nano": "3.3.0" }, diff --git a/tasks/couchapp.js b/tasks/couchapp.js index 1f64dc8..4c106bb 100755 --- a/tasks/couchapp.js +++ b/tasks/couchapp.js @@ -23,6 +23,17 @@ var genDB = function(db) { }; }; +var genDB = function(db) { + var parts, dbname, auth; + parts = urls.parse(db); + dbname = parts.pathname.replace(/^\//, ''); + auth = parts.auth ? (parts.auth + '@') : ''; + return { + name: dbname, + url: parts.protocol + '//' + auth + parts.host + }; +}; + module.exports = function(grunt) { // ==========================================================================