Btw, could you check that raising an exception inside the block restores the previous `Spira.repository`? I think it should better be:
```
def using_repository(repo)
  ...
  yield if block_given?
ensure
  Spira.repository = old_repository
end
```