Sha256: 82e8c1fcd3e4236b78bcc69a3c5100073b9e4ee676b52c0ad4decf607383f617

Contents?: true

Size: 769 Bytes

Versions: 13

Compression:

Stored size: 769 Bytes

Contents

require "drb/drb"

module Spec
  module Runner
    # Facade to run specs by connecting to a DRB server
    class DrbCommandLine
      # Runs specs on a DRB server. Note that this API is similar to that of
      # CommandLine - making it possible for clients to use both interchangeably.
      def self.run(options)
        begin
          # See http://redmine.ruby-lang.org/issues/show/496 as to why we specify localhost:0
          DRb.start_service("druby://localhost:0")
          spec_server = DRbObject.new_with_uri("druby://127.0.0.1:8989")
          spec_server.run(options.argv, options.error_stream, options.output_stream)
        rescue DRb::DRbConnError => e
          options.error_stream.puts "No server is running"
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
dchelimsky-rspec-1.1.99.1 lib/spec/runner/drb_command_line.rb
dchelimsky-rspec-1.1.99.13 lib/spec/runner/drb_command_line.rb
dchelimsky-rspec-1.1.99.2 lib/spec/runner/drb_command_line.rb
dchelimsky-rspec-1.1.99.3 lib/spec/runner/drb_command_line.rb
dchelimsky-rspec-1.1.99.4 lib/spec/runner/drb_command_line.rb
dchelimsky-rspec-1.1.99.5 lib/spec/runner/drb_command_line.rb
dchelimsky-rspec-1.1.99.6 lib/spec/runner/drb_command_line.rb
dchelimsky-rspec-1.1.99.7 lib/spec/runner/drb_command_line.rb
dchelimsky-rspec-1.1.99.8 lib/spec/runner/drb_command_line.rb
dchelimsky-rspec-1.1.99.9 lib/spec/runner/drb_command_line.rb
rspec-1.2.2 lib/spec/runner/drb_command_line.rb
rspec-1.2.1 lib/spec/runner/drb_command_line.rb
rspec-1.2.0 lib/spec/runner/drb_command_line.rb