bugsnag 6.24.1 → 6.24.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/VERSION +1 -1
- data/lib/bugsnag/integrations/railtie.rb +27 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0c0062b72786fa763b8b17ff0f72647808c2c0372c08b098b70007acc52dec9
|
4
|
+
data.tar.gz: c467bdbbe899f9e6f2ec1bf47071c8f70228f7cac51f292e8b77a6c9724da368
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2cd2286a921e1cb2ad6e78e620c097a7a5937be53ebb75f020cc7eaba31505c904315083b545a1f9758ddb14c2e902c8e47e8845eef3a242fd8aec810860496
|
7
|
+
data.tar.gz: 15410f4d0280b5abb8f9804a6b66c6d05eed52c025e394ed0fbc642507d7ac64b2cb90db5a1dda0a946143d85dbab4d148dafab88697fa47bb79363d4ff6df3e
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
## v6.24.2 (21 January 2022)
|
5
|
+
|
6
|
+
### Fixes
|
7
|
+
|
8
|
+
* Avoid rescuing from errors in Active Record transaction callbacks in versions of Rails where they will be re-raised
|
9
|
+
| [#709](https://github.com/bugsnag/bugsnag-ruby/pull/709)
|
10
|
+
| [apalmblad](https://github.com/apalmblad)
|
11
|
+
|
4
12
|
## v6.24.1 (30 November 2021)
|
5
13
|
|
6
14
|
### Fixes
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.24.
|
1
|
+
6.24.2
|
@@ -47,6 +47,29 @@ module Bugsnag
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
+
##
|
51
|
+
# Do we need to rescue (& notify) in Active Record callbacks?
|
52
|
+
#
|
53
|
+
# On Rails versions < 4.2, Rails did not raise errors in AR callbacks
|
54
|
+
# On Rails version 4.2, a config option was added to control this
|
55
|
+
# On Rails version 5.0, the config option was removed and errors in callbacks
|
56
|
+
# always bubble up
|
57
|
+
#
|
58
|
+
# @api private
|
59
|
+
def self.rescue_in_active_record_callbacks?
|
60
|
+
# Rails 5+ will re-raise errors in callbacks, so we don't need to rescue them
|
61
|
+
return false if ::Rails::VERSION::MAJOR > 4
|
62
|
+
|
63
|
+
# before 4.2, errors were always swallowed, so we need to rescue them
|
64
|
+
return true if ::Rails::VERSION::MAJOR < 4
|
65
|
+
|
66
|
+
# a config option was added in 4.2 to control this, but won't exist in 4.0 & 4.1
|
67
|
+
return true unless ActiveRecord::Base.respond_to?(:raise_in_transactional_callbacks)
|
68
|
+
|
69
|
+
# if the config option is false, we need to rescue and notify
|
70
|
+
ActiveRecord::Base.raise_in_transactional_callbacks == false
|
71
|
+
end
|
72
|
+
|
50
73
|
rake_tasks do
|
51
74
|
require "bugsnag/integrations/rake"
|
52
75
|
load "bugsnag/tasks/bugsnag.rake"
|
@@ -70,8 +93,10 @@ module Bugsnag
|
|
70
93
|
end
|
71
94
|
|
72
95
|
ActiveSupport.on_load(:active_record) do
|
73
|
-
|
74
|
-
|
96
|
+
if Bugsnag::Railtie.rescue_in_active_record_callbacks?
|
97
|
+
require "bugsnag/integrations/rails/active_record_rescue"
|
98
|
+
include Bugsnag::Rails::ActiveRecordRescue
|
99
|
+
end
|
75
100
|
end
|
76
101
|
|
77
102
|
ActiveSupport.on_load(:active_job) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.24.
|
4
|
+
version: 6.24.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|