Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: a9ff5a83a3
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (27 sloc) 0.753 kB
module RSpec
module Core
class DRbCommandLine
def initialize(options)
@options = options
end
def drb_port
@options.options[:drb_port] || ENV['RSPEC_DRB'] || 8989
end
def run(err, out)
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:#{drb_port}")
spec_server.run(@options.drb_argv, err, out)
true
rescue DRb::DRbConnError
err.puts "No DRb server is running. Running in local process instead ..."
false
end
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.