Sha256: 4baf4ac8a60ddbf39195a818dffe995082c50804c617f58c07fe60f13800adb9
Contents?: true
Size: 932 Bytes
Versions: 14
Compression:
Stored size: 932 Bytes
Contents
require "drb/drb" # This code was taken from the RSpec project and slightly modified. module Cucumber module Cli class DRbClientError < StandardError end # Runs features on a DRB server, originally created with Spork compatibility in mind. class DRbClient def self.run(args, error_stream, out_stream) # See http://redmine.ruby-lang.org/issues/show/496 as to why we specify localhost:0 DRb.start_service("druby://localhost:0") feature_server = DRbObject.new_with_uri("druby://127.0.0.1:8990") 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 args.each { |arg| cloned_args << arg } feature_server.run(cloned_args, error_stream, out_stream) rescue DRb::DRbConnError raise DRbClientError, "No DRb server is running." end end end end
Version data entries
14 entries across 14 versions & 5 rubygems