require 'erb' require 'ftools' if ARGV.size == 0 puts 'usage: ruby doc.rb directory' exit end File.makedirs ARGV[0] unless File.exists?(ARGV[0]) && File.directory?(ARGV[0]) IMAGE_DIR = File.join(ARGV[0], 'img') File.makedirs IMAGE_DIR unless File.exists?(IMAGE_DIR) && File.directory?(IMAGE_DIR) TESTS= Dir[File.join(File.dirname(__FILE__),'tests','*.rb')].reject{|x| x=~ /new_image.rb$/ } IMAGES = [] i = 0 size = TESTS.size TESTS.each do |test| i += 1 puts "Running #{test} in JRuby. #{i}/#{size}" `jruby #{test} #{IMAGE_DIR}` puts "Running #{test} in Ruby. #{i}/#{size}" `sh -c 'ruby #{test} #{IMAGE_DIR}'` IMAGES << test.split(/\//).last[0...-3] end template = %{
RMagick4J | RMagick |