bugsnag 1.6.1 → 1.6.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 +5 -0
- data/VERSION +1 -1
- data/bugsnag.gemspec +3 -2
- data/lib/bugsnag/rails.rb +5 -1
- data/lib/bugsnag/rails/active_record_rescue.rb +18 -0
- data/lib/bugsnag/railtie.rb +5 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ead9c3ae435b2c76b2ad41748a846992993032b0
|
4
|
+
data.tar.gz: 9c7572192cdc46149bfd17d9f26183ac2ac54f3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed8321d8b710b85ad78c37aaadf50669ba34ee17d924014604715440c07fcd72da35e10502d45831cfcb7bc78381ec8275cad8f6b3b2e89ee4dc546d5d5c6653
|
7
|
+
data.tar.gz: 23205103196fe19e341204072b74be923447f912afe01bb5ca6d21e22eef91c2f6aa039be8c09dbf4d0d5bb5d708ff667aac36572fa5e8cbf702a5369b5b60b6
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
1.6.2
|
5
|
+
-----
|
6
|
+
- Notify about exceptions that occur in ActiveRecord `commit` and `rollback`
|
7
|
+
callbacks (these are usually swallowed silently by rails)
|
8
|
+
|
4
9
|
1.6.1
|
5
10
|
-----
|
6
11
|
- Ensure sidekiq, mailman and rake hooks respect the `ignore_classes` setting
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.2
|
data/bugsnag.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "bugsnag"
|
8
|
-
s.version = "1.6.
|
8
|
+
s.version = "1.6.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["James Smith"]
|
12
|
-
s.date = "2013-10-
|
12
|
+
s.date = "2013-10-14"
|
13
13
|
s.description = "Ruby notifier for bugsnag.com"
|
14
14
|
s.email = "james@bugsnag.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -46,6 +46,7 @@ Gem::Specification.new do |s|
|
|
46
46
|
"lib/bugsnag/rack.rb",
|
47
47
|
"lib/bugsnag/rails.rb",
|
48
48
|
"lib/bugsnag/rails/action_controller_rescue.rb",
|
49
|
+
"lib/bugsnag/rails/active_record_rescue.rb",
|
49
50
|
"lib/bugsnag/rails/controller_methods.rb",
|
50
51
|
"lib/bugsnag/railtie.rb",
|
51
52
|
"lib/bugsnag/rake.rb",
|
data/lib/bugsnag/rails.rb
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
require "bugsnag"
|
5
5
|
require "bugsnag/rails/controller_methods"
|
6
6
|
require "bugsnag/rails/action_controller_rescue"
|
7
|
+
require "bugsnag/rails/active_record_rescue"
|
7
8
|
require "bugsnag/middleware/rails2_request"
|
8
9
|
require "bugsnag/middleware/callbacks"
|
9
10
|
|
@@ -14,6 +15,9 @@ module Bugsnag
|
|
14
15
|
ActionController::Base.send(:include, Bugsnag::Rails::ActionControllerRescue)
|
15
16
|
ActionController::Base.send(:include, Bugsnag::Rails::ControllerMethods)
|
16
17
|
end
|
18
|
+
if defined?(ActiveRecord::Base)
|
19
|
+
ActiveRecord::Base.send(:include, Bugsnag::Rails::ActiveRecordRescue)
|
20
|
+
end
|
17
21
|
|
18
22
|
# Try to find where to log to
|
19
23
|
rails_logger = nil
|
@@ -39,4 +43,4 @@ module Bugsnag
|
|
39
43
|
end
|
40
44
|
end
|
41
45
|
|
42
|
-
Bugsnag::Rails.initialize
|
46
|
+
Bugsnag::Rails.initialize
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Bugsnag::Rails
|
2
|
+
module ActiveRecordRescue
|
3
|
+
def run_callbacks(kind, *args, &block)
|
4
|
+
if %w(commit rollback).include?(kind.to_s)
|
5
|
+
begin
|
6
|
+
super
|
7
|
+
rescue StandardError => exception
|
8
|
+
# This exception will NOT be escalated, so notify it here.
|
9
|
+
Bugsnag.auto_notify(exception)
|
10
|
+
raise
|
11
|
+
end
|
12
|
+
else
|
13
|
+
# Let the post process handle the exception
|
14
|
+
super
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/bugsnag/railtie.rb
CHANGED
@@ -31,6 +31,10 @@ module Bugsnag
|
|
31
31
|
require "bugsnag/rails/controller_methods"
|
32
32
|
::ActionController::Base.send(:include, Bugsnag::Rails::ControllerMethods)
|
33
33
|
end
|
34
|
+
if defined?(ActiveRecord::Base)
|
35
|
+
require "bugsnag/rails/active_record_rescue"
|
36
|
+
ActiveRecord::Base.send(:include, Bugsnag::Rails::ActiveRecordRescue)
|
37
|
+
end
|
34
38
|
end
|
35
39
|
|
36
40
|
initializer "bugsnag.use_rack_middleware" do |app|
|
@@ -41,4 +45,4 @@ module Bugsnag
|
|
41
45
|
end
|
42
46
|
end
|
43
47
|
end
|
44
|
-
end
|
48
|
+
end
|
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: 1.6.
|
4
|
+
version: 1.6.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: 2013-10-
|
11
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- lib/bugsnag/rack.rb
|
124
124
|
- lib/bugsnag/rails.rb
|
125
125
|
- lib/bugsnag/rails/action_controller_rescue.rb
|
126
|
+
- lib/bugsnag/rails/active_record_rescue.rb
|
126
127
|
- lib/bugsnag/rails/controller_methods.rb
|
127
128
|
- lib/bugsnag/railtie.rb
|
128
129
|
- lib/bugsnag/rake.rb
|