Runs features on a DRB server, originally created with Spork compatibility in mind.
# File lib/cucumber/cli/drb_client.rb, line 14
14: def run(args, error_stream, out_stream, port = nil)
15: port ||= ENV["CUCUMBER_DRB"] || DEFAULT_PORT
16:
17: setup_support_for_io_streams_over_drb
18:
19: feature_server = DRbObject.new_with_uri("druby://127.0.0.1:#{port}")
20: cloned_args = [] # I have no idea why this is needed, but if the regular args are sent then DRb magically transforms it into a DRb object - not an array
21: args.each { |arg| cloned_args << arg }
22: feature_server.run(cloned_args, error_stream, out_stream)
23: rescue DRb::DRbConnError => e
24: raise DRbClientError, "No DRb server is running."
25: end
# File lib/cucumber/cli/drb_client.rb, line 28
28: def setup_support_for_io_streams_over_drb
29: # See http://redmine.ruby-lang.org/issues/show/496 as to why we specify localhost:0
30: begin
31: DRb.start_service("druby://localhost:0")
32: rescue SocketError, Errno::EADDRNOTAVAIL
33: # Ruby-1.8.7 on snow leopard doesn't like localhost:0 - but just :0
34: # seems to work just fine
35: DRb.start_service("druby://:0")
36: end
37: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.