Skip to content

Instantly share code, notes, and snippets.

@pencilcheck
Created March 5, 2012 09:56
Show Gist options
  • Save pencilcheck/1977690 to your computer and use it in GitHub Desktop.
Save pencilcheck/1977690 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'bundler/setup'
require 'RRDiff'
require 'tempfile'
module RDiff
def rsync_signature
sig_file = Tempfile.new File.basename(self.path)
#sig_file.close
puts self.path
puts sig_file.path
RRDiff.signature self.path, sig_file.path
sig_file
end
def rsync_delta_from_sig(sig)
end
def rsync_patch_with_delta(delta)
end
end
class File
include RDiff
end
#file = Tempfile.new 'test'
#file.write "blah blah blah"
#test_file = Tempfile.new 'test'
#test_file.write "blah blah blah"
#test_file.rsync_signature
#file.rsync_signature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment