bugsnag 2.2.1 → 2.2.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
  SHA1:
3
- metadata.gz: 57cdbb55328ff2ad9b96e7dd77eeb10ef9710e04
4
- data.tar.gz: fe6056bf20eba0cf3a06c5295d2e9f7f915de02c
3
+ metadata.gz: 786c9d4bd2e5d01b21f0d16ed3740b8144b7d0ff
4
+ data.tar.gz: 090f55203be5aacae94f59ccbdb5b726b1ed47a4
5
5
  SHA512:
6
- metadata.gz: b40142028433fe2ac08f366d766d95a38dd6704351826c3d00fe9b4927d374a5b3b021ce86bee75d78592c13f8fd4e8a105fd381a43be29cd59af98461d31d1f
7
- data.tar.gz: 7a3b277241f78ac62de86f99d14c6f5ec64feda3b977fd6bb8824854201e83b17ac4ad9a6a6d4eb20d310123a87572915009b1e5f745fc1861f7d147e0f97e5a
6
+ metadata.gz: 0c8448332a6ffc15e5d12791fa5dbb31c65f3b031e38d0756bc502a866fb4b3e64cc4fd79c23645fa367baf1c85d7e61020639c879795c28685c330ef04f66ff
7
+ data.tar.gz: 9754284692feff0ed1bee0b61ecace287642e7437295d60a17d5d78e37d75c9c2ea4b1abde8220d45ee33868c5c108ca8f8b675a26c91a5f613e791c034da883
@@ -1,8 +1,14 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 2.2.2
5
+ -----
6
+ - Add additional ignored classes
7
+ - Check all chained exceptions on an error for ignored classes
8
+
4
9
  2.2.1
5
10
  -----
11
+ - Fix occasional crash when reading rack params.
6
12
  - Don't strip files with bugsnag in the name.
7
13
 
8
14
  2.2.0
data/README.md CHANGED
@@ -117,7 +117,8 @@ end
117
117
 
118
118
  In other ruby apps, you can provide lambda functions to execute before any
119
119
  `Bugsnag.notify` calls as follows. Don't forget to clear the callbacks at the
120
- end of each request or session.
120
+ end of each request or session. In Rack applications like Sinatra, however, the
121
+ gem will clear the callbacks for you.
121
122
 
122
123
  ```ruby
123
124
  # Set a before notify callback
@@ -628,8 +629,8 @@ to those projects.
628
629
  Demo Applications
629
630
  -----------------
630
631
 
631
- [There are demo applications that use the Bugsnag Ruby gem](https://github.com/bugsnag/bugsnag-example-apps/tree/master/ruby):
632
- examples include Rails, Sinatra, Padrino integrations, etc.
632
+ [There are demo applications that use the Bugsnag Ruby gem](https://github.com/bugsnag/bugsnag-example-apps/tree/master/apps/ruby):
633
+ examples include Rails, Sinatra, Rack, Padrino integrations, etc.
633
634
 
634
635
  Reporting Bugs or Feature Requests
635
636
  ----------------------------------
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.1
1
+ 2.2.2
@@ -42,7 +42,9 @@ module Bugsnag
42
42
  "CGI::Session::CookieStore::TamperedWithCookie",
43
43
  "ActionController::UnknownAction",
44
44
  "AbstractController::ActionNotFound",
45
- "Mongoid::Errors::DocumentNotFound"
45
+ "Mongoid::Errors::DocumentNotFound",
46
+ "SystemExit",
47
+ "SignalException"
46
48
  ].freeze
47
49
 
48
50
  DEFAULT_IGNORE_USER_AGENTS = [].freeze
@@ -284,12 +284,13 @@ module Bugsnag
284
284
  private
285
285
 
286
286
  def ignore_exception_class?
287
- ex = @exceptions.last
288
- ex_name = error_class(ex)
289
- ancestor_chain = ex.class.ancestors.select { |ancestor| ancestor.is_a?(Class) }.map { |ancestor| error_class(ancestor) }.to_set
287
+ @exceptions.any? do |ex|
288
+ ex_name = error_class(ex)
289
+ ancestor_chain = ex.class.ancestors.select { |ancestor| ancestor.is_a?(Class) }.map { |ancestor| error_class(ancestor) }.to_set
290
290
 
291
- @configuration.ignore_classes.any? do |to_ignore|
292
- to_ignore.is_a?(Proc) ? to_ignore.call(ex) : ancestor_chain.include?(to_ignore)
291
+ @configuration.ignore_classes.any? do |to_ignore|
292
+ to_ignore.is_a?(Proc) ? to_ignore.call(ex) : ancestor_chain.include?(to_ignore)
293
+ end
293
294
  end
294
295
  end
295
296
 
@@ -1,7 +1,9 @@
1
1
  module Bugsnag::Rails
2
2
  module ActiveRecordRescue
3
+ KINDS = [:commit, :rollback].freeze
4
+
3
5
  def run_callbacks(kind, *args, &block)
4
- if %w(commit rollback).include?(kind.to_s)
6
+ if KINDS.include?(kind)
5
7
  begin
6
8
  super
7
9
  rescue StandardError => exception
@@ -502,6 +502,17 @@ describe Bugsnag::Notification do
502
502
  Bugsnag.notify_or_ignore(BugsnagSubclassTestException.new("It crashed"))
503
503
  end
504
504
 
505
+ it "does not notify if any caused exception is an ignored class" do
506
+ Bugsnag.configuration.ignore_classes << "NestedException"
507
+
508
+ ex = NestedException.new("Self-referential exception")
509
+ ex.original_exception = BugsnagTestException.new("It crashed")
510
+
511
+ expect(Bugsnag::Notification).not_to receive(:deliver_exception_payload)
512
+
513
+ Bugsnag.notify_or_ignore(ex)
514
+ end
515
+
505
516
  it "accepts both String and Class instances as an ignored class" do
506
517
  Bugsnag.configuration.ignore_classes << BugsnagTestException
507
518
 
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: 2.2.1
4
+ version: 2.2.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: 2014-07-24 00:00:00.000000000 Z
11
+ date: 2014-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json