airbrake 13.0.1 → 13.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 668e709e9a773bc589715b99f9843ce37c1af8b307551e718c7cbe9f00966398
4
- data.tar.gz: 00637f796a64e51709bd2db34f3bc22845d264e21ca9938c1499571e3920025d
3
+ metadata.gz: 553d46f184e67e783a37345e049d4f7bb429520d27d732d2b732ab42ea4a5314
4
+ data.tar.gz: e162a0342478e68ec608faf5c3c8d033dd9c41a0956da1a08d26a040281fff2d
5
5
  SHA512:
6
- metadata.gz: e21c16eb3577a99831676f048f7c6543694954eefe17b1115ca6796caab1d88f3fc1610474c69ba98b32f8aad661d5738091ed34442c1b37ec121d62b03ed5e0
7
- data.tar.gz: 56677458f588058a4313e93ace216ac6475fb5d8c5d0bd0557e86105e0884296c55450d45930a7f2d91e95d6fe1be7d4a4b325937455fea6bc2d2d59568eda9a
6
+ metadata.gz: 0452b7f7d9acb6af56babd7b44cf3bc741de12d218c3d07e25be4de67ab3576ab8ba88a30a620abe9a3b419a9d24d86428583ddcb3858a2755f5b20ad0020b89
7
+ data.tar.gz: fba302f11402c2c066d2d909b5c5cb2988f4071940fdb4a32e32e30f4b62fce4b683f322c72736fff0e24df64af603953ec32b9ed01941be658ca322ab6ee499
@@ -9,10 +9,6 @@ module Airbrake
9
9
  #
10
10
  # @since v8.0.0
11
11
  class ActionControllerNotifySubscriber
12
- def initialize(rails_vsn)
13
- @rails_7_or_above = rails_vsn.to_i >= 7
14
- end
15
-
16
12
  def call(*args)
17
13
  return unless Airbrake::Config.instance.performance_stats
18
14
 
@@ -27,16 +23,7 @@ module Airbrake
27
23
  route: route,
28
24
  status_code: event.status_code,
29
25
  timing: event.duration,
30
-
31
- # On Rails 7+ `ActiveSupport::Notifications::Event#time` returns an
32
- # instance of Float. It represents monotonic time in milliseconds.
33
- # Airbrake Ruby expects that the provided time is in seconds. Hence,
34
- # we need to convert it from milliseconds to seconds. In the
35
- # versions below Rails 7, time is an instance of Time.
36
- #
37
- # Relevant commit:
38
- # https://github.com/rails/rails/commit/81d0dc90becfe0b8e7f7f26beb66c25d84b8ec7f
39
- time: @rails_7_or_above ? event.time / 1000 : event.time,
26
+ time: event.time,
40
27
  )
41
28
  end
42
29
  end
@@ -10,10 +10,14 @@ module Airbrake
10
10
  # @see https://github.com/rails/rails/issues/8987
11
11
  HTML_RESPONSE_WILDCARD = "*/*"
12
12
 
13
+ # @return [Integer]
14
+ MILLISECOND = 1000
15
+
13
16
  include Airbrake::Loggable
14
17
 
15
18
  def initialize(*args)
16
19
  @event = ActiveSupport::Notifications::Event.new(*args)
20
+ @rails_7_or_greater = ::Rails::VERSION::MAJOR >= 7
17
21
  end
18
22
 
19
23
  def method
@@ -42,7 +46,15 @@ module Airbrake
42
46
  end
43
47
 
44
48
  def time
45
- @event.time
49
+ # On Rails 7+ `ActiveSupport::Notifications::Event#time` returns an
50
+ # instance of Float. It represents monotonic time in milliseconds.
51
+ # Airbrake Ruby expects that the provided time is in seconds. Hence,
52
+ # we need to convert it from milliseconds to seconds. In the
53
+ # versions below Rails 7, time is an instance of Time.
54
+ #
55
+ # Relevant commit:
56
+ # https://github.com/rails/rails/commit/81d0dc90becfe0b8e7f7f26beb66c25d84b8ec7f
57
+ @rails_7_or_greater ? @event.time / MILLISECOND : @event.time
46
58
  end
47
59
 
48
60
  def groups
@@ -15,9 +15,7 @@ module Airbrake
15
15
  class ActionControllerTie
16
16
  def initialize
17
17
  @route_subscriber = Airbrake::Rails::ActionControllerRouteSubscriber.new
18
- @notify_subscriber = Airbrake::Rails::ActionControllerNotifySubscriber.new(
19
- ::Rails.version,
20
- )
18
+ @notify_subscriber = Airbrake::Rails::ActionControllerNotifySubscriber.new
21
19
  @performance_breakdown_subscriber =
22
20
  Airbrake::Rails::ActionControllerPerformanceBreakdownSubscriber.new
23
21
  end
@@ -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 = '13.0.1'
6
+ AIRBRAKE_VERSION = '13.0.2'
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: 13.0.1
4
+ version: 13.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: 2022-05-13 00:00:00.000000000 Z
11
+ date: 2022-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake-ruby
@@ -369,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
369
  - !ruby/object:Gem::Version
370
370
  version: '0'
371
371
  requirements: []
372
- rubygems_version: 3.2.32
372
+ rubygems_version: 3.3.3
373
373
  signing_key:
374
374
  specification_version: 4
375
375
  summary: Airbrake is an online tool that provides robust exception tracking in any