Sha256: cedabf763c544814ba70462d6f29cdbaf09ff5289959f74b337b94b84a7eeaa3
Contents?: true
Size: 1.46 KB
Versions: 9
Compression:
Stored size: 1.46 KB
Contents
# frozen_string_literal: true module Coverband module RailsEagerLoad def eager_load! Coverband.eager_loading_coverage! super end end Rails::Engine.prepend(RailsEagerLoad) class Railtie < Rails::Railtie initializer "coverband.configure" do |app| begin app.middleware.use Coverband::BackgroundMiddleware rescue Redis::CannotConnectError => error Coverband.configuration.logger.info "Redis is not available (#{error}), Coverband not configured" Coverband.configuration.logger.info "If this is a setup task like assets:precompile feel free to ignore" end end config.after_initialize do unless Coverband.tasks_to_ignore? Coverband.configure unless Coverband.configured? Coverband.eager_loading_coverage! Coverband.report_coverage Coverband.runtime_coverage! end Coverband.configuration.railtie! end config.before_configuration do unless ENV["COVERBAND_DISABLE_AUTO_START"] begin Coverband.configure unless Coverband.configured? Coverband.start rescue Redis::CannotConnectError => error Coverband.configuration.logger.info "Redis is not available (#{error}), Coverband not configured" Coverband.configuration.logger.info "If this is a setup task like assets:precompile feel free to ignore" end end end rake_tasks do load "coverband/utils/tasks.rb" end end end
Version data entries
9 entries across 9 versions & 1 rubygems