Sinatra application that stores versions of things in Git repositories
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
test
.gitignore
README.textile
Rakefile
app.rb
config.ru
gitlocker.gemspec

README.textile

Introduction

This is a Sinatra application that provides restful git. It’s intended to be used to store versions of database fields, but you could do anything with it.

Here’s how I’m using it:

  • I have several web apps that need versioning for user-generated content
  • Each repository is mapped to a user in my client applications
  • Each repository holds database fields for models. If you checked out a copy, you’d see things like 1_field_name where 1 maps to a database table ID
  • Users can switch back to any version of a document
  • The repository is deleted if the user leaves the service

Configuration

Create a config.yml file in the same location as this README that specifies the location for the repositories:

path:
  tmp/

Client Library

I’ve written a client library that includes a Rails ActiveRecord plugin here:

gitlocker-client