Project

smart_diff

0.0
No commit activity in last 3 years
No release in over 3 years
Create Semantic Diffs of Ruby source code based on the AST.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 0.5.1
 Project Readme

SmartDiff

This is a port to Ruby of part of @yinwang0's psydiff. Specifically, I've ported the htmlizer part of his app, which converts a semantic diff into an html page which can be viewed in a webbrowser to make visual the information contained in the diff. @yinwang0 has written extensively about semantic diffing on his blog and also about psydiff.

I created this port to demonstrate the use of the NodeDiff classes I recently added to JRubyParser and to serve as an example of using it. I should make clear that JRubyParser and said NodeDiff classes are entirely unrelated to psydiff, except that they do something quite similar (create a diff of source code based on the AST rather than comparing the text directly).

This application should especially serve as an example of using the subdiff's produced by NodeDiff to improve the quality of the output. See bin/smart_diff or check out the docs.

Install

$ jruby -S gem install smart_diff

Usage

Run smart_diff along with the paths to two versions of a ruby source file.

smart_diff example/bar.rb example/foo.rb

This will output an html file you can open in your browser. Check out Example.html for a sample of the output.

LICENSE

Copyright (C) 2011-2013 Yin Wang

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.