airbrake 10.0.1 → 10.0.2

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
  SHA256:
3
- metadata.gz: f6ebb0d64b92742b80afe65583bf19f6c3fc7352d146e95765b8c5b7d2d1949b
4
- data.tar.gz: 2e02317eeb64c7f4ece9173b88af2033c13d630dc9072232d39a697495da3f19
3
+ metadata.gz: 5138c1675426cc908ae8b1857898ddc04c135fda23dfe21db19e6b1bf0b36faf
4
+ data.tar.gz: '085abd9125a9a615935ac2b1171cdfd74205bde892708e073bfbda44103c72ca'
5
5
  SHA512:
6
- metadata.gz: b69a9609edd060362d33626f715696ce41a49f05a796ad314f7cb7258d3e7b03274ebeb7ef8c4c17fc004f64cdd56f3af51ba5c59f62acaeb2416ee7517d3af2
7
- data.tar.gz: 99b1645d2b95c0d73d2bad8a2bc04960334e14e8d0d13f613d30f7666f250b05d5e0567944113302e8c6a6dc40a17fc8e897d6fc578af41af96426f07b79efc3
6
+ metadata.gz: 39bc3cfe3510b0db2adece334666b4e753298fd4d09f4d7d445086c0512aa0436ec8c5b38a85933fae822efeea155d7d2bea7e25866e169878b6f1b330fb4d4d
7
+ data.tar.gz: 9c189959ccdfa6c30752462dffb49e8925df101f18597180ab6a31e2320a620431bcbcf6d66c83838d1acfd9be1b6c98623253e60cea77e8881fc84e5996aa14
@@ -6,15 +6,7 @@ module Airbrake
6
6
  module ActiveJob
7
7
  extend ActiveSupport::Concern
8
8
 
9
- # @return [Array<Regexp>] the list of known adapters
10
- ADAPTERS = [/Resque/, /Sidekiq/, /DelayedJob/].freeze
11
-
12
9
  def self.notify_airbrake(exception, job)
13
- queue_adapter = job.class.queue_adapter.to_s
14
-
15
- # Do not notify twice if a queue_adapter is configured already.
16
- raise exception if ADAPTERS.any? { |a| a =~ queue_adapter }
17
-
18
10
  notice = Airbrake.build_notice(exception)
19
11
  notice[:context][:component] = 'active_job'
20
12
  notice[:context][:action] = job.class.name
@@ -1,12 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Monkey-patch Net::HTTP to benchmark it.
4
- Net::HTTP.class_eval do
5
- alias_method :request_without_airbrake, :request
6
-
7
- def request(request, *args, &block)
8
- Airbrake::Rack.capture_timing(:http) do
9
- request_without_airbrake(request, *args, &block)
3
+ module Airbrake
4
+ module Rails
5
+ # Monkey-patch Net::HTTP to benchmark it.
6
+ # @api private
7
+ # @since v10.0.2
8
+ module NetHttp
9
+ def request(request, *args, &block)
10
+ Airbrake::Rack.capture_timing(:http) do
11
+ super(request, *args, &block)
12
+ end
13
+ end
10
14
  end
11
15
  end
12
16
  end
17
+
18
+ Net::HTTP.prepend(Airbrake::Rails::NetHttp)
@@ -3,5 +3,5 @@
3
3
  # We use Semantic Versioning v2.0.0
4
4
  # More information: http://semver.org/
5
5
  module Airbrake
6
- AIRBRAKE_VERSION = '10.0.1'.freeze
6
+ AIRBRAKE_VERSION = '10.0.2'.freeze
7
7
  end
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: 10.0.1
4
+ version: 10.0.2
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: 2020-01-29 00:00:00.000000000 Z
11
+ date: 2020-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake-ruby