mongopatch
Advanced tools
Comparing version 0.8.1 to 0.8.2
{ | ||
"name": "mongopatch", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"repository": "git://github.com/e-conomic/mongopatch.git", | ||
@@ -5,0 +5,0 @@ "description": "MongoDB patching tool", |
@@ -168,2 +168,6 @@ mongopatch [![Build Status](https://travis-ci.org/e-conomic/mongopatch.png?branch=master)](https://travis-ci.org/e-conomic/mongopatch) | ||
#### Version 0.8.2 | ||
- Make it possible to pass the log collection to the programmatic interface. Can be a string or `mongojs` collection instance. | ||
#### Version 0.8.1 | ||
@@ -170,0 +174,0 @@ |
@@ -15,2 +15,10 @@ var util = require('util'); | ||
var getCollection = function(db, collection) { | ||
if(typeof collection === 'string') { | ||
return db && db.collection(collection); | ||
} | ||
return collection; | ||
}; | ||
var getDatabase = function(db) { | ||
@@ -140,3 +148,3 @@ return (typeof db === 'string') ? mongojs(db) : db; | ||
var logCollection = logDb && logDb.collection(that.id); | ||
var logCollection = getCollection(logDb, options.logCollection || that.id); | ||
var updateStream; | ||
@@ -143,0 +151,0 @@ |
39640
983
203