Sha256: 391e68d087eebb119588feb12653056d9b4cd3d14db2ab65d3905473124e0c68

Contents?: true

Size: 944 Bytes

Versions: 18

Compression:

Stored size: 944 Bytes

Contents

module Rollbar
  module Middleware
    module Rack
      module TestSession
        include ExceptionReporter

        def process_request_with_rollbar(uri, env, &block)
          process_request_without_rollbar(uri, env, &block)
        rescue => exception
          report_exception_to_rollbar(env, exception)
          raise exception
        end

        def env_for_with_rollbar(path, env)
          env_for_without_rollbar(path, env)
        rescue => exception
          report_exception_to_rollbar(env, exception)
          raise exception
        end

        def self.included(base)
          base.send(:alias_method, :process_request_without_rollbar, :process_request)
          base.send(:alias_method, :process_request, :process_request_with_rollbar)

          base.send(:alias_method, :env_for_without_rollbar, :env_for)
          base.send(:alias_method, :env_for, :env_for_with_rollbar)
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rollbar-0.9.14 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.13 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.12 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.11 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.10 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.9 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.8 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.7 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.6 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.4 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.3 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.2 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.1 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.9.0 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.8.3 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.8.2 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.8.1 lib/rollbar/middleware/rack/test_session.rb
rollbar-0.8.0 lib/rollbar/middleware/rack/test_session.rb