Sha256: b1f87f71b8f20c8f4d2474fcf703aed28d0928d4a5d2ee9dc36388630904babc

Contents?: true

Size: 745 Bytes

Versions: 15

Compression:

Stored size: 745 Bytes

Contents

# frozen_string_literal: true

# This file is called from `require 'deep-cover'`
#
# Based on the DEEP_COVER environment variable, we automatically start the
# covering. This way, users just need to require a file and the CLI will
# be able to automatically do the coverage.

if %w[exec 1 t true].include?(ENV['DEEP_COVER'])
  # If we spawn more processes, then we don't want them clearing the trackers or doing reports.
  # We only want them to gather.
  ENV['DEEP_COVER'] = 'gather'
  DeepCover.start
  DeepCover.delete_trackers
  require_relative '../auto_run'
  DeepCover::AutoRun.run!('.').report!(**DeepCover.config)
elsif ENV['DEEP_COVER'] == 'gather'
  DeepCover.start
  require_relative '../auto_run'
  DeepCover::AutoRun.run!('.')
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
deep-cover-core-1.1.0 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-1.0.0 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.8.1 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.8.0 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.10 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.9 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.8 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.7 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.6 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.5 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.4 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.3 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.2 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.1 lib/deep_cover/setup/deep_cover_auto_run.rb
deep-cover-core-0.7.0 lib/deep_cover/setup/deep_cover_auto_run.rb