Skip to content

Commit

Permalink
Remove unneccessary eager_load code
Browse files Browse the repository at this point in the history
  • Loading branch information
kbaum committed Apr 27, 2019
1 parent 1181516 commit 8f728be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
5 changes: 1 addition & 4 deletions lib/coverband/collectors/coverage.rb
Expand Up @@ -46,10 +46,7 @@ def report_coverage(force_report = false)
# when we are in runtime collection mode, which do not have a cache of previous
# coverage to remove the initial stdlib Coverage loading data
###
if ((original_previous_set.nil? && @store.type == Coverband::EAGER_TYPE) ||
(original_previous_set && @store.type != Coverband::EAGER_TYPE))
@store.save_report(files_with_line_usage)
end
@store.save_report(files_with_line_usage)
rescue StandardError => err
if @verbose
@logger&.error 'coverage failed to store'
Expand Down
11 changes: 0 additions & 11 deletions lib/coverband/utils/railtie.rb
Expand Up @@ -19,17 +19,6 @@ class Railtie < Rails::Railtie
app.middleware.use Coverband::Middleware
end

config.after_initialize do
Coverband.report_coverage(true)
Coverband.configuration.logger&.debug('Coverband: reported after_initialize')
Coverband.runtime_coverage!
end

config.before_initialize do
Coverband.configuration.logger&.debug('Coverband: set to eager_loading')
Coverband.eager_loading_coverage!
end

rake_tasks do
load 'coverband/utils/tasks.rb'
end
Expand Down

0 comments on commit 8f728be

Please sign in to comment.