ben

ben at

The test suite is telling me that, in order to upgrade an app from 1.8.7 to 2.0, I only need to switch from FasterCSV to the Ruby CSV library, and fiddle with the order of some hash keys in the tests.

Colour me suspicious.

Matt Molyneaux likes this.

If I'm not mistaken FasterCSV was written by James Edward Gray and that library was later made into the Ruby CSV library. Regarding hash keys, the new ordering follows the order in which they were created, unlike the old way (1.8.7) whereby the keys were in a sorted order.

jrobertson at 2015-04-16T09:23:16Z

You're not mistaken at all, FasterCSV became default and Hashes are now OrderedHashes.

I'm suspicious none of the application code needs changing, apart from find/replacing the hashrocket and lambda syntax!

ben at 2015-04-16T10:33:25Z

Hehe. Trust your tests, or improve them until you do. ;-)

I was developing for both 1.8.7 and 2.x and made my own multi-csv gem to handle the difference in gem names.

Unless you were doing some pretty exotic stuff, the transition to 2.0 wasn't actually that dramatic, it's mostly a matter of added functionality rather than anything source-incompatible.

Claes Wallin (韋嘉誠) at 2015-04-16T12:47:52Z

ben likes this.