GitXplorerGitXplorer
b

adapter-git

public
43 stars
3 forks
0 issues

Commits

List of commits on branch master.
Unverified
36e94204b866a1e97b65646cacd6de401797192d

Merge pull request #3 from teleological/adapter_v070

ttekknolagi committed 9 years ago
Unverified
6a7665f30b08039fac533c31db55caabf60d0c2a

Support for git options

tteleological committed 11 years ago
Unverified
4e30a527ca0efc710128a8e882ba374789660557

Compatibility with adapter v0.7.0

tteleological committed 11 years ago
Unverified
24ff408e8ca8db6d687ea8a28ced516fd6234663

Avoid creating commits if there are no changes

bbkeepers committed 13 years ago
Unverified
f290a5ffbccfef4b7579a93f5beebed0381ce019

Fix issue with calling #clear on an empty repo

bbkeepers committed 13 years ago
Unverified
decf810063dd3287aa314af5766cf27a311e5adf

Add :path option to use as a key prefix

bbkeepers committed 13 years ago

README

The README file for this repository.

= adapter-git

Git adapter for adapter gem.

require 'adapter/git'

repo = Grit::Repo.init('path/to/repo')
adapter = Adapter[:git].new(repo, :branch => 'data', :path => 'db/records')
adapter.clear

adapter.write('foo', 'bar')
puts 'Should be bar: ' + adapter.read('foo').inspect

adapter.delete('foo')
puts 'Should be nil: ' + adapter.read('foo').inspect

adapter.write('foo', 'bar')
adapter.clear
puts 'Should be nil: ' + adapter.read('foo').inspect

puts 'Should be bar: ' + adapter.fetch('foo', 'bar')

See examples/ or specs/ for more usage.

== Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so we don't break it in a future version unintentionally.
  • Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine, but bump version in a commit by itself so we can ignore when we pull)
  • Send us a pull request. Bonus points for topic branches.