Sha256: f52899306ff009c2b55ff40219efd87131f5098f17016c52b74aeab6ea0191cb

Contents?: true

Size: 659 Bytes

Versions: 2

Compression:

Stored size: 659 Bytes

Contents

module AppMap
  module Handler
    module Rails
      class << self
        def test_route(app, request)
          app.matches?(request)
        rescue
          test_route_warn(request)
          false
        end

        protected

        @test_route_warned = false

        def test_route_warn(request)
          return if @test_route_warned

          @test_route_warned = true
          warn "Notice: Failed to match route for #{request&.path_info || "an unknown path"}: #{$ERROR_INFO}"
          warn "Notice: A solution for this problem is forthcoming, see https://github.com/getappmap/appmap-ruby/issues/360"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
appmap-1.1.1 lib/appmap/handler/rails/test_route.rb
appmap-1.0.1 lib/appmap/handler/rails/test_route.rb