Sha256: 7e54e023f6e823247d2b4edcaaee8f7858f9ffc6a7b41ce6b46ef0d927a1f143

Contents?: true

Size: 478 Bytes

Versions: 17

Compression:

Stored size: 478 Bytes

Contents

module Skylight
  module Probes
    module Sinatra
      class Probe
        def install
          class << ::Sinatra::Base
            alias build_without_sk build

            def build(*args, &block)
              self.use Skylight::Middleware
              build_without_sk(*args, &block)
            end
          end
        end
      end
    end

    Skylight::Core::Probes.register(:sinatra_add_middleware, "Sinatra::Base", "sinatra/base", Sinatra::Probe.new)
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
skylight-3.1.5 lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.1.4 lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.1.3 lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.1.3.beta lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.1.2 lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.1.1 lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.1.0 lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.1.0.beta3 lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.1.0.beta2 lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.1.0.beta lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.0.0 lib/skylight/probes/sinatra_add_middleware.rb
skylight-3.0.0.beta lib/skylight/probes/sinatra_add_middleware.rb
skylight-2.0.2 lib/skylight/probes/sinatra_add_middleware.rb
skylight-2.0.2.beta.1 lib/skylight/probes/sinatra_add_middleware.rb
skylight-2.0.2.beta lib/skylight/probes/sinatra_add_middleware.rb
skylight-2.0.1 lib/skylight/probes/sinatra_add_middleware.rb
skylight-2.0.0 lib/skylight/probes/sinatra_add_middleware.rb