airbrake 9.3.0 → 9.4.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
  SHA1:
3
- metadata.gz: f0a71f9f79da2a5989445a300bebe3d9025df839
4
- data.tar.gz: 177632611970f6791ed686d3344df1eef7923010
3
+ metadata.gz: 6231106842eab5861b73b11301a7fa14858cf7da
4
+ data.tar.gz: 4441123b54f2c50fff4c014eb90b2da35046bbbe
5
5
  SHA512:
6
- metadata.gz: 978eef94355d7bc09429086301983dfabb87426e7c54d0bb2044ef19ebcf3c39c1fae79f9e2954e718013ce7071c13a16005294b9ce48c47ff4e7fbf1aba2719
7
- data.tar.gz: c1006e0378f3f3b195362a9ca172359a3e131eae8de3e31cbaa017be6b7a8dc43dc58e3bb2ec4ca88b28cebab9f38bd9518a4b8a2f8e19c30340760c732124fa
6
+ metadata.gz: d598e73a591a249bae78ef19d790787b25379ded02bc42e8f7e85099eb8c96946caa44c74d44691697393e61c37c1cecb2ead27f41184b7639750787c06d1253
7
+ data.tar.gz: 936f8650bcb5cbacf86b29e5782341b08225faac7cda727a3dbe01a10dffff76e824033e6a8bdbf79f9f6a5227ccb297b8e22acf2e5b2ea517ae45e84945f942
@@ -13,6 +13,10 @@ module Airbrake
13
13
  DEFAULT_MAX_RETRY_ATTEMPTS = ::Sidekiq::JobRetry::DEFAULT_MAX_RETRY_ATTEMPTS
14
14
  end
15
15
 
16
+ def initialize(max_retries: nil)
17
+ @max_retries = max_retries
18
+ end
19
+
16
20
  def call(notice)
17
21
  job = notice[:params][:job]
18
22
 
@@ -30,7 +34,9 @@ module Airbrake
30
34
  end
31
35
 
32
36
  def max_attempts_for(job)
33
- if job['retry'].is_a?(Integer)
37
+ if @max_retries
38
+ @max_retries
39
+ elsif job['retry'].is_a?(Integer)
34
40
  job['retry']
35
41
  else
36
42
  max_retries
@@ -1,5 +1,5 @@
1
1
  # We use Semantic Versioning v2.0.0
2
2
  # More information: http://semver.org/
3
3
  module Airbrake
4
- AIRBRAKE_VERSION = '9.3.0'.freeze
4
+ AIRBRAKE_VERSION = '9.4.0'.freeze
5
5
  end
@@ -33,7 +33,15 @@ Airbrake.configure do |c|
33
33
  # By default, Airbrake Ruby outputs to STDOUT. In Rails apps it makes sense to
34
34
  # use the Rails' logger.
35
35
  # https://github.com/airbrake/airbrake-ruby#logger
36
- c.logger = Rails.logger
36
+ c.logger =
37
+ if ENV['RAILS_LOG_TO_STDOUT'].present?
38
+ Logger.new(STDOUT, level: Rails.logger.level)
39
+ else
40
+ Logger.new(
41
+ Rails.root.join('log', 'airbrake.log'),
42
+ level: Rails.logger.level
43
+ )
44
+ end
37
45
 
38
46
  # Configures the environment the application is running in. Helps the Airbrake
39
47
  # dashboard to distinguish between exceptions occurring in different
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airbrake
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.3.0
4
+ version: 9.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airbrake Technologies, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: airbrake-ruby
@@ -393,7 +393,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
393
393
  version: '0'
394
394
  requirements: []
395
395
  rubyforge_project:
396
- rubygems_version: 2.6.13
396
+ rubygems_version: 2.6.14.4
397
397
  signing_key:
398
398
  specification_version: 4
399
399
  summary: Airbrake is an online tool that provides robust exception tracking in any