airbrake 13.0.1 → 13.0.3

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: 668e709e9a773bc589715b99f9843ce37c1af8b307551e718c7cbe9f00966398
4
- data.tar.gz: 00637f796a64e51709bd2db34f3bc22845d264e21ca9938c1499571e3920025d
3
+ metadata.gz: 29da4f7ace6d408a64f855ddab6385fd40863235694a22cd31f5e46d1ae9c957
4
+ data.tar.gz: 4c08d2305072b5b48936e87dd2e53bf1610459637c7e23c7e75e118e475232b9
5
5
  SHA512:
6
- metadata.gz: e21c16eb3577a99831676f048f7c6543694954eefe17b1115ca6796caab1d88f3fc1610474c69ba98b32f8aad661d5738091ed34442c1b37ec121d62b03ed5e0
7
- data.tar.gz: 56677458f588058a4313e93ace216ac6475fb5d8c5d0bd0557e86105e0884296c55450d45930a7f2d91e95d6fe1be7d4a4b325937455fea6bc2d2d59568eda9a
6
+ metadata.gz: 9ddb0e206f5723439061ca14af99f2c228f80f6db5907f07a16a8fde611b4f1e13533a0dea5e5b27d564a90e3044fb449fa09731274042c59fbb84bdb7f83af1
7
+ data.tar.gz: b78091a0e4391c27eea3c884130e1c6515cf10cf417ea29ec6c6df32075f5917dead2efd2f6e42395a64142f761d3870408ba5f7c7fb3ed1a90f53204c7bc8b2
@@ -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
@@ -25,7 +25,7 @@ module Airbrake
25
25
  return tie_rails_4_or_below_with_active_record
26
26
  end
27
27
 
28
- tie_rails_4_or_below_with_active_record
28
+ tie_rails_4_or_below_without_active_record
29
29
  end
30
30
 
31
31
  private
@@ -85,8 +85,8 @@ namespace :airbrake do
85
85
 
86
86
  unless (env = heroku_env['RAILS_ENV'])
87
87
  env = 'production'
88
- puts "Airbrake couldn't identify your app's environment, so the '#{env}'" \
89
- " environment will be used."
88
+ puts "Airbrake couldn't identify your app's environment, " \
89
+ "so the '#{env}' environment will be used."
90
90
  end
91
91
 
92
92
  unless (repo = ENV.fetch('REPOSITORY_URL', nil))
@@ -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.3'
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.3
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-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake-ruby
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '1.1'
145
+ version: '2.0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '1.1'
152
+ version: '2.0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: redis
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -248,26 +248,6 @@ dependencies:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
250
  version: '1.3'
251
- - !ruby/object:Gem::Dependency
252
- name: public_suffix
253
- requirement: !ruby/object:Gem::Requirement
254
- requirements:
255
- - - "~>"
256
- - !ruby/object:Gem::Version
257
- version: '4.0'
258
- - - "<"
259
- - !ruby/object:Gem::Version
260
- version: '5.0'
261
- type: :development
262
- prerelease: false
263
- version_requirements: !ruby/object:Gem::Requirement
264
- requirements:
265
- - - "~>"
266
- - !ruby/object:Gem::Version
267
- version: '4.0'
268
- - - "<"
269
- - !ruby/object:Gem::Version
270
- version: '5.0'
271
251
  - !ruby/object:Gem::Dependency
272
252
  name: redis-namespace
273
253
  requirement: !ruby/object:Gem::Requirement
@@ -369,7 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
349
  - !ruby/object:Gem::Version
370
350
  version: '0'
371
351
  requirements: []
372
- rubygems_version: 3.2.32
352
+ rubygems_version: 3.3.3
373
353
  signing_key:
374
354
  specification_version: 4
375
355
  summary: Airbrake is an online tool that provides robust exception tracking in any