Introducing the DiffyC32 gem
Usage:
require 'diffyc32'
string1 = <<-TXT
Hello how are you
I'm fine
That's great
TXT
#=> "Hello how are you\nI'm fine\nThat's great\n"
string2 = <<-TXT
Hello how are you?
I'm fine
That's swell
TXT
puts DiffyC32.new(string1, string2).to_s
The DiffyC32 gem uses the Diffy gem to compare 2 strings of text and show the differences using coloured text.
Below is a screenshot of the above output.
Resources
- diffyc32 https://rubygems.org/gems/diffyc32
diffy diffyc32 gem