dotcloud/hipache — pull request #80 by dmp42 (2014-03-10 15:11:12+00:00)
Title: Add gulp + mocha, start refactoring accessLog / master + tests

I would love to see more tests in Hipache.

IMHO, to be able to do so requires some refactoring, so that modules are more standalone and there is less coupling between (somewhat unrelated) code paths.

So, this first PR would like to show what could be done by:

* adding some instrumentation to ease/speed-up development and testing (gulp/watch + jshint + mocha) - (try `npm install gulp -g && npm install && gulp hackonit`)
* extracting "accessLog" from master, and make it a standalone, testable module, with less coupling
* adding more tests for accessLog - on top of mocha / chai

The ideas would be:

* add little to no extra complexity to existing code
* preserve existing behavior and public API
* split things in more atomic, simpler to test, independent modules
* have a s* load of tests

Although this PR looks somewhat big - it is based on top of #79, and really starts with 87fd4b5.

I would certainly welcome any comment / suggestion on how to do this in a way that would better match with the project style / needs (I can sure squash if you guys prefer it that way) - and amend accordingly - so, please voice any concern about this PR specifically, or the global refactoring project as a whole.

Thanks!