This is admittedly ghetto, but I needed a super simple small-scale solution to creating unified diffs based off large blocks of text. The easiest way to do this was by creating temp file and using the native diff command to do the comparison.
I’ve used this method for a really small snippets app for our intranet, which can be found on GitHub.
It can use some work (definitely use some work), but it gets the job done. I’ve also tried to fit this diff library into the build, but it wasn’t what I was looking for at the time.
Rob Hurring is a software engineer residing in the NJ tri-state area. He spends most of his time writing Ruby code or hacking on whatever he finds neat.