Added additional bad input error handling.

Change-Id: I1959bbdd7735efbc7110cd6ef22e29deadd4ea41
Reviewed-on: http://review.couchbase.org/37489
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Correct flush issues.

Corrected issue when handling flush REST response.
Additionally removed the test as it is unreliable
due to not flush being async, in addition to not
fitting within the constraints of the new testing
setup.

Change-Id: I8da906d07869fc9d191cc3db9030999130b69150
Reviewed-on: http://review.couchbase.org/37490
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Added support for Node 0.11.13.

Updated to nan 1.20.
Corrected slight incompatabilities with libuv.

Change-Id: Iae131a203885554a2184717253e1ec368d36a93a
Reviewed-on: http://review.couchbase.org/38418
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Handle flush results correctly

as described in MB-11154 flush can result either in a 200 or a 201 HTTP
status, both of which need to be handled accordingly. The suggested
method is:

1. create a marker document
2. issue flush
3. if HTTP response == 200 flush finished correctly
4. if HTTP response == 201 flush is still running
5. poll the marker doc until it is gone to be sure flush is finished

Change-Id: I8d30fb6f76414d15dad68726477b1a14270d13f9
Reviewed-on: http://review.couchbase.org/38412
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Philipp Fehre <philipp@couchbase.com>
Updated to libcouchbase 2.4.0.

Change-Id: I08e50b59da9d6f546a4cedf699050cc6b447b88c
Reviewed-on: http://review.couchbase.org/38419
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Implement SDK 2.0 API.

Changed name of a few methods.
Implemented support for DSNs.
Support for SSL.
Bootstrap based connection event.

Change-Id: I5ebaee8a61f9cd9a0e7630d5cf909b79322b4b57
Reviewed-on: http://review.couchbase.org/38420
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
JSCBC-119: Allow Function objects as map/reduce values.

Iterate through the list of views and their map/reduce
functions and convert any Function objects to their string
representations first.

Change-Id: I059056452996e6e12a4514ac04b0ba3f26d3652d
Reviewed-on: http://review.couchbase.org/38423
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Add support for spatial view queries.

Change-Id: I05f2ad7ae14219a9491ee0ca434e14f38715f013
Reviewed-on: http://review.couchbase.org/37073
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Update constructor to not defaulty throw on connect error.

Originally, the constructor would assign a connect callback which
threw, even if the user did not want this to be the case.  The
logic has been updated such that any unexpected errors inside the
constructor will throw, but the connect event will not.

Change-Id: I4a5f58ebd0f38a58653ab5f090d49d8db1602f8a
Reviewed-on: http://review.couchbase.org/38731
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Increase test timeouts.

Increased timeouts to increase chance of
tests being successful when executed against
a loaded cluster.

Change-Id: Ifbad3cd58775576d3180a11121a4abefa9259540
Reviewed-on: http://review.couchbase.org/38732
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Adjust timeouts a bit more.

Change-Id: Iad20c80c815683ee545fab433b7912d215d3b767
Reviewed-on: http://review.couchbase.org/38755
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Release 2.0.0-dp1

Change-Id: Id587235f5c3ac8fbce992c6762ab347cec2e4787
Reviewed-on: http://review.couchbase.org/38754
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Improving the mock.js constructor to better model the real one.

The callback on connection is a critical feature of the real
connection and was missing, so we've added it.
Still room for improvement.

Change-Id: I3bbda1c98af2a465947c985405cfb4eb48a07d2f
Reviewed-on: http://review.couchbase.org/39431
Reviewed-by: Alex McFadyen <couchbase@acmconsulting.eu>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Correct use of deprecated function in example.

Change-Id: I2cf5915e02ae2915c875f62f85c46afb0bed32cc
Reviewed-on: http://review.couchbase.org/39147
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Update to latest libcouchbase (2.4.0)

Change-Id: Ic1b28cfe7d6eb050c6c37ac1be80c953823e490f
Reviewed-on: http://review.couchbase.org/40041
Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Mass 2.0 Refactor

Change-Id: I13b9bdb8b5f4564ac277da87a98f9f63e36850ab
Reviewed-on: http://review.couchbase.org/39934
Reviewed-by: Jeffry Morris <jeffrymorris@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Release 2.0.0-beta

Change-Id: Ic2193818026bfe9090f72f5cba212746ee010ca0
Reviewed-on: http://review.couchbase.org/40285
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Delete accidentally included file.

Change-Id: I8f75aecee3673996b306da65eaed92ac7c6c9777
Reviewed-on: http://review.couchbase.org/41190
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
JSCBC-132: Fixed incorrect expiry option validation.

Change-Id: I83e6583d69e63d301404b6e6fbbd83bc81db59d9
Reviewed-on: http://review.couchbase.org/40691
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
JSCBC-145: Correct issue with inclusive_end on view queries.

Change-Id: Icb65a738230f9ed34a01739699481f79c15980f0
Reviewed-on: http://review.couchbase.org/41185
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>