From e235c2bf8d168ac156ac375d7c7bc15d4868d80a Mon Sep 17 00:00:00 2001 From: Magnus Holm Date: Sat, 24 May 2008 18:30:40 +0200 Subject: [PATCH] Adding `rake ruby_diff` for simpler creation of camping.rb --- Rakefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 4b644aa..bfe7e7a 100644 --- a/Rakefile +++ b/Rakefile @@ -128,13 +128,24 @@ task :diff do sh "diff -u .camping-unabridged.pt .camping.pt | less" end +task :ruby_diff do + require 'ruby2ruby' + c = Ruby2Ruby.translate(File.read("lib/camping.rb")) + n = Ruby2Ruby.translate(File.read("lib/camping-unabridged.rb")) + + File.open(".camping-unabridged.rb.rb","w"){|f|f< ["check:valid", "check:size", "check:lines"] namespace :check do desc "Check source code validity" task :valid do - ruby "-w", "lib/camping-unabridged.rb" - ruby "-w", "lib/camping.rb" + ruby "-rubygems", "-w", "lib/camping-unabridged.rb" + ruby "-rubygems", "-w", "lib/camping.rb" end SIZE_LIMIT = 4096