provideal/tabulatr — pull request #31 by plukevdh (2012-01-19 19:35:10+00:00)
Title: Adapter strategy

The `Tabulatr::Finder.find_for_table` method is a complete clusterfuck with no easy means of extending if I wanted to use, say mongomapper, datamapper or any other ORM rather than mongoid/AR.

Extracted functionality into adapter classes.

That method still ought to be refactored massively. This is a start and leaves room for extendability.

Also, why the weird conditions (tralse?) in your tests? You do know you can filter tests by line number with rspec right? I can pull that out of this commit if it would help it get merged in, but I don't understand why those are in there.

Also made running Mongo tests over AR easier by looking for an env var rather than a temp file. Can simply run w/ `USE_MONGOID=true rspec`