couchdb-bootstrap
Advanced tools
Comparing version 1.10.4 to 1.11.0
{ | ||
"name": "couchdb-bootstrap", | ||
"version": "1.10.4", | ||
"description": "Bootstrap projects: configure CouchDB, setup security, deploy ddocs and create users.", | ||
@@ -11,7 +10,8 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "tape test/*.js | tap-spec" | ||
"test": "tape test/*.js | tap-spec", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/eHealthAfrica/couchdb-bootstrap.git" | ||
"url": "https://github.com/eHealthAfrica/couchdb-bootstrap.git" | ||
}, | ||
@@ -33,3 +33,4 @@ "keywords": [ | ||
"tap-spec": "^3.0.0", | ||
"tape": "^4.0.0" | ||
"tape": "^4.0.0", | ||
"semantic-release": "^4.3.5" | ||
}, | ||
@@ -44,3 +45,4 @@ "dependencies": { | ||
"nano-option": "^1.0.0" | ||
} | ||
} | ||
}, | ||
"version": "1.11.0" | ||
} |
@@ -80,3 +80,3 @@ # CouchDB Bootstrap | ||
### Example | ||
### API Example | ||
@@ -103,3 +103,3 @@ ```js | ||
### Example | ||
### CLI Example | ||
@@ -106,0 +106,0 @@ ```sh |
@@ -46,2 +46,3 @@ var path = require('path') | ||
}, function(error, config) { | ||
if (error) return callback(error) | ||
async.map(Object.keys(config), function(key, next) { | ||
@@ -48,0 +49,0 @@ exports.couch.request({ |
@@ -6,5 +6,7 @@ var test = require('tape') | ||
test('configure', function(t) { | ||
helper.clearConfig(function() { | ||
helper.clearConfig(function(error) { | ||
t.error(error, 'no error occured') | ||
configure(helper.couch, helper.source, {}, function(error, responses) { | ||
t.notOk(error, 'no error occured') | ||
t.error(error, 'no error occured') | ||
@@ -11,0 +13,0 @@ helper.couch.request({ |
@@ -7,3 +7,3 @@ var test = require('tape') | ||
bootstrap(helper.url, helper.source, function(error, response) { | ||
t.notOk(error, 'no error occured') | ||
t.error(error, 'no error occured') | ||
@@ -10,0 +10,0 @@ t.end() |
@@ -11,2 +11,4 @@ var test = require('tape') | ||
}, function(error, response) { | ||
t.error(error, 'no error occured') | ||
t.ok(response.secure['custom-db-name'].ok, 'creates security in db with custom name') | ||
@@ -23,2 +25,4 @@ t.ok(response.push['custom-db-name'], 'pushes docs to db with custom name') | ||
}, function(error, response) { | ||
t.error(error, 'no error occured') | ||
t.ok(response.secure['foobar-couchdb-bootstrap'], 'creates security in db with custom name') | ||
@@ -25,0 +29,0 @@ t.ok(response.push['foobar-couchdb-bootstrap'], 'pushes docs to db with custom name') |
@@ -6,5 +6,7 @@ var test = require('tape') | ||
test('push docs', function(t) { | ||
helper.setup(function() { | ||
helper.setup(function(error) { | ||
t.error(error, 'no error occured') | ||
push(helper.couch, helper.source, {}, function(error, response) { | ||
t.notOk(error, 'no error occured') | ||
t.error(error, 'no error occured') | ||
@@ -11,0 +13,0 @@ Object.keys(helper.docs).forEach(function(db) { |
@@ -10,5 +10,7 @@ var test = require('tape') | ||
test('setup database securities', function(t) { | ||
setup(function() { | ||
setup(function(error) { | ||
t.error(error, 'no error occured') | ||
secure(helper.couch, helper.source, {}, function(error, responses) { | ||
t.notOk(error, 'no error occured') | ||
t.error(error, 'no error occured') | ||
@@ -15,0 +17,0 @@ helper.dbnames.forEach(function(dbname) { |
@@ -5,4 +5,4 @@ var test = require('tape') | ||
test('group by database', function(t) { | ||
utils.groupByDatabase('foo', function(err, result) { | ||
t.notOk(err, 'no error occured') | ||
utils.groupByDatabase('foo', function(error, result) { | ||
t.error(error, 'no error occured') | ||
t.ok(result.foo === 'bar', 'result is ok') | ||
@@ -14,6 +14,6 @@ t.end() | ||
test('group by database proxies error', function(t) { | ||
utils.groupByDatabase('foo', function(err, result) { | ||
t.ok(err, 'expected error occured') | ||
utils.groupByDatabase('foo', function(error, result) { | ||
t.ok(error, 'expected error occured') | ||
t.end() | ||
})(new Error('boom')) | ||
}); |
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license
Found 1 instance in 1 package
16832
27
350
4
2
80