Class: SimpleCov::Parallel::Adapter::CircleCI Private

Inherits:
Base
  • Object
show all
Defined in:
lib/simplecov/parallel/adapter/circleci.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: MethodStasher

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all_adapters, inherited

Class Method Details

.available?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


8
9
10
# File 'lib/simplecov/parallel/adapter/circleci.rb', line 8

def self.available?
  ENV.key?('CIRCLECI')
end

Instance Method Details

#activateObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/simplecov/parallel/adapter/circleci.rb', line 12

def activate
  require 'circleci/parallel'
  require 'fileutils'

  SimpleCov.command_name("#{SimpleCov.command_name} #{current_node.name}")

  SimpleCov.at_exit do
    puts 'Merging SimpleCov result into the master node...'
    export_slave_node_result
    join_nodes_and_merge_slave_node_results
    merge_and_format_master_node_result
  end
end