Skip to content

bilbof/patchy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patchy

Apply patches from Diffy

Handy if you want to just store/send minimal diffs.

require 'diffy'
require './patchy/patch'

string1 = <<-TXT
Hello how are you
I'm fine
That's great
TXT

string2 = <<-TXT
Hello how are you
I'm fine
That's swell
TXT

diffy = Diffy::Diff.new(string1, string2, context: 0, include_diff_info: true)
patchy = Patchy::Patch.new(string1, diffy.diff)

patchy.patched == string2

About

Patches for Diffy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages