def run_script(script_path)
run_code = ''
RakeFileUtils.verbose(@verbose) do
file_name = File.basename(script_path, File.extname(script_path))
case @printer
when :flat, :graph, :call_tree
file_name += ".txt"
when :graph_html
file_name += ".html"
else
file_name += ".txt"
end
output_file_path = File.join(output_directory, file_name)
command_line = @ruby_opts.join(" ") +
" --file=" + output_file_path +
" " + script_path
puts "ruby " + command_line
begin
ruby command_line
rescue => e
STDOUT << e << "\n"
STDOUT.flush
end
puts ""
puts ""
end
end