mateodelnorte/coinbase — pull request #6 by woloski (2014-05-04 16:08:41+00:00)
Title: implement send_money and refactored get/post error handling

change log:

* implemented `send_money` (https://coinbase.com/api/doc/1.0/transactions/send_money.html)
* refactored the way errors were being handled.
* try/catch should only be applied to `JSON.parse`, not to the callback. It was being applied to the success callback, so when tests failed because some assertion failed, it was being caught by the catch block and the test error was not bubbled to mocha.
* also removed all the if/else and made the code more defensive and easy to follow (i.e. cut the flow if there was an error)
* moved all the "transaction tests" to the bottom with a warning and a `skip`