bugsnag 6.26.4 → 6.27.0

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
  SHA256:
3
- metadata.gz: 0f5f206e7ff8559ae2b853a2600004877d41d36414ea82b1cce49c41940e34dc
4
- data.tar.gz: '08e3054a24b2c3928cd8e130a995525223989d09fdf1d0a5fdaefc71d460bbc0'
3
+ metadata.gz: f2c3cbc7d3aee2477dd5ae66758ea1b76bde5bfd156ce68b35a555de5d82638d
4
+ data.tar.gz: 5c093940afd91f221ff636beeea9cb16b855504ff9081a8c8eefee59ec30754c
5
5
  SHA512:
6
- metadata.gz: 785d927eeaf5c3c2d2af5c04b33295dee3ce172354da1434b245e0d706b29d04aa6261c9a55764d9b726e0d6e9f0cf1e4523925925bb5f7118b86954e391b1d9
7
- data.tar.gz: f11f3d9508cee3b65a4da040d681aa703710cc2e3718b40292daa5534d4ffdcb929334ef9640bca4901754379848d2bd42e8f63b9211b7eb5d2f758499b9d950
6
+ metadata.gz: de4dcfb6fc4688d52ea058d5f82ad31906abd2f54d65b4170646f0a7c06b69d4d39a3e0aee8a35a3dddde4e86a8529e7e425993e52b76f48299e0126f25ff48e
7
+ data.tar.gz: 4dbf3896e89cc1cab18928d54145034d0db68cfd41d9e362310f66235982151f2e9672a1df34cc024c294d0426c88a9a2a593d84c726fc7311a6b6ebb23026da
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
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
+
4
14
  ## v6.26.4 (25 March 2024)
5
15
 
6
16
  ### Fixes
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Bugsnag error monitoring & exception reporter for Ruby
2
- [![build status](https://travis-ci.com/bugsnag/bugsnag-ruby.svg?branch=master)](https://travis-ci.com/bugsnag/bugsnag-ruby)
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.26.4
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.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.26.4
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-03-25 00:00:00.000000000 Z
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.26.4/CHANGELOG.md
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'