Sha256: 92d7125655482e01ff1f32e11b2b8a4d22ecbbf9664bdbd3a2fd9fe835ae1756

Contents?: true

Size: 365 Bytes

Versions: 10

Compression:

Stored size: 365 Bytes

Contents

# frozen_string_literal: true

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

    def call(env)
      Coverband::Collectors::Base.instance.configure_sampling
      Coverband::Collectors::Base.instance.record_coverage
      @app.call(env)
    ensure
      Coverband::Collectors::Base.instance.report_coverage
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
coverband-2.0.3 lib/coverband/middleware.rb
coverband-2.0.3.alpha lib/coverband/middleware.rb
coverband-2.0.2 lib/coverband/middleware.rb
coverband-2.0.2.alpha2 lib/coverband/middleware.rb
coverband-2.0.2.alpha lib/coverband/middleware.rb
coverband-2.0.1 lib/coverband/middleware.rb
coverband-2.0.1.alpha lib/coverband/middleware.rb
coverband-2.0.0 lib/coverband/middleware.rb
coverband-2.0.0.alpha1 lib/coverband/middleware.rb
coverband-2.0.0.alpha lib/coverband/middleware.rb