longform/fauna-ruby — pull request #2 by wam (2014-06-05 07:28:00+00:00)
Title: Two possible ways to handle transactions (RFC SPIKE - don't merge)

See https://www.pivotaltracker.com/story/show/72674486 and https://github.com/fauna/fauna-ruby/issues/46

This changeset contains two separate hypotheticals:

The first way involves a new client method called `post_transaction` that does what it says on the tin. It would post a manually assembled array of actions and update the cache if possible. It doesn't entirely solve the cache update problem, but it doesn't barf on transactions that end with a DELETE action.

The second way involves a new `Fauna::Transaction` class and a `Fauna::Client.transaction` method that takes a block and offers the usual client methods on the parameter passed to that block. It doesn't address the cache update problem at all yet.