admc/wd — pull request #141 by MattiSG (2013-07-08 09:42:40+00:00)
Title: Make constructor compatible with Node's `url.parse`

Hi there!

In order to facilitate `wd`'s interaction with other libraries, it would be much easier to construct instances through a standard syntax instead of indexed parameters.

The current hash syntax for construction is already better than indexed parameters. However, there is a syntax that would probably be worth respecting as a common ground, if not a standard: Node's [`url`](http://nodejs.org/docs/v0.10.0/api/url.html#url_url) hash representation is probably the most common way to represent URLs in Node applications.
The main difference with the current implementation is in the `auth` key instead of the `username`/`accessKey` pair, along with the meaning of `host` (vs. `hostname`).

This changeset makes `wd`'s hash constructor compatible with `url.parse`-generated URL hash representations, and documents the different constructors offered by the library.

Thanks for WD, it is, in my research, the most complete library for Selenium in Node at the moment :)

Best,
Matti