Sha256: 7610ad8a0f671155da9aa2f92325176833ed358707dd98cac2a519efde3eeecc

Contents?: true

Size: 1.21 KB

Versions: 5

Compression:

Stored size: 1.21 KB

Contents

# frozen_string_literal: true

require 'logger'
require 'json'

require 'coverband/version'
require 'coverband/configuration'
require 'coverband/adapters/base'
require 'coverband/adapters/redis_store'
require 'coverband/adapters/memory_cache_store'
require 'coverband/adapters/file_store'
require 'coverband/collectors/base'
require 'coverband/collectors/trace'
require 'coverband/collectors/coverage'
require 'coverband/reporters/base'
require 'coverband/reporters/simple_cov_report'
require 'coverband/reporters/console_report'
require 'coverband/reporters/web'
require 'coverband/middleware'
require 'coverband/s3_report_writer'

module Coverband
  CONFIG_FILE = './config/coverband.rb'

  class << self
    attr_accessor :configuration_data
  end

  def self.configure(file = nil)
    configuration_file = file || CONFIG_FILE

    configuration
    if block_given?
      yield(configuration)
    elsif File.exist?(configuration_file)
      require configuration_file
    else
      raise ArgumentError, "configure requires a block, the existance of a #{CONFIG_FILE} in your project, or a path to a config file passed in to configure"
    end
  end

  def self.configuration
    self.configuration_data ||= Configuration.new
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
coverband-2.0.3 lib/coverband.rb
coverband-2.0.3.alpha lib/coverband.rb
coverband-2.0.2 lib/coverband.rb
coverband-2.0.2.alpha2 lib/coverband.rb
coverband-2.0.2.alpha lib/coverband.rb