Sha256: 8bf0dc1893cb2dbd381e15c570f96937b7c13e8a8decfbd57254d8f11d7f8b23

Contents?: true

Size: 369 Bytes

Versions: 10

Compression:

Stored size: 369 Bytes

Contents

# frozen_string_literal: true

module Coverband
  class Middleware
    def initialize(app)
      @app = app
    end

    def call(env)
      @app.call(env)
    ensure
      AtExit.register
      if Coverband.configuration.background_reporting_enabled
        Background.start
      else
        Collectors::Coverage.instance.report_coverage
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
coverband-4.2.0 lib/coverband/integrations/middleware.rb
coverband-4.2.0.rc3 lib/coverband/integrations/middleware.rb
coverband-4.2.0.rc2 lib/coverband/integrations/middleware.rb
coverband-4.1.1 lib/coverband/integrations/middleware.rb
coverband-4.2.0.rc1 lib/coverband/integrations/middleware.rb
coverband-4.1.0 lib/coverband/integrations/middleware.rb
coverband-4.1.0.beta lib/coverband/integrations/middleware.rb
coverband-4.2.0.beta lib/coverband/integrations/middleware.rb
coverband-4.2.0.alpha lib/coverband/integrations/middleware.rb
coverband-4.1.0.alpha lib/coverband/integrations/middleware.rb