Permalink
Browse files

update mongodb package

  • Loading branch information...
1 parent f99012e commit 465af1733e5bf938a93dd46fe97741f05b4dc789 Adriano Raiano committed Dec 5, 2012
Showing with 5 additions and 5 deletions.
  1. +2 −2 storage/mongoDb/package.json
  2. +3 −3 storage/mongoDb/storage.js
@@ -1,7 +1,7 @@
{
"author": "Jan Muehlemann, Adriano Raiano"
, "name": "eventstore.mongoDb"
- , "version": "0.6.0"
+ , "version": "0.6.1"
, "contributors": [
{ "name": "Jan Muehlemann", "email": "jan.muehlemann@gmail.com" },
{ "name": "Adriano Raiano", "email": "adriano@raiano.ch" }
@@ -16,7 +16,7 @@
"node": ">= v0.6.15"
}
, "dependencies": {
- "mongodb": ">= 0.0.1"
+ "mongodb": ">=1.2.2"
}
, "devDependencies": {
"mocha": ">= 0.0.1"
@@ -22,7 +22,7 @@ if (typeof exports !== 'undefined') {
mongoDbStorage = root.mongoDbStorage = {};
}
-mongoDbStorage.VERSION = '0.5.0';
+mongoDbStorage.VERSION = '0.6.1';
// Create new instance of storage.
mongoDbStorage.createStorage = function(options, callback) {
@@ -74,7 +74,7 @@ Storage.prototype = {
var self = this;
var server = new mongo.Server(this.options.host, this.options.port, this.options.options);
- new mongo.Db(this.options.dbName , server, {}).open(function(err, client) {
+ new mongo.Db(this.options.dbName , server, { safe: true }).open(function(err, client) {
if (err) {
if (callback) callback(err);
} else {
@@ -88,7 +88,7 @@ Storage.prototype = {
if (callback) callback(null, self);
};
- if (options.username) {
+ if (self.options.username) {
client.authenticate(self.options.username, self.options.password, finish);
} else {
finish();

0 comments on commit 465af17

Please sign in to comment.