Skip to content

Instantly share code, notes, and snippets.

@ioquatix
Created March 20, 2013 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ioquatix/5202492 to your computer and use it in GitHub Desktop.
Save ioquatix/5202492 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'merge3'
ORIGINAL = <<EOF
Hello World
Foo Bar
EOF
USER = <<EOF
Hello World
(User) Garden Hose
Foo Bar
(User) Baz Dog
EOF
UPDATED = <<EOF
Hello World
Foo Bark
(Updated) Apples and oranges
EOF
puts Merge3::three_way(ORIGINAL, USER, UPDATED)
# Expecting:
EXPECTED = <<EOF
Hello World
(User) Garden Hose
Foo Bark
(Updated) Apples and oranges
(User) Baz Dog
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment