airbrake 9.0.0 → 9.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c8083c97e26cdb7c8fe53e6f14230ada0089467
4
- data.tar.gz: f8fa25f6cc5b72084633982b40e639d7a7a5052b
3
+ metadata.gz: 6b052ec8fac4804c17070080aaa32d470d7981ce
4
+ data.tar.gz: 5e3ed5534b0c06bec73b191c31707ce2c1f6f0ef
5
5
  SHA512:
6
- metadata.gz: 0df7d0c719260389b98d070d1f17cc966066d9aef11bda7da4d47616f26a42801ee27eadb4f4ff10b4c065705b61cb014a46d2a8d28cc23f10771271d7ec42cd
7
- data.tar.gz: 63ef9f1b5b9f25ebf571a328bb71f99c3138d4ff6a49e9d855dda3b839e6d014d2d1d91887a6cfc3996841e10c80f8b8a4b02193eec75d6d23202eaf41cfecc7
6
+ metadata.gz: 810736678fca377fd0930f71912a3b400a565719304ba5b41b4ac73b63f1a04f32d730d2cfe07d873744701cf16129ed5d4f1edc77d2bd98d42fb722de6ee5e3
7
+ data.tar.gz: c3fcdc0990c53269c0680ab08e0cecfc1be1963503eb33bfa9224d6423e4f1400e9d367ab76e4dff7301135b06e6638601e01c2a8df74c5563408b88ff372e3f
@@ -2,6 +2,9 @@ module Airbrake
2
2
  module Rails
3
3
  # @since v8.3.0
4
4
  class ActionControllerPerformanceBreakdownSubscriber
5
+ # @see https://github.com/rails/rails/issues/8987
6
+ HTML_RESPONSE_WILDCARD = "*/*".freeze
7
+
5
8
  def call(*args)
6
9
  routes = Airbrake::Rack::RequestStore[:routes]
7
10
  return if !routes || routes.none?
@@ -15,13 +18,15 @@ module Airbrake
15
18
  Airbrake.notify_performance_breakdown(
16
19
  method: method,
17
20
  route: route,
18
- response_type: payload[:format],
21
+ response_type: normalize_response_type(payload[:format]),
19
22
  groups: groups,
20
23
  start_time: event.time
21
24
  )
22
25
  end
23
26
  end
24
27
 
28
+ private
29
+
25
30
  def build_groups(payload)
26
31
  groups = {}
27
32
 
@@ -33,6 +38,10 @@ module Airbrake
33
38
 
34
39
  groups
35
40
  end
41
+
42
+ def normalize_response_type(response_type)
43
+ response_type == HTML_RESPONSE_WILDCARD ? :html : response_type
44
+ end
36
45
  end
37
46
  end
38
47
  end
@@ -1,5 +1,5 @@
1
1
  # We use Semantic Versioning v2.0.0
2
2
  # More information: http://semver.org/
3
3
  module Airbrake
4
- AIRBRAKE_VERSION = '9.0.0'.freeze
4
+ AIRBRAKE_VERSION = '9.0.1'.freeze
5
5
  end
