meh/amnesia — pull request #6 by mathieul (2013-08-05 14:02:40+00:00)
Title: Rename Amnesia.transaction! to Amnesia.sync_transaction to work around syntax error with Elixir 0.10.1

Hello, and thank you for Amnesia!

I haven't been able to use Amnesia with Elixir 0.10.1. My client code and database_test.exs wouldn't compile because of a syntax error on the line calling Amnesia.transaction!:

```
$ mix test
** (SyntaxError) /Users/mathieul/Documents/Development/Vendor/amnesia/test/database_test.exs:51: syntax error before: do
/private/tmp/elixir-IDpY/elixir-0.10.1/lib/elixir/lib/code.ex:291: Code.require_file/2
/private/tmp/elixir-IDpY/elixir-0.10.1/lib/elixir/lib/kernel/parallel_require.ex:48: Kernel.ParallelRequire."-spawn_requires/5-fun-0-"/5
```

I'm pretty new at Elixir, and didn't find the cause. But I found that just renaming it without a "!" did fix it. So I renamed it to the original mnesia method name.

Also the function/do syntax is now deprecated, so I replaced those calls with fn -> ... end.

Cheers,

Mathieu