Skip to content

Instantly share code, notes, and snippets.

@quackingduck
Created July 31, 2008 01:05
Show Gist options
  • Save quackingduck/3368 to your computer and use it in GitHub Desktop.
Save quackingduck/3368 to your computer and use it in GitHub Desktop.
j = JournalEntry.new(MyModel) # => create dir: `/myrepo/_journal/$TIMESTAMP.$USEC`
j.write('myfile.txt' => 'contents') # => creates changes.zip
j.delete('oldfile.txt') # => creates deletes.txt
j.close # => rename `/myrepo/_journal/$TIMESTAMP.$USEC` to `/myrepo/_journal/$TIMESTAMP.$USEC.MyModel`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment