darwin/csv2json — pull request #5 by rorygibson (2012-09-16 11:28:55+00:00)
Title: json2csv feature, fixed tests

I've fixed the existing tests.
The original code used a straight Ruby Hash, which at version < 1.9.x is unsorted.
I've changed the code to use an Ordered Hash - which means I've added a dependency on the 'orderedhash' gem (which has no deps of its own).
tests are now passing.

I've also added a new executable, class file and tests to allow for a 'json2csv' command; this works, but because the JSON spec says that the field order is undefined, you need to specify an explicit column order (using the -H option) or your CSV is liable to be different every time you run it :-)

Oh - and I've fixed the command line options; my previous pull request had overridden the help option by reusing '-h' .. sorry!

Aware there's quite a lot in one pull request; if you want me to break it up, I can.