module SimpleCov::Parallel
Provides parallelism support for SimpleCov
.
Constants
- NoAdapterAvailableError
Public Class Methods
activate()
click to toggle source
Activates SimpleCov
parallelism support for the current environment. This modifies some SimpleCov
configuration options so you should configure SimpleCov
before invoking this method. When no adapter is available in the current environment, it does nothing.
@example
require 'simplecov/parallel' SimpleCov::Parallel.activate SimpleCov.start
@see .activate!
# File lib/simplecov/parallel.rb, line 21 def activate activate! rescue NoAdapterAvailableError # rubocop:disable Lint/HandleExceptions end
activate!()
click to toggle source
Activates SimpleCov
parallelism support for the current environment. This modifies some SimpleCov
configuration options so you should configure SimpleCov
before invoking this method.
@raise NoAdapterAvailableError
when no adapter is available in the current environment
@example
require 'simplecov/parallel' SimpleCov::Parallel.activate! if ENV['CIRCLECI'] SimpleCov.start
@see .activate!
# File lib/simplecov/parallel.rb, line 38 def activate! if available_adapter_classes.empty? raise NoAdapterAvailableError, 'No SimpleCov::Parallel adapter is available in the current environment.' end available_adapter_classes.first.new.activate end
Private Class Methods
available_adapter_classes()
click to toggle source
# File lib/simplecov/parallel.rb, line 49 def available_adapter_classes Adapter::Base.all_adapters.select(&:available?) end