Sha256: 59d3e626fc508c14f0c323a0d6fe1501a30824f96a6338a2e19f9ab43eecbf6c
Contents?: true
Size: 885 Bytes
Versions: 21
Compression:
Stored size: 885 Bytes
Contents
module RorVsWild module Plugin class Middleware def self.setup return if @installed Rails.application.config.middleware.unshift(RorVsWild::Plugin::Middleware, nil) if defined?(Rails) @installed = true end def initialize(app, config) @app, @config = app, config end def call(env) RorVsWild.agent.start_request RorVsWild.agent.current_data[:path] = env["ORIGINAL_FULLPATH".freeze] section = RorVsWild::Section.start section.file, section.line = rails_engine_location section.command = "Rails::Engine#call".freeze @app.call(env) ensure RorVsWild::Section.stop RorVsWild.agent.stop_request end def rails_engine_location @rails_engine_location = ::Rails::Engine.instance_method(:call).source_location end end end end
Version data entries
21 entries across 21 versions & 1 rubygems