def handle_interpreter(options)
separator ""
separator "Interpreter options:"
on("-S FILE", "--interpreter FILE", "Use interpreter FILE.") do |interpreter|
options[:interpreter] = interpreter
end
on("-I PATH", "Add PATH to $LOAD_PATH") do |path|
options[:include_paths] << path
end
on("--dev", "Add this project's bin/ and lib/ to $LOAD_PATH.",
"A directory with a Rakefile is considered a project base directory.") do
auto_include_paths(options[:include_paths], Dir.pwd)
end
on("-r LIB", "Require LIB before execution.") do |lib|
options[:libs] << lib
end
on("-e EXPR", "--eval=EXPR", "--stub=EXPR", "Evaluate EXPR after execution.") do |expr|
options[:evals] << expr
end
on("--fork", "Use rct-fork-client if rct-fork is running.") do
options[:detect_rct_fork] = true
end
on("--rbtest", "Use rbtest.") do
options[:use_rbtest] = true
end
on("--detect-rbtest", "Use rbtest if '=begin test_*' blocks exist.") do
options[:detect_rbtest] = true
end
end