bugsnag 6.26.3 → 6.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +1 -2
- data/VERSION +1 -1
- data/lib/bugsnag/configuration.rb +14 -0
- data/lib/bugsnag/middleware/warden_user.rb +3 -0
- data/lib/bugsnag/report.rb +8 -1
- data/lib/bugsnag/stacktrace.rb +1 -1
- data/lib/bugsnag.rb +14 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2c3cbc7d3aee2477dd5ae66758ea1b76bde5bfd156ce68b35a555de5d82638d
|
4
|
+
data.tar.gz: 5c093940afd91f221ff636beeea9cb16b855504ff9081a8c8eefee59ec30754c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de4dcfb6fc4688d52ea058d5f82ad31906abd2f54d65b4170646f0a7c06b69d4d39a3e0aee8a35a3dddde4e86a8529e7e425993e52b76f48299e0126f25ff48e
|
7
|
+
data.tar.gz: 4dbf3896e89cc1cab18928d54145034d0db68cfd41d9e362310f66235982151f2e9672a1df34cc024c294d0426c88a9a2a593d84c726fc7311a6b6ebb23026da
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,30 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
## v6.27.0 (23 May 2024)
|
5
|
+
|
6
|
+
### Enhancements
|
7
|
+
|
8
|
+
* Include the Warden scope in user metadata
|
9
|
+
| [#821](https://github.com/bugsnag/bugsnag-ruby/pull/821)
|
10
|
+
| [javierjulio](https://github.com/javierjulio)
|
11
|
+
* Add a block variant of `add_on_error`
|
12
|
+
| [#824](https://github.com/bugsnag/bugsnag-ruby/pull/824)
|
13
|
+
|
14
|
+
## v6.26.4 (25 March 2024)
|
15
|
+
|
16
|
+
### Fixes
|
17
|
+
|
18
|
+
* Fix Unicode encoding issues when using `Exception#detailed_message` (Ruby 3.2+)
|
19
|
+
| [#817](https://github.com/bugsnag/bugsnag-ruby/pull/817)
|
20
|
+
* Fix compatibility with Ruby 3.4-dev
|
21
|
+
| [#815](https://github.com/bugsnag/bugsnag-ruby/pull/815)
|
22
|
+
| [k0kubun](https://github.com/k0kubun)
|
23
|
+
|
4
24
|
## v6.26.3 (24 January 2024)
|
5
25
|
|
26
|
+
### Fixes
|
27
|
+
|
6
28
|
* Handle mailto links in `Cleaner#clean_url`
|
7
29
|
| [#813](https://github.com/bugsnag/bugsnag-ruby/pull/813)
|
8
30
|
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Bugsnag error monitoring & exception reporter for Ruby
|
2
|
-
[![build status](https://
|
2
|
+
[![build status](https://github.com/bugsnag/bugsnag-ruby/actions/workflows/test-package.yml/badge.svg)](https://github.com/bugsnag/bugsnag-ruby/actions/workflows/test-package.yml?query=branch%3Amaster)
|
3
3
|
|
4
4
|
|
5
5
|
The Bugsnag exception reporter for Ruby gives you instant notification of exceptions thrown from your **[Rails](https://www.bugsnag.com/platforms/rails)**, **Sinatra**, **Rack** or **plain Ruby** app. Any uncaught exceptions will trigger a notification to be sent to your Bugsnag project.
|
@@ -22,7 +22,6 @@ The Bugsnag exception reporter for Ruby gives you instant notification of except
|
|
22
22
|
* [Rake](https://docs.bugsnag.com/platforms/ruby/rake)
|
23
23
|
* [Sidekiq](https://docs.bugsnag.com/platforms/ruby/sidekiq)
|
24
24
|
* [Other Ruby apps](https://docs.bugsnag.com/platforms/ruby/other)
|
25
|
-
* For [EventMachine](https://rubyeventmachine.com) integration, see [`bugsnag-em`](https://github.com/bugsnag/bugsnag-em)
|
26
25
|
3. Relax!
|
27
26
|
|
28
27
|
## Support
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.27.0
|
@@ -569,6 +569,20 @@ module Bugsnag
|
|
569
569
|
@enable_sessions = false
|
570
570
|
end
|
571
571
|
|
572
|
+
##
|
573
|
+
# Add the given block to the list of on_error callbacks
|
574
|
+
#
|
575
|
+
# The on_error callbacks will be called when an error is captured or reported
|
576
|
+
# and are passed a {Bugsnag::Report} object
|
577
|
+
#
|
578
|
+
# Returning false from an on_error callback will cause the error to be ignored
|
579
|
+
# and will prevent any remaining callbacks from being called
|
580
|
+
#
|
581
|
+
# @return [void]
|
582
|
+
def on_error(&block)
|
583
|
+
middleware.use(block)
|
584
|
+
end
|
585
|
+
|
572
586
|
##
|
573
587
|
# Add the given callback to the list of on_error callbacks
|
574
588
|
#
|
@@ -23,7 +23,10 @@ module Bugsnag::Middleware
|
|
23
23
|
# Extract useful user information
|
24
24
|
user = {}
|
25
25
|
user_object = env["warden"].user({:scope => best_scope, :run_callbacks => false}) rescue nil
|
26
|
+
|
26
27
|
if user_object
|
28
|
+
user[:warden_scope] = best_scope
|
29
|
+
|
27
30
|
# Build the user info for this scope
|
28
31
|
COMMON_USER_FIELDS.each do |field|
|
29
32
|
user[field] = user_object.send(field) if user_object.respond_to?(field)
|
data/lib/bugsnag/report.rb
CHANGED
@@ -466,8 +466,15 @@ module Bugsnag
|
|
466
466
|
exception.detailed_message
|
467
467
|
end
|
468
468
|
|
469
|
+
# the string returned by 'detailed_message' defaults to 'ASCII_8BIT' but
|
470
|
+
# is actually UTF-8 encoded; we can't convert the encoding normally as its
|
471
|
+
# internal encoding doesn't match its actual encoding
|
472
|
+
message.force_encoding(::Encoding::UTF_8) if message.encoding == ::Encoding::ASCII_8BIT
|
473
|
+
|
469
474
|
# remove the class name to be consistent with Exception#message
|
470
|
-
message.sub(" (#{class_name})",
|
475
|
+
message.sub!(" (#{class_name})".encode(message.encoding), "") rescue nil
|
476
|
+
|
477
|
+
message
|
471
478
|
end
|
472
479
|
|
473
480
|
def generate_raw_exceptions(exception)
|
data/lib/bugsnag/stacktrace.rb
CHANGED
@@ -3,7 +3,7 @@ require_relative 'code_extractor'
|
|
3
3
|
module Bugsnag
|
4
4
|
module Stacktrace
|
5
5
|
# e.g. "org/jruby/RubyKernel.java:1264:in `catch'"
|
6
|
-
BACKTRACE_LINE_REGEX = /^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in `([^']+)')?$/
|
6
|
+
BACKTRACE_LINE_REGEX = /^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in [`']([^']+)')?$/
|
7
7
|
|
8
8
|
# e.g. "org.jruby.Ruby.runScript(Ruby.java:807)"
|
9
9
|
JAVA_BACKTRACE_REGEX = /^(.*)\((.*)(?::([0-9]+))?\)$/
|
data/lib/bugsnag.rb
CHANGED
@@ -309,6 +309,20 @@ module Bugsnag
|
|
309
309
|
configuration.breadcrumbs << breadcrumb unless breadcrumb.ignore?
|
310
310
|
end
|
311
311
|
|
312
|
+
##
|
313
|
+
# Add the given block to the list of on_error callbacks
|
314
|
+
#
|
315
|
+
# The on_error callbacks will be called when an error is captured or reported
|
316
|
+
# and are passed a {Bugsnag::Report} object
|
317
|
+
#
|
318
|
+
# Returning false from an on_error callback will cause the error to be ignored
|
319
|
+
# and will prevent any remaining callbacks from being called
|
320
|
+
#
|
321
|
+
# @return [void]
|
322
|
+
def on_error(&block)
|
323
|
+
configuration.on_error(&block)
|
324
|
+
end
|
325
|
+
|
312
326
|
##
|
313
327
|
# Add the given callback to the list of on_error callbacks
|
314
328
|
#
|
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.
|
4
|
+
version: 6.27.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: 2024-
|
11
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -107,7 +107,7 @@ homepage: https://github.com/bugsnag/bugsnag-ruby
|
|
107
107
|
licenses:
|
108
108
|
- MIT
|
109
109
|
metadata:
|
110
|
-
changelog_uri: https://github.com/bugsnag/bugsnag-ruby/blob/v6.
|
110
|
+
changelog_uri: https://github.com/bugsnag/bugsnag-ruby/blob/v6.27.0/CHANGELOG.md
|
111
111
|
documentation_uri: https://docs.bugsnag.com/platforms/ruby/
|
112
112
|
source_code_uri: https://github.com/bugsnag/bugsnag-ruby/
|
113
113
|
rubygems_mfa_required: 'true'
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
rubygems_version: 3.
|
129
|
+
rubygems_version: 3.4.10
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Ruby notifier for bugsnag.com
|