#!/usr/bin/env ruby require 'drb' require 'pry' begin begin DRb.start_service("druby://localhost:0") rescue SocketError, Errno::EADDRNOTAVAIL DRb.start_service("druby://:0") end $spec_server = DRbObject.new_with_uri("druby://127.0.0.1:8989") rescue DRb::DRbConnError err.puts "No DRb server is running. Running in local process instead ..." end def rspec(file=nil) if file $spec_server.run(["--color", "--format", "s", file], STDERR, STDOUT) else $spec_server.run(["--color", 'spec'], STDERR, STDOUT) end end puts < rspec 'spec/xxx_spec.rb' or (for all tests) > rspec DESC $LOAD_PATH.push './lib' $LOAD_PATH.push './esper' require 'norikra' require 'java' require 'esper-4.9.0.jar' require 'esper/lib/commons-logging-1.1.1.jar' require 'esper/lib/antlr-runtime-3.2.jar' require 'esper/lib/cglib-nodep-2.2.jar' Pry.start