rollbar 3.5.0 → 3.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9833b30479b7f91305cdf3a4269e3f550d8a925aa50f13ccd374f9d6e3456dc6
4
- data.tar.gz: fcc7e9410c968844460052171bf0cbf62006d86f2ab0a71d81fd2a8af60d5599
3
+ metadata.gz: a0a67fdd109dbc4ad80b42d5fee83b86d4c238f173e36f21fcccd7824309bf4a
4
+ data.tar.gz: ddada3a7d29b64307fa73e45a430d43ae8ee470dae670e15b5994da69fddd601
5
5
  SHA512:
6
- metadata.gz: 8b1da82b43abeaef4e2b78937842ddca414279b6816e61ddd1861a32955c5a4436e625a8931da4151b3d77c645451f8aef18fd88c0e976928cf1939080e9c2a2
7
- data.tar.gz: d034b0a6f4e8eea5fef9e714ffa7492087f6c61dc442710eecd479b16cfda5d3522bf863abdec17aa2b7f3beb7a7981741bf0376d427d1b63861dce343b5ceea
6
+ metadata.gz: 682314257603690332897347973e469f72efe8d320480a906e2ea73da3f3a22dd37f5af254c329a0484cc7327d17caa24e69bf0b3381a2ebb73d4c22413a98ad
7
+ data.tar.gz: c7d766e933113335f15bc0622bfbf8183e41110531d3cc76ead5aa786f7be7ed19d472dd5855de56110970c4871519d3a2dc9067e5a4c25cdf02009f1303495f
@@ -1,35 +1,45 @@
1
- Rollbar.plugins.define('active_job') do
2
- dependency { !configuration.disable_monkey_patch }
3
- dependency { !configuration.disable_action_mailer_monkey_patch }
1
+ module Rollbar
2
+ # Report any uncaught errors in a job to Rollbar and reraise
3
+ module ActiveJob
4
+ def self.included(base)
5
+ base.send :rescue_from, Exception do |exception|
6
+ job_data = {
7
+ :job => self.class.name,
8
+ :use_exception_level_filters => true
9
+ }
4
10
 
5
- execute do
6
- module Rollbar
7
- # Report any uncaught errors in a job to Rollbar and reraise
8
- module ActiveJob
9
- def self.included(base)
10
- base.send :rescue_from, Exception do |exception|
11
- args = if self.class.respond_to?(:log_arguments?) && !self.class.log_arguments?
12
- arguments.map(&Rollbar::Scrubbers.method(:scrub_value))
13
- else
14
- arguments
15
- end
11
+ # When included in ActionMailer, the handler is called twice.
12
+ # This detects the execution that has the expected state.
13
+ if defined?(ActionMailer::Base) && self.class.ancestors.include?(ActionMailer::Base)
14
+ job_data[:action] = action_name
15
+ job_data[:params] = @params
16
16
 
17
- job_data = {
18
- :job => self.class.name,
19
- :use_exception_level_filters => true,
20
- :arguments => args
21
- }
17
+ Rollbar.error(exception, job_data)
22
18
 
23
- # job_id isn't present when this is a mailer class.
24
- job_data[:job_id] = job_id if defined?(job_id)
19
+ # This detects other supported integrations.
20
+ elsif defined?(arguments)
21
+ job_data[:arguments] = \
22
+ if self.class.respond_to?(:log_arguments?) && !self.class.log_arguments?
23
+ arguments.map(&Rollbar::Scrubbers.method(:scrub_value))
24
+ else
25
+ arguments
26
+ end
27
+ job_data[:job_id] = job_id if defined?(job_id)
25
28
 
26
- Rollbar.error(exception, job_data)
27
- raise exception
28
- end
29
+ Rollbar.error(exception, job_data)
29
30
  end
31
+
32
+ raise exception
30
33
  end
31
34
  end
35
+ end
36
+ end
37
+
38
+ Rollbar.plugins.define('active_job') do
39
+ dependency { !configuration.disable_monkey_patch }
40
+ dependency { !configuration.disable_action_mailer_monkey_patch }
32
41
 
42
+ execute do
33
43
  if defined?(ActiveSupport) && ActiveSupport.respond_to?(:on_load)
34
44
  ActiveSupport.on_load(:action_mailer) do
35
45
  if defined?(ActionMailer::MailDeliveryJob) # Rails >= 6.0
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = '3.5.0'.freeze
2
+ VERSION = '3.5.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rollbar, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-04 00:00:00.000000000 Z
11
+ date: 2024-02-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Track and debug errors in your Ruby applications with ease using Rollbar.
14
14
  With this gem, you can easily monitor and report on exceptions and other errors
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  requirements: []
163
- rubygems_version: 3.1.4
163
+ rubygems_version: 3.4.10
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Reports exceptions to Rollbar