Class: RSpec::Core::Bisect::Server Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | rspec-core/lib/rspec/core/bisect/server.rb |
Overview
A DRb server that receives run results from a separate ::RSpec
process started by the bisect process.
Class Method Summary
- .run Internal use only
Instance Attribute Summary
-
#expected_failures
rw
Internal use only
Fetched via DRb by the BisectDRbFormatter to determine when to abort.
-
#files_or_directories_to_run
rw
Internal use only
Fetched via DRb to tell clients which files to run.
-
#latest_run_results
rw
Internal use only
::RSpec::Core::Set
via DRb by the BisectDRbFormatter with the results of the run.
Instance Method Summary
- #capture_run_results(files_or_directories_to_run = [], expected_failures = []) Internal use only
- #drb_port Internal use only
- #start Internal use only
- #stop Internal use only
Class Method Details
.run
[ GitHub ]Instance Attribute Details
#expected_failures (rw)
Fetched via DRb by the BisectDRbFormatter to determine when to abort.
# File 'rspec-core/lib/rspec/core/bisect/server.rb', line 51
attr_accessor :expected_failures
#files_or_directories_to_run (rw)
Fetched via DRb to tell clients which files to run
# File 'rspec-core/lib/rspec/core/bisect/server.rb', line 57
attr_accessor :files_or_directories_to_run
#latest_run_results (rw)
::RSpec::Core::Set
via DRb by the BisectDRbFormatter with the results of the run.
# File 'rspec-core/lib/rspec/core/bisect/server.rb', line 54
attr_accessor :latest_run_results
Instance Method Details
#capture_run_results(files_or_directories_to_run = [], expected_failures = [])
[ GitHub ]# File 'rspec-core/lib/rspec/core/bisect/server.rb', line 21
def capture_run_results(files_or_directories_to_run=[], expected_failures=[]) self.expected_failures = expected_failures self.files_or_directories_to_run = files_or_directories_to_run self.latest_run_results = nil run_output = yield if latest_run_results.nil? || latest_run_results.all_example_ids.empty? raise BisectFailedError.for_failed_spec_run(run_output) end latest_run_results end
#drb_port
[ GitHub ]# File 'rspec-core/lib/rspec/core/bisect/server.rb', line 46
def drb_port @drb_port ||= Integer(@drb.uri[/\d+$/]) end
#start
[ GitHub ]# File 'rspec-core/lib/rspec/core/bisect/server.rb', line 34
def start # Only allow remote DRb requests from this machine. DRb.install_acl ACL.new(%w[ deny all allow localhost allow 127.0.0.1 allow ::1 ]) # We pass `nil` as the first arg to allow it to pick a DRb port. @drb = DRb.start_service(nil, self) end
#stop
[ GitHub ]# File 'rspec-core/lib/rspec/core/bisect/server.rb', line 42
def stop @drb.stop_service end