bugsnag 1.2.15 → 1.2.16
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.
- data/CHANGELOG.md +4 -0
- data/README.md +8 -1
- data/VERSION +1 -1
- data/bugsnag.gemspec +12 -13
- data/lib/bugsnag/notification.rb +4 -1
- data/spec/notification_spec.rb +8 -0
- metadata +49 -35
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -238,7 +238,14 @@ Sets for which exception classes we should not send exceptions to bugsnag.com.
|
|
|
238
238
|
config.ignore_classes << "ActiveRecord::StatementInvalid"
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
You can also provide a lambda function here to ignore by other exception
|
|
242
|
+
attributes or by a regex:
|
|
243
|
+
|
|
244
|
+
```ruby
|
|
245
|
+
config.ignore_classes << lambda {|ex| ex.message =~ /timeout/}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
By default, `ignore_classes` contains the following:
|
|
242
249
|
|
|
243
250
|
```ruby
|
|
244
251
|
[
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.
|
|
1
|
+
1.2.16
|
data/bugsnag.gemspec
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
|
-
s.name =
|
|
8
|
-
s.version = "1.2.
|
|
7
|
+
s.name = "bugsnag"
|
|
8
|
+
s.version = "1.2.16"
|
|
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 =
|
|
13
|
-
s.description =
|
|
14
|
-
s.email =
|
|
12
|
+
s.date = "2013-02-24"
|
|
13
|
+
s.description = "Ruby notifier for bugsnag.com"
|
|
14
|
+
s.email = "james@bugsnag.com"
|
|
15
15
|
s.extra_rdoc_files = [
|
|
16
16
|
"LICENSE.txt",
|
|
17
17
|
"README.md"
|
|
@@ -56,32 +56,31 @@ Gem::Specification.new do |s|
|
|
|
56
56
|
"spec/rack_spec.rb",
|
|
57
57
|
"spec/spec_helper.rb"
|
|
58
58
|
]
|
|
59
|
-
s.homepage =
|
|
59
|
+
s.homepage = "http://github.com/bugsnag/bugsnag-ruby"
|
|
60
60
|
s.licenses = ["MIT"]
|
|
61
61
|
s.require_paths = ["lib"]
|
|
62
|
-
s.rubygems_version =
|
|
63
|
-
s.summary =
|
|
62
|
+
s.rubygems_version = "1.8.24"
|
|
63
|
+
s.summary = "Ruby notifier for bugsnag.com"
|
|
64
64
|
|
|
65
65
|
if s.respond_to? :specification_version then
|
|
66
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
67
66
|
s.specification_version = 3
|
|
68
67
|
|
|
69
|
-
if Gem::Version.new(Gem::
|
|
68
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
70
69
|
s.add_runtime_dependency(%q<multi_json>, ["~> 1.0"])
|
|
71
|
-
s.add_runtime_dependency(%q<httparty>, ["
|
|
70
|
+
s.add_runtime_dependency(%q<httparty>, ["< 1.0", ">= 0.6"])
|
|
72
71
|
s.add_development_dependency(%q<rspec>, ["~> 2.11.0"])
|
|
73
72
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
|
74
73
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
|
75
74
|
else
|
|
76
75
|
s.add_dependency(%q<multi_json>, ["~> 1.0"])
|
|
77
|
-
s.add_dependency(%q<httparty>, ["
|
|
76
|
+
s.add_dependency(%q<httparty>, ["< 1.0", ">= 0.6"])
|
|
78
77
|
s.add_dependency(%q<rspec>, ["~> 2.11.0"])
|
|
79
78
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
|
80
79
|
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
|
81
80
|
end
|
|
82
81
|
else
|
|
83
82
|
s.add_dependency(%q<multi_json>, ["~> 1.0"])
|
|
84
|
-
s.add_dependency(%q<httparty>, ["
|
|
83
|
+
s.add_dependency(%q<httparty>, ["< 1.0", ">= 0.6"])
|
|
85
84
|
s.add_dependency(%q<rspec>, ["~> 2.11.0"])
|
|
86
85
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
|
87
86
|
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
data/lib/bugsnag/notification.rb
CHANGED
|
@@ -151,7 +151,10 @@ module Bugsnag
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
def ignore?
|
|
154
|
-
@
|
|
154
|
+
ex = @exceptions.last
|
|
155
|
+
@configuration.ignore_classes.any? do |to_ignore|
|
|
156
|
+
to_ignore.is_a?(Proc) ? to_ignore.call(ex) : to_ignore == error_class(ex)
|
|
157
|
+
end
|
|
155
158
|
end
|
|
156
159
|
|
|
157
160
|
def request_data
|
data/spec/notification_spec.rb
CHANGED
|
@@ -292,6 +292,14 @@ describe Bugsnag::Notification do
|
|
|
292
292
|
Bugsnag.notify_or_ignore(BugsnagTestException.new("It crashed"))
|
|
293
293
|
end
|
|
294
294
|
|
|
295
|
+
it "should not notify if the exception is matched by an ignore_classes lambda function" do
|
|
296
|
+
Bugsnag.configuration.ignore_classes << lambda {|e| e.message =~ /crashed/}
|
|
297
|
+
|
|
298
|
+
Bugsnag::Notification.should_not_receive(:deliver_exception_payload)
|
|
299
|
+
|
|
300
|
+
Bugsnag.notify_or_ignore(BugsnagTestException.new("It crashed"))
|
|
301
|
+
end
|
|
302
|
+
|
|
295
303
|
it "should not unwrap the same exception twice" do
|
|
296
304
|
Bugsnag::Notification.should_receive(:deliver_exception_payload) do |endpoint, payload|
|
|
297
305
|
event = get_event_from_payload(payload)
|
metadata
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bugsnag
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
4
|
+
hash: 63
|
|
5
|
+
prerelease:
|
|
5
6
|
segments:
|
|
6
7
|
- 1
|
|
7
8
|
- 2
|
|
8
|
-
-
|
|
9
|
-
version: 1.2.
|
|
9
|
+
- 16
|
|
10
|
+
version: 1.2.16
|
|
10
11
|
platform: ruby
|
|
11
12
|
authors:
|
|
12
13
|
- James Smith
|
|
@@ -14,82 +15,92 @@ autorequire:
|
|
|
14
15
|
bindir: bin
|
|
15
16
|
cert_chain: []
|
|
16
17
|
|
|
17
|
-
date: 2013-02-
|
|
18
|
-
default_executable:
|
|
18
|
+
date: 2013-02-24 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
name: multi_json
|
|
24
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
|
21
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
22
|
+
none: false
|
|
25
23
|
requirements:
|
|
26
24
|
- - ~>
|
|
27
25
|
- !ruby/object:Gem::Version
|
|
26
|
+
hash: 15
|
|
28
27
|
segments:
|
|
29
28
|
- 1
|
|
30
29
|
- 0
|
|
31
30
|
version: "1.0"
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
version_requirements: *id001
|
|
32
|
+
name: multi_json
|
|
34
33
|
prerelease: false
|
|
35
34
|
type: :runtime
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
- !ruby/object:Gem::Dependency
|
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
37
|
+
none: false
|
|
38
38
|
requirements:
|
|
39
|
-
- - ">="
|
|
40
|
-
- !ruby/object:Gem::Version
|
|
41
|
-
segments:
|
|
42
|
-
- 0
|
|
43
|
-
- 6
|
|
44
|
-
version: "0.6"
|
|
45
39
|
- - <
|
|
46
40
|
- !ruby/object:Gem::Version
|
|
41
|
+
hash: 15
|
|
47
42
|
segments:
|
|
48
43
|
- 1
|
|
49
44
|
- 0
|
|
50
45
|
version: "1.0"
|
|
51
|
-
|
|
52
|
-
- !ruby/object:Gem::
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
hash: 7
|
|
49
|
+
segments:
|
|
50
|
+
- 0
|
|
51
|
+
- 6
|
|
52
|
+
version: "0.6"
|
|
53
|
+
version_requirements: *id002
|
|
54
|
+
name: httparty
|
|
53
55
|
prerelease: false
|
|
54
|
-
type: :
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
type: :runtime
|
|
57
|
+
- !ruby/object:Gem::Dependency
|
|
58
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
59
|
+
none: false
|
|
57
60
|
requirements:
|
|
58
61
|
- - ~>
|
|
59
62
|
- !ruby/object:Gem::Version
|
|
63
|
+
hash: 35
|
|
60
64
|
segments:
|
|
61
65
|
- 2
|
|
62
66
|
- 11
|
|
63
67
|
- 0
|
|
64
68
|
version: 2.11.0
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
version_requirements: *id003
|
|
70
|
+
name: rspec
|
|
67
71
|
prerelease: false
|
|
68
72
|
type: :development
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
- !ruby/object:Gem::Dependency
|
|
74
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
75
|
+
none: false
|
|
71
76
|
requirements:
|
|
72
77
|
- - ~>
|
|
73
78
|
- !ruby/object:Gem::Version
|
|
79
|
+
hash: 31
|
|
74
80
|
segments:
|
|
75
81
|
- 3
|
|
76
82
|
- 12
|
|
77
83
|
version: "3.12"
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
version_requirements: *id004
|
|
85
|
+
name: rdoc
|
|
80
86
|
prerelease: false
|
|
81
87
|
type: :development
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
- !ruby/object:Gem::Dependency
|
|
89
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
|
90
|
+
none: false
|
|
84
91
|
requirements:
|
|
85
92
|
- - ~>
|
|
86
93
|
- !ruby/object:Gem::Version
|
|
94
|
+
hash: 63
|
|
87
95
|
segments:
|
|
88
96
|
- 1
|
|
89
97
|
- 8
|
|
90
98
|
- 4
|
|
91
99
|
version: 1.8.4
|
|
92
|
-
|
|
100
|
+
version_requirements: *id005
|
|
101
|
+
name: jeweler
|
|
102
|
+
prerelease: false
|
|
103
|
+
type: :development
|
|
93
104
|
description: Ruby notifier for bugsnag.com
|
|
94
105
|
email: james@bugsnag.com
|
|
95
106
|
executables: []
|
|
@@ -138,7 +149,6 @@ files:
|
|
|
138
149
|
- spec/notification_spec.rb
|
|
139
150
|
- spec/rack_spec.rb
|
|
140
151
|
- spec/spec_helper.rb
|
|
141
|
-
has_rdoc: true
|
|
142
152
|
homepage: http://github.com/bugsnag/bugsnag-ruby
|
|
143
153
|
licenses:
|
|
144
154
|
- MIT
|
|
@@ -148,23 +158,27 @@ rdoc_options: []
|
|
|
148
158
|
require_paths:
|
|
149
159
|
- lib
|
|
150
160
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
161
|
+
none: false
|
|
151
162
|
requirements:
|
|
152
163
|
- - ">="
|
|
153
164
|
- !ruby/object:Gem::Version
|
|
165
|
+
hash: 3
|
|
154
166
|
segments:
|
|
155
167
|
- 0
|
|
156
168
|
version: "0"
|
|
157
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
|
+
none: false
|
|
158
171
|
requirements:
|
|
159
172
|
- - ">="
|
|
160
173
|
- !ruby/object:Gem::Version
|
|
174
|
+
hash: 3
|
|
161
175
|
segments:
|
|
162
176
|
- 0
|
|
163
177
|
version: "0"
|
|
164
178
|
requirements: []
|
|
165
179
|
|
|
166
180
|
rubyforge_project:
|
|
167
|
-
rubygems_version: 1.
|
|
181
|
+
rubygems_version: 1.8.24
|
|
168
182
|
signing_key:
|
|
169
183
|
specification_version: 3
|
|
170
184
|
summary: Ruby notifier for bugsnag.com
|