sentry-rails 4.2.0 → 4.2.1

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: 88b2f50f7497ed668cc86fda80d8bbd653e3e01b3a7d3c3f7643e5de81de697c
4
- data.tar.gz: e2ee2b20c9a85f947f4fcfe4f5c68b82226336aa54c73b5c116e767307bb4cd0
3
+ metadata.gz: ab83fdc945ddfb3c5dbd4a38c34c8748acfc9745f5f9bbf39e47c188778760b6
4
+ data.tar.gz: 05ac3bde183e9615d292c2c978224b06567347c4b461cd8281d4f308d2b61bdc
5
5
  SHA512:
6
- metadata.gz: 1c86549b0348fec623ed863f9f11147d6cf04c20a7c8cd4ba96755959084f8d8436a8ee768edf5011230b7dfe62155aafcca7f1aaebf298a30d2dff1799c9310
7
- data.tar.gz: f6ee86657ef5960e22fe72c826b86ee0992a16769416429ab791821b2d974672ebe83d3c8fead135554ad2acdda6c0f59ad4a1c291d0ae3e6e7dc8d1584dfee4
6
+ metadata.gz: 28819d457892ae94280d5f6f5ec44e23eeec4d52f338b68ccc31ccd5f090b63a560eb9b72b626c1bb011288e9beb0e3762eb14229a6b689d8f957aaf7a0ea867
7
+ data.tar.gz: 2e095079c8ea3e1f8ad552bbe0c94a0a93a87c199832cb19de2beaa242cacea95383bca18529316133949f4ba807fe0b1898783a36db26aacca74eac8c0fcf79
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.2.1
4
+
5
+ - Add additional checks to SendEventJob's definition [#1275](https://github.com/getsentry/sentry-ruby/pull/1275)
6
+ - Fixes [#1270](https://github.com/getsentry/sentry-ruby/issues/1270)
7
+ - Fixes [#1277](https://github.com/getsentry/sentry-ruby/issues/1277)
8
+
3
9
  ## 4.2.0
4
10
 
5
11
  ### Features
data/Gemfile CHANGED
@@ -8,7 +8,12 @@ rails_version = "6.1.0" if rails_version.nil?
8
8
 
9
9
  gem 'activerecord-jdbcmysql-adapter', platform: :jruby
10
10
  gem "jdbc-sqlite3", platform: :jruby
11
- gem "sqlite3", platform: :ruby
11
+
12
+ if rails_version.to_f < 6
13
+ gem "sqlite3", "~> 1.3.0", platform: :ruby
14
+ else
15
+ gem "sqlite3", platform: :ruby
16
+ end
12
17
 
13
18
  gem "rails", "~> #{rails_version}"
14
19
  gem "sprockets-rails"
@@ -2,15 +2,25 @@ return unless defined?(ActiveJob)
2
2
 
3
3
  module Sentry
4
4
  parent_job =
5
- if defined?(ApplicationJob)
6
- ApplicationJob
5
+ if defined?(::ApplicationJob) && ::ApplicationJob.ancestors.include?(::ActiveJob::Base)
6
+ ::ApplicationJob
7
7
  else
8
- ActiveJob::Base
8
+ ::ActiveJob::Base
9
9
  end
10
10
 
11
11
  class SendEventJob < parent_job
12
- self.log_arguments = false if ::Rails.version.to_f >= 6.1
13
- discard_on ActiveJob::DeserializationError # this will prevent infinite loop when there's an issue deserializing SentryJob
12
+ # the event argument is usually large and creates noise
13
+ self.log_arguments = false if respond_to?(:log_arguments=)
14
+
15
+ # this will prevent infinite loop when there's an issue deserializing SentryJob
16
+ if respond_to?(:discard_on)
17
+ discard_on ActiveJob::DeserializationError
18
+ else
19
+ # mimic what discard_on does for Rails 5.0
20
+ rescue_from ActiveJob::DeserializationError do
21
+ logger.error "Discarded #{self.class} due to a #{exception}. The original exception was #{error.cause.inspect}."
22
+ end
23
+ end
14
24
 
15
25
  def perform(event, hint = {})
16
26
  Sentry.send_event(event, hint)
@@ -1,5 +1,5 @@
1
1
  module Sentry
2
2
  module Rails
3
- VERSION = "4.2.0"
3
+ VERSION = "4.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-04 00:00:00.000000000 Z
11
+ date: 2021-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails