gett/mongojs — pull request #81 by sorribas (2013-08-30 18:11:20+00:00)
Title: Fix a couple of db.runCommand() issues

This fixes 2 use cases of the `db.runCommand()` that didn't work on mongojs. The first was to run a database command that doesn't receive a parameter such as `db.ping()`. For example the following statements

```js
db.runCommand({ping:1});
db.runCommand('ping');
```

Are equivalent in the mongo shell. The first worked in mongojs but the second didn't.

The other case was using a command that gets applied to a collection without parameters such as

```js
db.runCommand('count');
db.runCommand('count', {});
```

These 2 lines are equivalent in the mongo shell but the first one didn't work on mongojs. This pull request fixes both this issues, adds a test case for each one and updates the docs accordingly.