datamapper/dm-mapper — pull request #33 by snusnu (2013-02-16 23:35:20+00:00)
Title: Remove engines and back relation mappers with veritas only

This removes the whole concept of engines as we had them before. Since we decided to back relational mappers with veritas only, they make no sense anymore. This PR introduces `Repository` objects that can either be `InMemory` or `Persistent`. Persistent repositories keep track of gateway relations that provide access to relations using a given `adapter`. InMemory repositories simply keep track of `Veritas::Relation` instances.

Basically, this PR also introduces the possibility to run everything in memory, providing us with a way to run all our tests against the "reference implementation" (in addition to running them against any specific veritas adapter).

This also opens up further development / refactoring regarding `#insert`, `#update` and `#delete` which in turn should move us towards session integration. Nothing is stopping us from writing unit and integration specs for these operations, since we don't have to rely on (S)QL generation anymore to test our expectations.

I also think that it's worth to mention that once this PR is done, we made another tiny step towards making `dm-mapper` a more viable choice for developing apps even now. I expect most app development can (happily) accept to write tests against the in memory reference implementation, not caring about loosing data on shutdown. This in turn buys us some more time to finally implement full `#insert`, `#update` and `#delete` support for SQL generation.