Quartz/Chartbuilder — pull request #78 by hpshelton (2013-08-29 07:06:55+00:00)
Title: Make Gneiss a real class and configure a test framework with basic tests

(Apologies in advance for the huge pull request)
### Gneiss refactor ###
* Significantly refactored the code structure for GneissChart.js. Instead of Gneiss setting global variables and manipulating them (which prevent multiple charts from existing on the same page), created a constructor that returns an instance of a Gneiss object with both data and functions hanging off of it that can be manipulated:
```
chart = new Gneiss(chartConfig).resize().setYAxis().etc()...
```
* Made the helpers (dateParsers, defaultConfig) static for ease-of-access.
* Inlined customYAxisFormat in Geniss since it doesn't belong in Chartbuilder and it seems like a reasonable default. We can work to clean this up further later, but it's better in the new class to ensure proper encapsulation.
* Fixed a few functional issues as I found them, and lots of formatting and code style issues

### Test framework ###
* Onboarded the [Jasmine test framework](pivotal.github.io/jasmine/) for unit testing Chartbuilder. You now can (and should) run JS unit tests by hitting /test/SpecRunner.html.
* Added a few basic tests for verifying helper functions as well as with GneissChart.js core functionality (including at least one test using basic DOM manipulation).

I just merged and walked back through most of the functionality manually to make sure we're not throwing any new exceptions or have any unexpected functional issues, but everything looks clean on Mac in Chrome and Safari and less broken than the current upstream master on Firefox (which appears to be due to [this bug](https://bugzilla.mozilla.org/show_bug.cgi?id=612118) which proposes a workaround of getBoundingClientRect() instead of getBBox()).

This puts us in a much better position to continue refactoring and cleaning up both Chartbuilder and Gneiss and doing more significant testing in Gneiss.

Let me know what you think as well as any questions/concerns/comments.

Parker