redbadger/rugged — pull request #1 by charypar (2014-02-23 02:51:49+00:00)
Title: Simple redis backend implementation [WIP]

This is a proof of concept implementation of odb and refdb backends support for bare repos. It adds `:backend` option on `Rugged::Repository.bare` which can specify options for one of the included backends (currently just redis) as a hash:

```ruby
Rugged::Repository.bare("test", backend: { type: :redis, host: 'localhost', port: 6379 })
```

I also added tests for blob and ref operations using the backend.

If I can get this to work, I will extract the backends as a separate gem, or a set of gems with native extensions for each of the backends and change the support to be backend agnostic. The idea is to basically wrap a native backends in an extension that exposes it as an opaque ruby class (say `RuggedRedis::Backend`) that just wraps the native backend implementation. That ruby object can then be passed to `bare`, which can extract the backends from it and use them.

## Todo

- [x] get it to link and compile
- [ ] update hiredis odb backend to work with current libgit2
- [ ] add a redid refdb backend
- [ ] extract the redis backend and switch to the architecture described above

@jonsharratt