@@ -3472,3 +3472,352 @@ AirbrakeTestError (AirbrakeTestError):
3472
3472
  lib/airbrake/rack/middleware.rb:21:in `call'
3473
3473
 
3474
3474
 
3475
+ Connecting to database specified by DATABASE_URL
3476
+  (5.1ms) select sqlite_version(*)
3477
+  (0.6ms) CREATE TABLE "books" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255))
3478
+  (0.1ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime) 
3479
+  (0.1ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")
3480
+ Started GET "/delayed_job" for 127.0.0.1 at 2019-04-01 13:47:34 +0300
3481
+ Processing by DummyController#delayed_job as HTML
3482
+ Completed 500 Internal Server Error in 11.2ms
3483
+
3484
+ RSpec::Mocks::MockExpectationError (Airbrake received :notify with unexpected arguments
3485
+ expected: (anything, {"job"=>hash_including("handler"=>"--- !ruby/struct:BangoJob\nbingo: bingo\nbongo: bongo\n")})
3486
+ got: (#<Airbrake::Notice:0x00007fed67ca9340 @config=#<Airbrake::Config:0x00007fed68d87720 @proxy={}, @queue...hash=3900637000862569930>]}>}, @truncator=#<Airbrake::Truncator:0x00007fed68db14a8 @max_size=10000>>)
3487
+ Diff:
3488
+ @@ -1,4 +1,8 @@
3489
+ -["anything",
3490
+ - {"job"=>
3491
+ - hash_including("handler"=>"--- !ruby/struct:BangoJob\nbingo: bingo\nbongo: bongo\n")}]
3492
+ +[#<Airbrake::Notice:0x00007fed67ca9340 @config=#<Airbrake::Config:0x00007fed68d87720 @proxy={}, @queue_size=100, @workers=5, @code_hunks=true, @logger=#<Logger:0x00007fed68d876a8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007fed68d87658 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00007fed68d87608 @shift_period_suffix="%Y%m%d", @shift_size=1048576, @shift_age=0, @filename="/dev/null", @dev=#<File:/dev/null>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x00007fed68d87590>>>, @project_id=113743, @project_key="fd04e13d806a90f96614ad8e529b2822", @host="https://api.airbrake.io", @ignore_environments=[], @timeout=nil, @blacklist_keys=[], @whitelist_keys=[], @root_directory="/Users/kyrylo/Code/airbrake/airbrake/gemfiles", @versions={}, @performance_stats=false, @performance_stats_flush_period=1, @app_version="1.2.3">, @payload={:errors=>[{:type=>"AirbrakeTestError", :message=>"delayed_job error", :backtrace=>[{:file=>"/Users/kyrylo/Code/airbrake/airbrake/spec/apps/rails/dummy_app.rb", :line=>87, :function=>"perform"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb", :line=>81, :function=>"block in invoke_job"}, {:file=>"/Users/kyrylo/Code/airbrake/airbrake/lib/airbrake/delayed_job.rb", :line=>10, :function=>"block (2 levels) in <class:Airbrake>"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb", :line=>79, :function=>"block (2 levels) in add"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb", :line=>61, :function=>"block in initialize"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb", :line=>79, :function=>"block in add"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb", :line=>66, :function=>"execute"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb", :line=>40, :function=>"run_callbacks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb", :line=>78, :function=>"invoke_job"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb", :line=>19, :function=>"block (2 levels) in enqueue_job"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb", :line=>61, :function=>"block in initialize"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb", :line=>66, :function=>"execute"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb", :line=>40, :function=>"run_callbacks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb", :line=>17, :function=>"block in enqueue_job"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb", :line=>16, :function=>"tap"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb", :line=>16, :function=>"enqueue_job"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb", :line=>12, :function=>"enqueue"}, {:file=>"/Users/kyrylo/Code/airbrake/airbrake/spec/apps/rails/dummy_app.rb", :line=>149, :function=>"delayed_job"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_controller/metal/implicit_render.rb", :line=>4, :function=>"send_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/abstract_controller/base.rb", :line=>167, :function=>"process_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_controller/metal/rendering.rb", :line=>10, :function=>"process_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/abstract_controller/callbacks.rb", :line=>18, :function=>"block in process_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb", :line=>403, :function=>"_run__83456659031293807__process_action__2087420186915765575__callbacks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb", :line=>405, :function=>"__run_callback"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb", :line=>385, :function=>"_run_process_action_callbacks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb", :line=>81, :function=>"run_callbacks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/abstract_controller/callbacks.rb", :line=>17, :function=>"process_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_controller/metal/rescue.rb", :line=>29, :function=>"process_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb", :line=>30, :function=>"block in process_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb", :line=>123, :function=>"block in instrument"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb", :line=>20, :function=>"instrument"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb", :line=>123, :function=>"instrument"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb", :line=>29, :function=>"process_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_controller/metal/params_wrapper.rb", :line=>207, :function=>"process_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activerecord-3.2.22.5/lib/active_record/railties/controller_runtime.rb", :line=>18, :function=>"process_action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/abstract_controller/base.rb", :line=>121, :function=>"process"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/abstract_controller/rendering.rb", :line=>46, :function=>"process"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_controller/metal.rb", :line=>203, :function=>"dispatch"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_controller/metal/rack_delegation.rb", :line=>14, :function=>"dispatch"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_controller/metal.rb", :line=>246, :function=>"block in action"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb", :line=>73, :function=>"dispatch"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb", :line=>36, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/journey-1.0.4/lib/journey/router.rb", :line=>68, :function=>"block in call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/journey-1.0.4/lib/journey/router.rb", :line=>56, :function=>"each"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/journey-1.0.4/lib/journey/router.rb", :line=>56, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb", :line=>608, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/warden-1.2.7/lib/warden/manager.rb", :line=>36, :function=>"block in call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/warden-1.2.7/lib/warden/manager.rb", :line=>35, :function=>"catch"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/warden-1.2.7/lib/warden/manager.rb", :line=>35, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/best_standards_support.rb", :line=>17, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-1.4.7/lib/rack/etag.rb", :line=>23, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-1.4.7/lib/rack/conditionalget.rb", :line=>25, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/head.rb", :line=>14, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/params_parser.rb", :line=>21, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/flash.rb", :line=>242, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-1.4.7/lib/rack/session/abstract/id.rb", :line=>210, :function=>"context"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-1.4.7/lib/rack/session/abstract/id.rb", :line=>205, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/cookies.rb", :line=>341, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activerecord-3.2.22.5/lib/active_record/query_cache.rb", :line=>64, :function=>"call"}, {:file=>"/Users/kyrylo/Code/airbrake/airbrake/lib/airbrake/rack/middleware.rb", :line=>33, :function=>"call!"}, {:file=>"/Users/kyrylo/Code/airbrake/airbrake/lib/airbrake/rack/middleware.rb", :line=>21, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb", :line=>479, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/callbacks.rb", :line=>28, :function=>"block in call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb", :line=>405, :function=>"_run__4120157808760365097__call__2493302765148272837__callbacks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb", :line=>405, :function=>"__run_callback"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb", :line=>385, :function=>"_run_call_callbacks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb", :line=>81, :function=>"run_callbacks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/callbacks.rb", :line=>27, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/reloader.rb", :line=>65, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/remote_ip.rb", :line=>31, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/debug_exceptions.rb", :line=>16, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/show_exceptions.rb", :line=>56, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/rack/logger.rb", :line=>32, :function=>"call_app"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/rack/logger.rb", :line=>18, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/request_id.rb", :line=>22, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-1.4.7/lib/rack/methodoverride.rb", :line=>21, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-1.4.7/lib/rack/runtime.rb", :line=>17, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/activesupport-3.2.22.5/lib/active_support/cache/strategy/local_cache.rb", :line=>72, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-1.4.7/lib/rack/lock.rb", :line=>15, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/static.rb", :line=>83, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/engine.rb", :line=>484, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/application.rb", :line=>231, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-test-0.6.3/lib/rack/mock_session.rb", :line=>30, :function=>"request"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-test-0.6.3/lib/rack/test.rb", :line=>244, :function=>"process_request"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rack-test-0.6.3/lib/rack/test.rb", :line=>58, :function=>"get"}, {:file=>"/Users/kyrylo/Code/airbrake/airbrake/spec/integration/rails/rails_spec.rb", :line=>183, :function=>"block (3 levels) in <top (required)>"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>254, :function=>"instance_exec"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>254, :function=>"block in run"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>500, :function=>"block in with_around_and_singleton_context_hooks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>457, :function=>"block in with_around_example_hooks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb", :line=>464, :function=>"block in run"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb", :line=>604, :function=>"block in run_around_example_hooks_for"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>342, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-wait-0.0.9/lib/rspec/wait.rb", :line=>46, :function=>"block (2 levels) in <top (required)>"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>447, :function=>"instance_exec"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>447, :function=>"instance_exec"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb", :line=>373, :function=>"execute_with"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb", :line=>606, :function=>"block (2 levels) in run_around_example_hooks_for"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>342, :function=>"call"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb", :line=>607, :function=>"run_around_example_hooks_for"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/hooks.rb", :line=>464, :function=>"run"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>457, :function=>"with_around_example_hooks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>500, :function=>"with_around_and_singleton_context_hooks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example.rb", :line=>251, :function=>"run"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb", :line=>629, :function=>"block in run_examples"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb", :line=>625, :function=>"map"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb", :line=>625, :function=>"run_examples"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb", :line=>591, :function=>"run"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb", :line=>592, :function=>"block in run"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb", :line=>592, :function=>"map"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/example_group.rb", :line=>592, :function=>"run"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb", :line=>116, :function=>"block (3 levels) in run_specs"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb", :line=>116, :function=>"map"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb", :line=>116, :function=>"block (2 levels) in run_specs"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/configuration.rb", :line=>1989, :function=>"with_suite_hooks"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb", :line=>111, :function=>"block in run_specs"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb", :line=>74, :function=>"report"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb", :line=>110, :function=>"run_specs"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb", :line=>87, :function=>"run"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb", :line=>71, :function=>"run"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb", :line=>45, :function=>"invoke"}, {:file=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/exe/rspec", :line=>4, :function=>"<main>"}]}], :context=>{:version=>"1.2.3", :rootDirectory=>"/Users/kyrylo/Code/airbrake/airbrake/gemfiles", :hostname=>"Kyrylos-MacBook-Pro.local", :severity=>"error", :os=>"x86_64-darwin16", :language=>"ruby/2.4.2", :notifier=>{:name=>"airbrake-ruby", :version=>"4.2.2", :url=>"https://github.com/airbrake/airbrake-ruby"}}, :environment=>{:program_name=>"/Users/kyrylo/.gem/ruby/2.4.2/gems/rspec-core-3.8.0/exe/rspec"}, :session=>{}, :params=>{}}, @stash={:exception=>#<AirbrakeTestError: delayed_job error>, :rack_request=>#<ActionDispatch::Request:0x00007fed68db1458 @env={"rack.version"=>[1, 1], "rack.input"=>#<StringIO:0x00007fed68f8af18>, "rack.errors"=>#<StringIO:0x00007fed68f8b030>, "rack.multithread"=>false, "rack.multiprocess"=>true, "rack.run_once"=>false, "REQUEST_METHOD"=>"GET", "SERVER_NAME"=>"example.org", "SERVER_PORT"=>"80", "QUERY_STRING"=>"", "PATH_INFO"=>"/delayed_job", "rack.url_scheme"=>"http", "HTTPS"=>"off", "SCRIPT_NAME"=>"", "CONTENT_LENGTH"=>"0", "rack.test"=>true, "REMOTE_ADDR"=>"127.0.0.1", "HTTP_HOST"=>"example.org", "HTTP_COOKIE"=>"", "ORIGINAL_FULLPATH"=>"/delayed_job", "action_dispatch.routes"=>#<ActionDispatch::Routing::RouteSet:0x00007fed6a276398>, "action_dispatch.parameter_filter"=>[], "action_dispatch.secret_token"=>"ni6aeph6aeriBiphesh8omahv6cohpue5Quah5ceiMohtuvei8", "action_dispatch.show_exceptions"=>true, "action_dispatch.show_detailed_exceptions"=>false, "action_dispatch.logger"=>#<Logger:0x00007fed68feb390 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007fed68feb2c8 @datetime_format=nil>, @formatter=#<Logger::SimpleFormatter:0x00007fed68feb160 @datetime_format=nil>, @logdev=#<Logger::LogDevice:0x00007fed68feb278 @shift_period_suffix="%Y%m%d", @shift_size=1048576, @shift_age=0, @filename="/Users/kyrylo/Code/airbrake/airbrake/spec/apps/rails/logs/32.log", @dev=#<File:/Users/kyrylo/Code/airbrake/airbrake/spec/apps/rails/logs/32.log>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x00007fed68feb228>>>, "action_dispatch.backtrace_cleaner"=>#<Rails::BacktraceCleaner:0x00007fed691ffed8 @filters=[#<Proc:0x00007fed691ffe10@/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/backtrace_cleaner.rb:10>, #<Proc:0x00007fed691ffde8@/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/backtrace_cleaner.rb:11>, #<Proc:0x00007fed691ffdc0@/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/backtrace_cleaner.rb:12>, #<Proc:0x00007fed691ff410@/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/backtrace_cleaner.rb:26>], @silencers=[#<Proc:0x00007fed691ff3e8@/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/backtrace_cleaner.rb:15>]>, "action_dispatch.request_id"=>"d990ac84f622389ebe30517047dd82a2", "action_dispatch.remote_ip"=>#<ActionDispatch::RemoteIp::GetIp:0x00007fed691fcc10 @env={...}, @middleware=#<ActionDispatch::RemoteIp:0x00007fed68ef1e30 @app=#<ActionDispatch::Reloader:0x00007fed68ef1ea8 @app=#<ActionDispatch::Callbacks:0x00007fed68ef1ed0 @app=#<ActiveRecord::ConnectionAdapters::ConnectionManagement:0x00007fed68ef1ef8 @app=#<Airbrake::Rack::Middleware:0x00007fed68ef1f20 @app=#<ActiveRecord::QueryCache:0x00007fed68ef2038 @app=#<ActionDispatch::Cookies:0x00007fed68ef2128 @app=#<ActionDispatch::Session::CookieStore:0x00007fed68ef25b0 @secrets=["e4b0ec799efd029665d9bb7fad3535a0757372761e2cae48bf483812578f"], @coder=#<Rack::Session::Cookie::Base64::Marshal:0x00007fed68ef2218>, @app=#<ActionDispatch::Flash:0x00007fed68ef2628 @app=#<ActionDispatch::ParamsParser:0x00007fed68ef2718 @app=#<ActionDispatch::Head:0x00007fed68ef2740 @app=#<Rack::ConditionalGet:0x00007fed68ef2768 @app=#<Rack::ETag:0x00007fed68ef2790 @app=#<ActionDispatch::BestStandardsSupport:0x00007fed68ef27e0 @app=#<Warden::Manager:0x00007fed68ef28d0 @config={:default_scope=>:default, :scope_defaults=>{}, :default_strategies=>{}, :intercept_401=>true}, @app=#<ActionDispatch::Routing::RouteSet:0x00007fed6a276398>>, @header="IE=Edge,chrome=1">, @cache_control="max-age=0, private, must-revalidate", @no_cache_control="no-cache">>>, @parsers={#<Mime::Type:0x00007fed6a12d068 @synonyms=["text/xml", "application/x-xml"], @symbol=:xml, @string="application/xml", @hash=2382684110760511079>=>:xml_simple, #<Mime::Type:0x00007fed6a1367a8 @synonyms=["text/x-json", "application/jsonrequest"], @symbol=:json, @string="application/json", @hash=4052675979160935381>=>:json}>>, @default_options={:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :secret=>"e4b0ec799efd029665d9bb7fad3535a0757372761e2cae48bf483812578f", :coder=>#<Rack::Session::Cookie::Base64::Marshal:0x00007fed68ef2218>}, @key="jiez4Mielu1AiHugog3shiiPhe3lai3faer", @cookie_only=true>>>>>>, @condition=#<Proc:0x00007fed6a28e128@/Users/kyrylo/.gem/ruby/2.4.2/gems/railties-3.2.22.5/lib/rails/application.rb:275 (lambda)>, @validated=false>, @check_ip=true, @proxies=/
3493
+ + ^127\.0\.0\.1$ | # localhost
3494
+ + ^(10 | # private IP 10.x.x.x
3495
+ + 172\.(1[6-9]|2[0-9]|3[0-1]) | # private IP in the range 172.16.0.0 .. 172.31.255.255
3496
+ + 192\.168 # private IP 192.168.x.x
3497
+ + )\.
3498
+ + /x>, @calculated_ip=false>, "rack.session"=>#<Rack::Session::Abstract::SessionHash:0x3ff6b48fb804 not yet loaded>, "rack.session.options"=>{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :secret=>"e4b0ec799efd029665d9bb7fad3535a0757372761e2cae48bf483812578f", :coder=>#<Rack::Session::Cookie::Base64::Marshal:0x00007fed68ef2218>, :id=>nil}, "rack.request.cookie_hash"=>{}, "rack.request.cookie_string"=>"", "action_dispatch.cookies"=>#<ActionDispatch::Cookies::CookieJar:0x00007fed691f6900 @secret="ni6aeph6aeriBiphesh8omahv6cohpue5Quah5ceiMohtuvei8", @set_cookies={}, @delete_cookies={}, @host="example.org", @secure=false, @closed=false, @cookies={}, @signed=#<ActionDispatch::Cookies::SignedCookieJar:0x00007fed691f6108 @parent_jar=#<ActionDispatch::Cookies::CookieJar:0x00007fed691f6900 ...>, @verifier=#<ActiveSupport::MessageVerifier:0x00007fed67cfab50 @secret="ni6aeph6aeriBiphesh8omahv6cohpue5Quah5ceiMohtuvei8", @digest="SHA1", @serializer=Marshal>>>, "action_dispatch.request.unsigned_session_cookie"=>{}, "warden"=>Warden::Proxy:70328812819720 @config={:default_scope=>:default, :scope_defaults=>{}, :default_strategies=>{}, :intercept_401=>true}, "action_dispatch.request.path_parameters"=>{:controller=>"dummy", :action=>"delayed_job"}, "action_controller.instance"=>#<DummyController:0x00007fed68f5b4c0 @_routes=nil, @_action_has_layout=true, @_headers={"Content-Type"=>"text/html"}, @_status=200, @_request=#<ActionDispatch::Request:0x00007fed68f5b358 @env={...}, @filtered_parameters={"controller"=>"dummy", "action"=>"delayed_job"}, @method="GET", @fullpath="/delayed_job">, @_response=#<ActionDispatch::Response:0x00007fed68f5b308 @body=[], @header={}, @status=200, @sending_file=false, @blank=false, @cache_control={}, @etag=nil, @request=#<ActionDispatch::Request:0x00007fed68f5b358 @env={...}, @filtered_parameters={"controller"=>"dummy", "action"=>"delayed_job"}, @method="GET", @fullpath="/delayed_job">>, @_env={...}, @_prefixes=["dummy"], @_lookup_context=#<ActionView::LookupContext:0x00007fed691ddb80 @details_key=nil, @details={:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder]}, @skip_default_locale=false, @cache=true, @prefixes=["dummy"], @rendered_format=nil, @view_paths=#<ActionView::PathSet:0x00007fed691ddab8 @paths=[#<ActionView::FixtureResolver:0x00007fed68dbad78 @pattern=":prefix/:action{.:locale,}{.:formats,}{.:handlers,}", @cached={}, @hash={"layouts/application.html.erb"=>"<%= yield %>", "dummy/index.html.erb"=>"Hello from index", "dummy/notify_airbrake_helper.html.erb"=>"notify_airbrake_helper", "dummy/notify_airbrake_sync_helper.html.erb"=>"notify_airbrake_helper_sync", "dummy/active_record_after_commit.html.erb"=>"active_record_after_commit", "dummy/active_record_after_rollback.html.erb"=>"active_record_after_rollback", "dummy/active_job.html.erb"=>"active_job", "dummy/resque.html.erb"=>"resque", "dummy/delayed_job.html.erb"=>"delayed_job", "dummy/breakdown.html.erb"=>"breakdown"}>]>>, @_action_name="delayed_job", @_response_body=nil>, "action_dispatch.request.content_type"=>nil, "action_dispatch.request.request_parameters"=>{}, "rack.request.query_string"=>"", "rack.request.query_hash"=>{}, "action_dispatch.request.query_parameters"=>{}, "action_dispatch.request.parameters"=>{"controller"=>"dummy", "action"=>"delayed_job"}, "action_dispatch.request.formats"=>[#<Mime::Type:0x00007fed6a1261c8 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=3900637000862569930>]}>}, @truncator=#<Airbrake::Truncator:0x00007fed68db14a8 @max_size=10000>>]
3499
+ ):
3500
+ lib/airbrake/rack/middleware.rb:65:in `notify_airbrake'
3501
+ lib/airbrake/rack/middleware.rb:35:in `rescue in call!'
3502
+ lib/airbrake/rack/middleware.rb:40:in `call!'
3503
+ lib/airbrake/rack/middleware.rb:21:in `call'
3504
+
3505
+
3506
+ Started HEAD "/crash" for 127.0.0.1 at 2019-04-01 13:47:34 +0300
3507
+ Processing by DummyController#crash as HTML
3508
+  (0.0ms) begin transaction
3509
+ SQL (0.1ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3510
+  (0.0ms) commit transaction
3511
+ #<AirbrakeTestError: after_commit>
3512
+ Completed 0 in 11.9ms
3513
+
3514
+ AirbrakeTestError (AirbrakeTestError):
3515
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3516
+ lib/airbrake/rack/middleware.rb:21:in `call'
3517
+
3518
+
3519
+ Started GET "/crash" for 127.0.0.1 at 2019-04-01 13:47:34 +0300
3520
+ Processing by DummyController#crash as HTML
3521
+  (0.0ms) begin transaction
3522
+ SQL (0.1ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3523
+  (0.0ms) commit transaction
3524
+ #<AirbrakeTestError: after_commit>
3525
+ Completed 500 Internal Server Error in 9.1ms
3526
+
3527
+ AirbrakeTestError (AirbrakeTestError):
3528
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3529
+ lib/airbrake/rack/middleware.rb:21:in `call'
3530
+
3531
+
3532
+ Started GET "/crash" for 127.0.0.1 at 2019-04-01 13:47:34 +0300
3533
+ Processing by DummyController#crash as HTML
3534
+  (0.6ms) begin transaction
3535
+ SQL (0.0ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3536
+  (0.0ms) commit transaction
3537
+ #<AirbrakeTestError: after_commit>
3538
+ Completed 500 Internal Server Error in 29.1ms
3539
+
3540
+ AirbrakeTestError (AirbrakeTestError):
3541
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3542
+ lib/airbrake/rack/middleware.rb:21:in `call'
3543
+
3544
+
3545
+ Started GET "/crash" for 127.0.0.1 at 2019-04-01 13:47:36 +0300
3546
+ Processing by DummyController#crash as HTML
3547
+  (0.1ms) begin transaction
3548
+ SQL (0.1ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3549
+  (0.0ms) commit transaction
3550
+ #<AirbrakeTestError: after_commit>
3551
+ Completed 500 Internal Server Error in 5.5ms
3552
+
3553
+ AirbrakeTestError (AirbrakeTestError):
3554
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3555
+ lib/airbrake/rack/middleware.rb:21:in `call'
3556
+
3557
+
3558
+ Started GET "/crash" for 127.0.0.1 at 2019-04-01 13:47:36 +0300
3559
+ Processing by DummyController#crash as HTML
3560
+  (0.0ms) begin transaction
3561
+ SQL (0.0ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3562
+  (0.0ms) commit transaction
3563
+ #<AirbrakeTestError: after_commit>
3564
+ Completed 500 Internal Server Error in 1.0ms
3565
+
3566
+ AirbrakeTestError (AirbrakeTestError):
3567
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3568
+ lib/airbrake/rack/middleware.rb:21:in `call'
3569
+
3570
+
3571
+ Started GET "/crash" for 127.0.0.1 at 2019-04-01 13:47:36 +0300
3572
+ Processing by DummyController#crash as HTML
3573
+  (0.1ms) begin transaction
3574
+ SQL (0.0ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3575
+  (0.0ms) commit transaction
3576
+ #<AirbrakeTestError: after_commit>
3577
+ Completed 500 Internal Server Error in 14.5ms
3578
+
3579
+ AirbrakeTestError (AirbrakeTestError):
3580
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3581
+ lib/airbrake/rack/middleware.rb:21:in `call'
3582
+
3583
+
3584
+ Started GET "/notify_airbrake_sync_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:38 +0300
3585
+ Processing by DummyController#notify_airbrake_sync_helper as HTML
3586
+ Parameters: {"foo"=>"bar"}
3587
+ Rendered dummy/notify_airbrake_sync_helper.html.erb within layouts/application (1.2ms)
3588
+ Completed 200 OK in 22.5ms (Views: 9.8ms | ActiveRecord: 0.0ms)
3589
+ Started GET "/notify_airbrake_sync_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:40 +0300
3590
+ Processing by DummyController#notify_airbrake_sync_helper as HTML
3591
+ Parameters: {"foo"=>"bar"}
3592
+ Rendered dummy/notify_airbrake_sync_helper.html.erb within layouts/application (0.2ms)
3593
+ Completed 200 OK in 16.8ms (Views: 0.8ms | ActiveRecord: 0.0ms)
3594
+ Started GET "/notify_airbrake_sync_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:42 +0300
3595
+ Processing by DummyController#notify_airbrake_sync_helper as HTML
3596
+ Parameters: {"foo"=>"bar"}
3597
+ Rendered dummy/notify_airbrake_sync_helper.html.erb within layouts/application (0.2ms)
3598
+ Completed 200 OK in 13.2ms (Views: 0.9ms | ActiveRecord: 0.0ms)
3599
+ Started GET "/notify_airbrake_sync_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:44 +0300
3600
+ Processing by DummyController#notify_airbrake_sync_helper as HTML
3601
+ Parameters: {"foo"=>"bar"}
3602
+ Rendered dummy/notify_airbrake_sync_helper.html.erb within layouts/application (0.2ms)
3603
+ Completed 200 OK in 13.6ms (Views: 0.9ms | ActiveRecord: 0.0ms)
3604
+ Started GET "/notify_airbrake_sync_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:46 +0300
3605
+ Processing by DummyController#notify_airbrake_sync_helper as HTML
3606
+ Parameters: {"foo"=>"bar"}
3607
+ Rendered dummy/notify_airbrake_sync_helper.html.erb within layouts/application (0.2ms)
3608
+ Completed 200 OK in 12.9ms (Views: 0.9ms | ActiveRecord: 0.0ms)
3609
+ Started GET "/notify_airbrake_sync_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:48 +0300
3610
+ Processing by DummyController#notify_airbrake_sync_helper as HTML
3611
+ Parameters: {"foo"=>"bar"}
3612
+ Rendered dummy/notify_airbrake_sync_helper.html.erb within layouts/application (0.2ms)
3613
+ Completed 200 OK in 13.5ms (Views: 1.0ms | ActiveRecord: 0.0ms)
3614
+ Started GET "/notify_airbrake_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:50 +0300
3615
+ Processing by DummyController#notify_airbrake_helper as HTML
3616
+ Parameters: {"foo"=>"bar"}
3617
+ Rendered dummy/notify_airbrake_helper.html.erb within layouts/application (0.2ms)
3618
+ Completed 200 OK in 13.5ms (Views: 0.9ms | ActiveRecord: 0.0ms)
3619
+ Started GET "/notify_airbrake_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:53 +0300
3620
+ Processing by DummyController#notify_airbrake_helper as HTML
3621
+ Parameters: {"foo"=>"bar"}
3622
+ Rendered dummy/notify_airbrake_helper.html.erb within layouts/application (0.2ms)
3623
+ Completed 200 OK in 14.9ms (Views: 9.8ms | ActiveRecord: 0.0ms)
3624
+ Started GET "/notify_airbrake_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:55 +0300
3625
+ Processing by DummyController#notify_airbrake_helper as HTML
3626
+ Parameters: {"foo"=>"bar"}
3627
+ Rendered dummy/notify_airbrake_helper.html.erb within layouts/application (0.2ms)
3628
+ Completed 200 OK in 13.7ms (Views: 8.2ms | ActiveRecord: 0.0ms)
3629
+ Started GET "/notify_airbrake_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:57 +0300
3630
+ Processing by DummyController#notify_airbrake_helper as HTML
3631
+ Parameters: {"foo"=>"bar"}
3632
+ Rendered dummy/notify_airbrake_helper.html.erb within layouts/application (0.3ms)
3633
+ Completed 200 OK in 13.3ms (Views: 8.1ms | ActiveRecord: 0.0ms)
3634
+ Started GET "/notify_airbrake_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:47:59 +0300
3635
+ Processing by DummyController#notify_airbrake_helper as HTML
3636
+ Parameters: {"foo"=>"bar"}
3637
+ Rendered dummy/notify_airbrake_helper.html.erb within layouts/application (0.2ms)
3638
+ Completed 200 OK in 12.6ms (Views: 8.1ms | ActiveRecord: 0.0ms)
3639
+ Started GET "/notify_airbrake_helper?foo=bar" for 127.0.0.1 at 2019-04-01 13:48:01 +0300
3640
+ Processing by DummyController#notify_airbrake_helper as HTML
3641
+ Parameters: {"foo"=>"bar"}
3642
+ Rendered dummy/notify_airbrake_helper.html.erb within layouts/application (0.2ms)
3643
+ Completed 200 OK in 14.3ms (Views: 9.7ms | ActiveRecord: 0.0ms)
3644
+ Started GET "/crash?foo=bar" for 127.0.0.1 at 2019-04-01 13:48:03 +0300
3645
+ Processing by DummyController#crash as HTML
3646
+ Parameters: {"foo"=>"bar"}
3647
+  (0.0ms) begin transaction
3648
+ SQL (0.1ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3649
+  (0.1ms) commit transaction
3650
+ #<AirbrakeTestError: after_commit>
3651
+ Completed 500 Internal Server Error in 14.7ms
3652
+
3653
+ AirbrakeTestError (AirbrakeTestError):
3654
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3655
+ lib/airbrake/rack/middleware.rb:21:in `call'
3656
+
3657
+
3658
+ Started GET "/crash?foo=bar" for 127.0.0.1 at 2019-04-01 13:48:05 +0300
3659
+ Processing by DummyController#crash as HTML
3660
+ Parameters: {"foo"=>"bar"}
3661
+  (0.0ms) begin transaction
3662
+ SQL (0.0ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3663
+  (0.0ms) commit transaction
3664
+ #<AirbrakeTestError: after_commit>
3665
+ Completed 500 Internal Server Error in 18.0ms
3666
+
3667
+ AirbrakeTestError (AirbrakeTestError):
3668
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3669
+ lib/airbrake/rack/middleware.rb:21:in `call'
3670
+
3671
+
3672
+ Started GET "/crash?foo=bar" for 127.0.0.1 at 2019-04-01 13:48:07 +0300
3673
+ Processing by DummyController#crash as HTML
3674
+ Parameters: {"foo"=>"bar"}
3675
+  (0.0ms) begin transaction
3676
+ SQL (0.1ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3677
+  (0.0ms) commit transaction
3678
+ #<AirbrakeTestError: after_commit>
3679
+ Completed 500 Internal Server Error in 18.6ms
3680
+
3681
+ AirbrakeTestError (AirbrakeTestError):
3682
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3683
+ lib/airbrake/rack/middleware.rb:21:in `call'
3684
+
3685
+
3686
+ Started GET "/crash?foo=bar" for 127.0.0.1 at 2019-04-01 13:48:09 +0300
3687
+ Processing by DummyController#crash as HTML
3688
+ Parameters: {"foo"=>"bar"}
3689
+  (0.0ms) begin transaction
3690
+ SQL (0.0ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3691
+  (0.0ms) commit transaction
3692
+ #<AirbrakeTestError: after_commit>
3693
+ Completed 500 Internal Server Error in 19.4ms
3694
+
3695
+ AirbrakeTestError (AirbrakeTestError):
3696
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3697
+ lib/airbrake/rack/middleware.rb:21:in `call'
3698
+
3699
+
3700
+ Started GET "/crash?foo=bar" for 127.0.0.1 at 2019-04-01 13:48:11 +0300
3701
+ Processing by DummyController#crash as HTML
3702
+ Parameters: {"foo"=>"bar"}
3703
+  (0.0ms) begin transaction
3704
+ SQL (0.0ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3705
+  (0.0ms) commit transaction
3706
+ #<AirbrakeTestError: after_commit>
3707
+ Completed 500 Internal Server Error in 18.3ms
3708
+
3709
+ AirbrakeTestError (AirbrakeTestError):
3710
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3711
+ lib/airbrake/rack/middleware.rb:21:in `call'
3712
+
3713
+
3714
+ Started GET "/crash?foo=bar" for 127.0.0.1 at 2019-04-01 13:48:13 +0300
3715
+ Processing by DummyController#crash as HTML
3716
+ Parameters: {"foo"=>"bar"}
3717
+  (0.0ms) begin transaction
3718
+ SQL (0.1ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3719
+  (0.0ms) commit transaction
3720
+ #<AirbrakeTestError: after_commit>
3721
+ Completed 500 Internal Server Error in 19.0ms
3722
+
3723
+ AirbrakeTestError (AirbrakeTestError):
3724
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3725
+ lib/airbrake/rack/middleware.rb:21:in `call'
3726
+
3727
+
3728
+ Started GET "/resque" for 127.0.0.1 at 2019-04-01 13:48:15 +0300
3729
+ Processing by DummyController#resque as HTML
3730
+ Rendered dummy/resque.html.erb within layouts/application (0.2ms)
3731
+ Completed 200 OK in 2.1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
3732
+ Started GET "/crash" for 127.0.0.1 at 2019-04-01 13:48:15 +0300
3733
+ Processing by DummyController#crash as HTML
3734
+  (0.0ms) begin transaction
3735
+ SQL (0.1ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3736
+  (0.0ms) commit transaction
3737
+ #<RSpec::Mocks::MockExpectationError: Airbrake received :notify with unexpected arguments
3738
+ expected: (an instance of Airbrake::Notice)
3739
+ got: (#<AirbrakeTestError: after_commit>)
3740
+ Diff:
3741
+ @@ -1,2 +1,2 @@
3742
+ -["an instance of Airbrake::Notice"]
3743
+ +[#<AirbrakeTestError: after_commit>]
3744
+ >
3745
+ Completed 500 Internal Server Error in 5.8ms
3746
+
3747
+ AirbrakeTestError (AirbrakeTestError):
3748
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3749
+ lib/airbrake/rack/middleware.rb:21:in `call'
3750
+
3751
+
3752
+ Started GET "/" for 127.0.0.1 at 2019-04-01 13:48:15 +0300
3753
+ Processing by DummyController#index as HTML
3754
+ Rendered dummy/index.html.erb within layouts/application (0.2ms)
3755
+ Completed 200 OK in 1.2ms (Views: 0.9ms | ActiveRecord: 0.0ms)
3756
+ Started GET "/breakdown" for 127.0.0.1 at 2019-04-01 13:48:15 +0300
3757
+ Processing by DummyController#breakdown as HTML
3758
+  (0.0ms) begin transaction
3759
+ SQL (0.0ms) INSERT INTO "books" ("title") VALUES (?) [["title", "breakdown"]]
3760
+  (0.0ms) commit transaction
3761
+ #<AirbrakeTestError: after_commit>
3762
+ Book Load (0.1ms) SELECT "books".* FROM "books" 
3763
+ Rendered dummy/breakdown.html.erb within layouts/application (0.2ms)
3764
+ Completed 200 OK in 7.0ms (Views: 0.8ms | ActiveRecord: 0.2ms)
3765
+
3766
+ RSpec::Mocks::MockExpectationError (Airbrake received :notify_performance_breakdown with unexpected arguments
3767
+ expected: (hash_including(:route=>"/breakdown(.:format)", :method=>"GET", :response_type=>:html, :groups=>"hash_including(:db=>\"an instance of Float\")"))
3768
+ got: ({:groups=>{"db"=>0.194, "view"=>0.7850000401958823}, :method=>"GET", :response_type=>:html, :route=>"/breakdown(.:format)", :start_time=>2019-04-01 13:48:15.377602000 +0300})
3769
+ Diff:
3770
+ @@ -1,2 +1,6 @@
3771
+ -["hash_including(:route=>\"/breakdown(.:format)\", :method=>\"GET\", :response_type=>:html, :groups=>\"hash_including(:db=>\\\"an instance of Float\\\")\")"]
3772
+ +[{:groups=>{"db"=>0.194, "view"=>0.7850000401958823},
3773
+ + :method=>"GET",
3774
+ + :response_type=>:html,
3775
+ + :route=>"/breakdown(.:format)",
3776
+ + :start_time=>2019-04-01 13:48:15.377602000 +0300}]
3777
+ ):
3778
+ lib/airbrake/rails/action_controller_performance_breakdown_subscriber.rb:15:in `block in call'
3779
+ lib/airbrake/rails/action_controller_performance_breakdown_subscriber.rb:12:in `each'
3780
+ lib/airbrake/rails/action_controller_performance_breakdown_subscriber.rb:12:in `call'
3781
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3782
+ lib/airbrake/rack/middleware.rb:21:in `call'
3783
+
3784
+
3785
+ Started GET "/crash" for 127.0.0.1 at 2019-04-01 13:48:15 +0300
3786
+ Processing by DummyController#crash as HTML
3787
+  (0.0ms) begin transaction
3788
+ SQL (0.1ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3789
+  (0.0ms) commit transaction
3790
+ #<AirbrakeTestError: after_commit>
3791
+ Completed 500 Internal Server Error in 9.4ms
3792
+
3793
+ AirbrakeTestError (AirbrakeTestError):
3794
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3795
+ lib/airbrake/rack/middleware.rb:21:in `call'
3796
+
3797
+
3798
+ Started GET "/crash" for 127.0.0.1 at 2019-04-01 13:48:17 +0300
3799
+ Processing by DummyController#crash as HTML
3800
+  (0.0ms) begin transaction
3801
+ SQL (0.1ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3802
+  (0.1ms) commit transaction
3803
+ #<AirbrakeTestError: after_commit>
3804
+ Completed 500 Internal Server Error in 19.4ms
3805
+
3806
+ AirbrakeTestError (AirbrakeTestError):
3807
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3808
+ lib/airbrake/rack/middleware.rb:21:in `call'
3809
+
3810
+
3811
+ Started GET "/crash" for 127.0.0.1 at 2019-04-01 13:48:19 +0300
3812
+ Processing by DummyController#crash as HTML
3813
+  (0.0ms) begin transaction
3814
+ SQL (0.0ms) INSERT INTO "books" ("title") VALUES (?) [["title", "book"]]
3815
+  (0.0ms) commit transaction
3816
+ #<AirbrakeTestError: after_commit>
3817
+ Completed 500 Internal Server Error in 17.4ms
3818
+
3819
+ AirbrakeTestError (AirbrakeTestError):
3820
+ lib/airbrake/rack/middleware.rb:33:in `call!'
3821
+ lib/airbrake/rack/middleware.rb:21:in `call'
3822
+
3823
+
@@ -103,17 +103,3 @@ end
103
103
  Thread.abort_on_exception = true
104
104
 
105
105
  AirbrakeTestError = Class.new(StandardError)
106
-
107
- # Print header with versions information. This simplifies debugging of build
108
- # failures on CircleCI.
109
- versions = <<BANNER
110
- #{'#' * 80}
111
- # RUBY_VERSION: #{RUBY_VERSION}
112
- # RUBY_ENGINE: #{RUBY_ENGINE}
113
- BANNER
114
- versions << "# JRUBY_VERSION #{JRUBY_VERSION}\n" if defined?(JRUBY_VERSION)
115
- versions << "# Rails version: #{Rails.version}\n" if defined?(Rails)
116
- versions << "# Rack release: #{Rack.release}\n"
117
- versions << '#' * 80
118
-
119
- puts versions
@@ -127,5 +127,16 @@ RSpec.describe Airbrake::Rails::ActionControllerPerformanceBreakdownSubscriber d
127
127
  subject.call([])
128
128
  end
129
129
  end
130
+
131
+ context "when response format is */*" do
132
+ before { event.payload[:format] = "*/*" }
133
+
134
+ it "normalizes it to :html" do
135
+ expect(Airbrake).to receive(:notify_performance_breakdown).with(
136
+ hash_including(response_type: :html)
137
+ )
138
+ subject.call([])
139
+ end
140
+ end
130
141
  end
131
142
  end
@@ -9,6 +9,7 @@ RSpec.describe "airbrake/rake/tasks" do
9
9
 
10
10
  before do
11
11
  stub_request(:post, endpoint).to_return(status: 201, body: '{}')
12
+ allow(STDOUT).to receive(:puts).and_return(nil)
12
13
  end
13
14
 
14
15
  describe "airbrake:deploy" do
@@ -57,16 +58,6 @@ RSpec.describe "airbrake/rake/tasks" do
57
58
  let(:airbrake_vars) { "AIRBRAKE_PROJECT_ID=1\nAIRBRAKE_API_KEY=2\nRAILS_ENV=3\n" }
58
59
  let(:silenced_stdout) { File.new(File::NULL, 'w') }
59
60
 
60
- before do
61
- @original_stdout = $stdout
62
- $stdout = silenced_stdout
63
- end
64
-
65
- after do
66
- $stdout.close
67
- $stdout = @original_stdout
68
- end
69
-
70
61
  describe "parsing environment variables" do
71
62
  it "does not raise when an env variable value contains '='" do
72
63
  heroku_config = airbrake_vars + "URL=https://airbrake.io/docs?key=11\n"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrake
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airbrake Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-29 00:00:00.000000000 Z
11
+ date: 2019-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake-ruby