Changeset 202

Show
Ignore:
Timestamp:
09/19/2007 05:50:30 (15 months ago)
Author:
zimbatm
Message:

Added :diff task to the Rakefile. This is the first step in camping.rb and
camping-unabridged.rb sync. It shows a diff of the parse trees.

Depends on the ParseTree? gem.

If you experience some problems with ParseTree? 2.0.1, there is a fix here :
http://rubyforge.org/tracker/?func=detail&atid=1778&aid=8022&group_id=439

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Rakefile

    r177 r202  
    1010REV = File.read(".svn/entries")[/committed-rev="(\d+)"/, 1] rescue nil 
    1111VERS = ENV['VERSION'] || ("1.5" + (REV ? ".#{REV}" : "")) 
    12 CLEAN.include ['**/.*.sw?', '*.gem', '.config', 'test/test.log'] 
     12CLEAN.include ['**/.*.sw?', '*.gem', '.config', 'test/test.log', '.*.pt'] 
    1313RDOC_OPTS = ['--quiet', '--title', "Camping, the Documentation", 
    1414    "--opname", "index.html", 
     
    116116#  t.verbose = true 
    117117end 
     118 
     119desc "Compare camping and camping-unabridged parse trees" 
     120task :diff do 
     121  if `which parse_tree_show`.strip.empty? 
     122    STDERR.puts "ERROR: parse_tree_show missing : `gem install ParseTree`" 
     123    exit 1 
     124  end 
     125 
     126  sh "parse_tree_show lib/camping.rb > .camping.pt" 
     127  sh "parse_tree_show lib/camping-unabridged.rb > .camping-unabridged.pt" 
     128  sh "diff -u .camping-unabridged.pt .camping.pt | less" 
     129end 
     130