Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (16 sloc) 0.547 kb
require 'rubygems'
require 'pathname'
$:.unshift File.expand_path('../../lib', __FILE__)
require 'adapter/git'
require 'grit'
repo = Grit::Repo.init(File.expand_path('../test', __FILE__))
adapter = Adapter[:git].new(repo)
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')
Jump to Line
Something went wrong with that request. Please try again.