Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
sorribas committed Jun 20, 2013
2 parents fd3b42f + 5b0099d commit 14d803c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ Collection.prototype.remove = function() {
}
};

Collection.prototype.getIndexes = function() {
this._apply(DRIVER_COLLECTION_PROTO.indexes, arguments);
};

forEachMethod(DRIVER_COLLECTION_PROTO, Collection.prototype, function(methodName, fn) {
Collection.prototype[methodName] = function() { // we just proxy the rest of the methods directly
this._apply(fn, ensureCallback(arguments));
Expand Down Expand Up @@ -195,7 +199,7 @@ var toConnectionString = function(conf) { // backwards compat config map (use a

var parseConfig = function(cs) {
if (typeof cs === 'object' && cs) return toConnectionString(cs);

if (typeof cs !== 'string') throw new Error('connection string required'); // to avoid undef errors on bad conf
cs = cs.replace(/^\//, '');

if (cs.indexOf('/') < 0) return parseConfig('127.0.0.1/'+cs);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"db",
"mongodb"
],
"version": "0.7.5",
"version": "0.7.6",
"repository": "git://github.com/gett/mongojs.git",
"author": "Ge.tt <[email protected]>",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion tests/insert.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var assert = require('assert');
var mongojs = require('mongojs');
var mongojs = require('../index');
var db = mongojs('test', ['a']);

module.exports = function(docs, test) {
Expand Down
2 changes: 1 addition & 1 deletion tests/test-simple.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var assert = require('assert');
var mongojs = require('mongojs');
var mongojs = require('../index');
var db = mongojs('test', ['a','b']);

db.a.find(function(err, docs) {
Expand Down

0 comments on commit 14d803c

Please sign in to comment.