Sha256: cb5af801bc051a921e030e4257aa803af5c8332531a47fc43f660faca81af9f7

Contents?: true

Size: 1.42 KB

Versions: 27

Compression:

Stored size: 1.42 KB

Contents

Feature: Use the notifier in a plain Rack app
  	
 Scenario: Rescue and exception in a Rack app

   Given the following Rack app:
     """
     require 'logger'
     require 'rack'
     require 'airbrake'
	  	
     Airbrake.configure do |config|
       config.api_key = 'my_api_key'
       config.logger = Logger.new STDOUT
     end
	  	
     app = Rack::Builder.app do
       use Airbrake::Rack
       run lambda { |env| raise "Rack down" }
     end

     """
   When I perform a Rack request to "http://example.com:123/test/index?param=value"
   Then I should receive a Airbrake notification
	  	
 Scenario: Ignore user agents

   Given the following Rack app:
     """
     require 'logger'
     require 'rack'
     require 'airbrake'
	  	
     Airbrake.configure do |config|
       config.api_key = 'my_api_key'
       config.ignore_user_agent << /ignore/
       config.logger = Logger.new STDOUT
     end
	  	
     class Mock
       class AppendUserAgent
         def initialize(app)
           @app = app
         end
	  	
         def call(env)
           env["HTTP_USER_AGENT"] = "ignore"
           @app.call(env)
         end
       end
     end
	  	
     app = Rack::Builder.app do
       use Airbrake::Rack
       use Mock::AppendUserAgent
       run lambda { |env| raise "Rack down" }
     end
	  	
     """
   When I perform a Rack request to "http://example.com:123/test/index?param=value"
   Then I should not receive a Airbrake notification

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
airbrakeV4rails5-4.3.8 features/rack.feature
airbrake-4.3.8 features/rack.feature
airbrake-4.3.7 features/rack.feature
airbrake-4.3.6 features/rack.feature
airbrake-4.3.5 features/rack.feature
airbrake-4.3.4 features/rack.feature
airbrake-4.3.3 features/rack.feature
airbrake-4.3.2 features/rack.feature
airbrake-4.3.1 features/rack.feature
airbrake-4.3.0 features/rack.feature
airbrake-4.2.1 features/rack.feature
airbrake-4.2.0 features/rack.feature
airbrake-4.1.0 features/rack.feature
airbrake-4.0.0 features/rack.feature
airbrake-3.2.1 features/rack.feature
airbrake-3.2.0 features/rack.feature
airbrake-3.1.17 features/rack.feature
airbrake-3.1.16 features/rack.feature
airbrake-3.1.15 features/rack.feature
airbrake-3.1.14 features/rack.feature