bugsnag 3.0.0 → 4.0.0
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/.travis.yml +5 -3
- data/CHANGELOG.md +16 -0
- data/README.md +2 -2
- data/VERSION +1 -1
- data/bugsnag.gemspec +4 -9
- data/docs/Configuration.md +3 -0
- data/docs/Notification Options.md +1 -1
- data/lib/bugsnag.rb +3 -0
- data/lib/bugsnag/capistrano.rb +1 -1
- data/lib/bugsnag/configuration.rb +1 -0
- data/lib/bugsnag/delivery/thread_queue.rb +1 -0
- data/lib/bugsnag/notification.rb +4 -1
- data/spec/notification_spec.rb +17 -0
- metadata +25 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ebe81525d5bc908bded68c8fe66f2148c827bf2
|
4
|
+
data.tar.gz: 5094f9cbca6d554b8ab8599dd8cf751824f39564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7893ddc4139330cddecddee79e8d25306385a2aa1d9d1e73d4d715af856aa03c9f534614b2747291136910df04fdab64416e15ef476bdec6b8b8b04363fc23e1
|
7
|
+
data.tar.gz: a48b1f8f0745b50ec99322f98d5fb7dd37f3df0b3b3fa46fb2e2894043a6afd484c1710ed346deb8f61461be9de1a293e4f67e83f4260fb3e30245f8799f36c1
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
## 4.0.0 (9 Mar 2016)
|
5
|
+
|
6
|
+
This release includes general fixes as well as removing support
|
7
|
+
for Ruby versions below 1.9.2.
|
8
|
+
|
9
|
+
### Fixes
|
10
|
+
|
11
|
+
* Fix deployment notification failure in Capistrano
|
12
|
+
| [Simon Maynard](https://github.com/snmaynard)
|
13
|
+
| [#275](https://github.com/bugsnag/bugsnag-ruby/pull/275)
|
14
|
+
|
15
|
+
* Fix Bad Request errors generated by large payloads
|
16
|
+
| [Simon Maynard](https://github.com/snmaynard)
|
17
|
+
| [#276](https://github.com/bugsnag/bugsnag-ruby/pull/276)
|
18
|
+
|
19
|
+
|
4
20
|
3.0.0 (23 Dec 2015)
|
5
21
|
-----
|
6
22
|
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ thrown from your **Rails**, **Sinatra**, **Rack** or **plain Ruby** app.
|
|
6
6
|
Any uncaught exceptions will trigger a notification to be sent to your
|
7
7
|
Bugsnag project.
|
8
8
|
|
9
|
-
[Bugsnag](http://bugsnag.com) captures errors in real-time from your web,
|
9
|
+
Capture Rails errors with Bugsnag's [Rails error monitoring](https://bugsnag.com/platforms/rails) solution. [Bugsnag](http://bugsnag.com) captures errors in real-time from your web,
|
10
10
|
mobile and desktop applications, helping you to understand and resolve them
|
11
11
|
as fast as possible. [Create a free account](http://bugsnag.com) to start
|
12
12
|
capturing exceptions from your applications.
|
@@ -188,7 +188,7 @@ If you would like to send non-fatal exceptions to Bugsnag, you can call
|
|
188
188
|
Bugsnag.notify(RuntimeError.new("Something broke"))
|
189
189
|
```
|
190
190
|
|
191
|
-
Additional data can be sent with exceptions as an options hash as detailed in the [Notification Options](docs/Notification Options.md) documentation, including some [options specific to non-fatal exceptions](docs/Notification Options.md#handled-notification-options).
|
191
|
+
Additional data can be sent with exceptions as an options hash as detailed in the [Notification Options](https://github.com/bugsnag/bugsnag-ruby/tree/master/docs/Notification Options.md) documentation, including some [options specific to non-fatal exceptions](https://github.com/bugsnag/bugsnag-ruby/tree/master/docs/Notification Options.md#handled-notification-options).
|
192
192
|
|
193
193
|
|
194
194
|
### Callbacks
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
4.0.0
|
data/bugsnag.gemspec
CHANGED
@@ -13,18 +13,13 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = `git ls-files`.split("\n").reject {|file| file.start_with? "example/"}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE.txt",
|
16
|
-
"README.md"
|
16
|
+
"README.md",
|
17
|
+
"CHANGELOG.md"
|
17
18
|
]
|
18
19
|
s.require_paths = ["lib"]
|
20
|
+
s.required_ruby_version = '>= 1.9.2'
|
19
21
|
|
20
|
-
s.
|
21
|
-
|
22
|
-
if RUBY_VERSION < "1.9"
|
23
|
-
s.add_development_dependency "rake", "~> 10.1.1"
|
24
|
-
else
|
25
|
-
s.add_development_dependency 'rake'
|
26
|
-
end
|
27
|
-
|
22
|
+
s.add_development_dependency 'rake', '~> 10.1.1'
|
28
23
|
s.add_development_dependency 'rspec'
|
29
24
|
s.add_development_dependency 'rdoc'
|
30
25
|
s.add_development_dependency 'pry'
|
data/docs/Configuration.md
CHANGED
@@ -140,6 +140,9 @@ By default, `params_filters` is set to `[/authorization/i, /cookie/i,
|
|
140
140
|
/password/i, /secret/i]`, and for rails apps, imports all values from
|
141
141
|
`Rails.configuration.filter_parameters`.
|
142
142
|
|
143
|
+
**Note:** Assigning (`=`) instead of appending (`+=`) to the default value will
|
144
|
+
remove the default protections.
|
145
|
+
|
143
146
|
<!-- Custom anchor for linking from alerts -->
|
144
147
|
<div id="set-project-root"></div>
|
145
148
|
### `project_root`
|
@@ -15,7 +15,7 @@ exceptions, to help debug problems.
|
|
15
15
|
|
16
16
|
## Notification Object
|
17
17
|
|
18
|
-
The notification object is passed to all [before bugsnag notify](#
|
18
|
+
The notification object is passed to all [before bugsnag notify](#framework-specific-configuration)
|
19
19
|
callbacks and is used to manipulate the error report before it is transmitted.
|
20
20
|
|
21
21
|
### Instance Methods
|
data/lib/bugsnag.rb
CHANGED
@@ -44,6 +44,8 @@ module Bugsnag
|
|
44
44
|
require "bugsnag/delay/resque" if configuration.delay_with_resque && defined?(Resque)
|
45
45
|
|
46
46
|
# Log that we are ready to rock
|
47
|
+
@logged_ready = false unless defined?(@logged_ready)
|
48
|
+
|
47
49
|
if configuration.api_key && !@logged_ready
|
48
50
|
log "Bugsnag exception handler #{VERSION} ready, api_key=#{configuration.api_key}"
|
49
51
|
@logged_ready = true
|
@@ -95,6 +97,7 @@ module Bugsnag
|
|
95
97
|
|
96
98
|
# Configuration getters
|
97
99
|
def configuration
|
100
|
+
@configuration = nil unless defined?(@configuration)
|
98
101
|
@configuration || LOCK.synchronize { @configuration ||= Bugsnag::Configuration.new }
|
99
102
|
end
|
100
103
|
|
data/lib/bugsnag/capistrano.rb
CHANGED
data/lib/bugsnag/notification.rb
CHANGED
@@ -41,7 +41,7 @@ module Bugsnag
|
|
41
41
|
# a minimal payload instead
|
42
42
|
payload_string = ::JSON.dump(payload)
|
43
43
|
if payload_string.length > 128000
|
44
|
-
payload[:events].
|
44
|
+
payload[:events] = payload[:events].map {|e| Bugsnag::Helpers.reduce_hash_size(e)}
|
45
45
|
payload_string = ::JSON.dump(payload)
|
46
46
|
end
|
47
47
|
|
@@ -56,6 +56,9 @@ module Bugsnag
|
|
56
56
|
@meta_data = {}
|
57
57
|
@user = {}
|
58
58
|
@should_ignore = false
|
59
|
+
@severity = nil
|
60
|
+
@grouping_hash = nil
|
61
|
+
@delivery_method = nil
|
59
62
|
|
60
63
|
self.severity = @overrides[:severity]
|
61
64
|
@overrides.delete :severity
|
data/spec/notification_spec.rb
CHANGED
@@ -272,6 +272,23 @@ describe Bugsnag::Notification do
|
|
272
272
|
}
|
273
273
|
end
|
274
274
|
|
275
|
+
it "truncates large messages before sending" do
|
276
|
+
Bugsnag.notify(BugsnagTestException.new(SecureRandom.hex(500_000)), {
|
277
|
+
:meta_data => {
|
278
|
+
:some_tab => {
|
279
|
+
:giant => SecureRandom.hex(500_000/2),
|
280
|
+
:mega => SecureRandom.hex(500_000/2)
|
281
|
+
}
|
282
|
+
}
|
283
|
+
})
|
284
|
+
|
285
|
+
expect(Bugsnag).to have_sent_notification{ |payload|
|
286
|
+
# Truncated body should be no bigger than
|
287
|
+
# 2 truncated hashes (4096*2) + rest of payload (20000)
|
288
|
+
expect(::JSON.dump(payload).length).to be < 4096*2 + 20000
|
289
|
+
}
|
290
|
+
end
|
291
|
+
|
275
292
|
it "accepts a severity in overrides" do
|
276
293
|
Bugsnag.notify(BugsnagTestException.new("It crashed"), {
|
277
294
|
:severity => "info"
|
metadata
CHANGED
@@ -1,117 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
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: 2016-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: json
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.7'
|
20
|
-
- - '>='
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.7.7
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.7'
|
30
|
-
- - '>='
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 1.7.7
|
33
13
|
- !ruby/object:Gem::Dependency
|
34
14
|
name: rake
|
35
15
|
requirement: !ruby/object:Gem::Requirement
|
36
16
|
requirements:
|
37
|
-
- -
|
17
|
+
- - "~>"
|
38
18
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
19
|
+
version: 10.1.1
|
40
20
|
type: :development
|
41
21
|
prerelease: false
|
42
22
|
version_requirements: !ruby/object:Gem::Requirement
|
43
23
|
requirements:
|
44
|
-
- -
|
24
|
+
- - "~>"
|
45
25
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
26
|
+
version: 10.1.1
|
47
27
|
- !ruby/object:Gem::Dependency
|
48
28
|
name: rspec
|
49
29
|
requirement: !ruby/object:Gem::Requirement
|
50
30
|
requirements:
|
51
|
-
- -
|
31
|
+
- - ">="
|
52
32
|
- !ruby/object:Gem::Version
|
53
33
|
version: '0'
|
54
34
|
type: :development
|
55
35
|
prerelease: false
|
56
36
|
version_requirements: !ruby/object:Gem::Requirement
|
57
37
|
requirements:
|
58
|
-
- -
|
38
|
+
- - ">="
|
59
39
|
- !ruby/object:Gem::Version
|
60
40
|
version: '0'
|
61
41
|
- !ruby/object:Gem::Dependency
|
62
42
|
name: rdoc
|
63
43
|
requirement: !ruby/object:Gem::Requirement
|
64
44
|
requirements:
|
65
|
-
- -
|
45
|
+
- - ">="
|
66
46
|
- !ruby/object:Gem::Version
|
67
47
|
version: '0'
|
68
48
|
type: :development
|
69
49
|
prerelease: false
|
70
50
|
version_requirements: !ruby/object:Gem::Requirement
|
71
51
|
requirements:
|
72
|
-
- -
|
52
|
+
- - ">="
|
73
53
|
- !ruby/object:Gem::Version
|
74
54
|
version: '0'
|
75
55
|
- !ruby/object:Gem::Dependency
|
76
56
|
name: pry
|
77
57
|
requirement: !ruby/object:Gem::Requirement
|
78
58
|
requirements:
|
79
|
-
- -
|
59
|
+
- - ">="
|
80
60
|
- !ruby/object:Gem::Version
|
81
61
|
version: '0'
|
82
62
|
type: :development
|
83
63
|
prerelease: false
|
84
64
|
version_requirements: !ruby/object:Gem::Requirement
|
85
65
|
requirements:
|
86
|
-
- -
|
66
|
+
- - ">="
|
87
67
|
- !ruby/object:Gem::Version
|
88
68
|
version: '0'
|
89
69
|
- !ruby/object:Gem::Dependency
|
90
70
|
name: addressable
|
91
71
|
requirement: !ruby/object:Gem::Requirement
|
92
72
|
requirements:
|
93
|
-
- - ~>
|
73
|
+
- - "~>"
|
94
74
|
- !ruby/object:Gem::Version
|
95
75
|
version: 2.3.8
|
96
76
|
type: :development
|
97
77
|
prerelease: false
|
98
78
|
version_requirements: !ruby/object:Gem::Requirement
|
99
79
|
requirements:
|
100
|
-
- - ~>
|
80
|
+
- - "~>"
|
101
81
|
- !ruby/object:Gem::Version
|
102
82
|
version: 2.3.8
|
103
83
|
- !ruby/object:Gem::Dependency
|
104
84
|
name: webmock
|
105
85
|
requirement: !ruby/object:Gem::Requirement
|
106
86
|
requirements:
|
107
|
-
- -
|
87
|
+
- - ">="
|
108
88
|
- !ruby/object:Gem::Version
|
109
89
|
version: '0'
|
110
90
|
type: :development
|
111
91
|
prerelease: false
|
112
92
|
version_requirements: !ruby/object:Gem::Requirement
|
113
93
|
requirements:
|
114
|
-
- -
|
94
|
+
- - ">="
|
115
95
|
- !ruby/object:Gem::Version
|
116
96
|
version: '0'
|
117
97
|
description: Ruby notifier for bugsnag.com
|
@@ -121,11 +101,12 @@ extensions: []
|
|
121
101
|
extra_rdoc_files:
|
122
102
|
- LICENSE.txt
|
123
103
|
- README.md
|
104
|
+
- CHANGELOG.md
|
124
105
|
files:
|
125
|
-
- .document
|
126
|
-
- .gitignore
|
127
|
-
- .rspec
|
128
|
-
- .travis.yml
|
106
|
+
- ".document"
|
107
|
+
- ".gitignore"
|
108
|
+
- ".rspec"
|
109
|
+
- ".travis.yml"
|
129
110
|
- CHANGELOG.md
|
130
111
|
- CONTRIBUTING.md
|
131
112
|
- Gemfile
|
@@ -200,17 +181,17 @@ require_paths:
|
|
200
181
|
- lib
|
201
182
|
required_ruby_version: !ruby/object:Gem::Requirement
|
202
183
|
requirements:
|
203
|
-
- -
|
184
|
+
- - ">="
|
204
185
|
- !ruby/object:Gem::Version
|
205
|
-
version:
|
186
|
+
version: 1.9.2
|
206
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
188
|
requirements:
|
208
|
-
- -
|
189
|
+
- - ">="
|
209
190
|
- !ruby/object:Gem::Version
|
210
191
|
version: '0'
|
211
192
|
requirements: []
|
212
193
|
rubyforge_project:
|
213
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.4.5
|
214
195
|
signing_key:
|
215
196
|
specification_version: 4
|
216
197
|
summary: Ruby notifier for bugsnag.com
|