Closed tarqd closed 13 years ago
I also added all the commits from your latest commit manually
looks like a good start, but I'd like a cleaner set of commits before I merge it into the master
Alright, I've added in what I think should work, but haven't got a good way to test it. I'm also not sure how to add it to the vows tests, since you need a specially configured server for it to even work.
Thanks! I'd test it myself but I'm currently away but you can use this for testing if oyu want
Server: flame.mongohq.com:27028
Database Name: mongolian_test
Username: mongolian
Password: passw0rd
or there's always mongohq.com that uses authentication
Ok, it's definite not working right now, I just get "auth fails" back from the server.
Apparently I'm also getting "db assertion failure".
Alright. Figured it out. It's working now. :-)
I added authentication support and it seems to be pretty stable. Usage is as follows
After that any command that needs to be sent after authentication will be queued if the authentication proccess hasn't finished, and if it fails it will trigger an error for all queued commands.
For example:
It will also re-authenticate after the connection timesout or is closed
Another thing I fixed was that for some reason
new MongolianError("anything")
actually returned a blank object ({}
) because of the call toError.apply
. I changed this out and now it works fine but it looks a bit ugly.