Class: Gurke::Runner::DRbServer

Inherits:
Gurke::Runner show all
Defined in:
lib/gurke/runner.rb

Constant Summary collapse

URI =
'druby://localhost:8789'

Instance Attribute Summary

Attributes inherited from Gurke::Runner

#config, #options

Instance Method Summary collapse

Methods inherited from Gurke::Runner

#builder, #hook, #initialize, #reporter, #retries, #with_filtered_backtrace

Constructor Details

This class inherits a constructor from Gurke::Runner

Instance Method Details

#run(_files) ⇒ Object



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/gurke/runner.rb', line 66

def run(_files)
  require 'drb'

  hook :system, nil, nil do
    DRb.start_service URI, self
    $stdout.puts 'DRb Server running...'

    begin
      DRb.thread.join
    rescue Interrupt
      $stdout.puts
      $stdout.puts 'Exiting...'
    end

    0
  end
end

#run_remote(options, files, reporter) ⇒ Object



84
85
86
# File 'lib/gurke/runner.rb', line 84

def run_remote(options, files, reporter)
  Runner.new(config, options).run files, reporter
end