postwait/node-amqp — pull request #236 by ssafejava (2013-08-23 09:21:58+00:00)
Title: Refactor project, fix all non-passing tests, fix #230 and other issues

I was having some serious trouble getting node-amqp to run stably on a project I'm working on. After spending some time debugging it, I figured it desperately needed some cleanup.

I've refactored all classes into their own separate files, removed some incorrect JS style, added lodash in a few places for easier options parsing and iteration, and longjohn and optimist for the unit tests.

I've cleaned up a few inconsistencies in the test code and added comments. In the current HEAD about 6 tests are passing; in this refactored version, every test is passing, and a few have additional asserts.

This version is considerably easier to maintain, which should encourage contributors to post more PRs and fix more bugs. My [other pull](https://github.com/postwait/node-amqp/pull/235) incorporates Travis CI support, so we can keep on top of which patches break functionality. Unfortunately there appear to be some odd errors related to their local rabbitMQ hosting, but I will keep an eye on it and see what I can do.