class RSpec::Core::Bisect::ShellRunner

Provides an API to run the suite for a set of locations, using the given bisect server to capture the results.

Sets of specs are run by shelling out. @private

Public Class Methods

name() click to toggle source
# File lib/rspec/core/bisect/shell_runner.rb, line 19
def self.name
  :shell
end
new(server, shell_command) click to toggle source
# File lib/rspec/core/bisect/shell_runner.rb, line 23
def initialize(server, shell_command)
  @server        = server
  @shell_command = shell_command
end
start(shell_command, _spec_runner) { |new(server, shell_command)| ... } click to toggle source
# File lib/rspec/core/bisect/shell_runner.rb, line 13
def self.start(shell_command, _spec_runner)
  Server.run do |server|
    yield new(server, shell_command)
  end
end

Public Instance Methods

original_results() click to toggle source
# File lib/rspec/core/bisect/shell_runner.rb, line 32
def original_results
  @original_results ||= run_locations(@shell_command.original_locations)
end
run(locations) click to toggle source
# File lib/rspec/core/bisect/shell_runner.rb, line 28
def run(locations)
  run_locations(locations, original_results.failed_example_ids)
end

Private Instance Methods

run_command(cmd) click to toggle source
# File lib/rspec/core/bisect/shell_runner.rb, line 47
def run_command(cmd)
  Open3.capture2e(@shell_command.bisect_environment_hash, cmd).first
end
run_locations(*capture_args) click to toggle source
# File lib/rspec/core/bisect/shell_runner.rb, line 38
def run_locations(*capture_args)
  @server.capture_run_results(*capture_args) do
    run_command @shell_command.command_for([], @server)
  end
end