rollbar 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +2 -2
- data/lib/rollbar/delayed_job.rb +5 -1
- data/lib/rollbar/version.rb +1 -1
- data/spec/rollbar/delayed_job_spec.rb +25 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fcf3784b3933d22fda12776862079a51dc40d51
|
4
|
+
data.tar.gz: 63ad42beb99619d2543b386074d7f8e9b61486b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dd2b1859ad864c4c76af2fff36ed43671e4811e7c91bd6a7f251f86e207904d5d02f51efe222956ff9784523531b3cb40b8a35785b9af1395c97ea19aa3c638
|
7
|
+
data.tar.gz: 155d347bb7540525e3c17bcb773af226f60cae09806aa3aa2223c19493a049f09a7df091f05b28358cf38653e16d4fafb53f8816cdcf5ae1ab1ec2c2b0bf8b40
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Rollbar notifier for Ruby [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v2.6.
|
1
|
+
# Rollbar notifier for Ruby [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v2.6.1)](https://travis-ci.org/rollbar/rollbar-gem/branches)
|
2
2
|
|
3
3
|
<!-- RemoveNext -->
|
4
4
|
[Rollbar](https://rollbar.com) is an error tracking service for Ruby and other languages. The Rollbar service will alert you of problems with your code and help you understand them in a ways never possible before. We love it and we hope you will too.
|
@@ -12,7 +12,7 @@ This is the Ruby library for Rollbar. It will instrument many kinds of Ruby appl
|
|
12
12
|
Add this line to your application's Gemfile:
|
13
13
|
|
14
14
|
```ruby
|
15
|
-
gem 'rollbar', '~> 2.6.
|
15
|
+
gem 'rollbar', '~> 2.6.1'
|
16
16
|
```
|
17
17
|
|
18
18
|
If you are not using JRuby we suggest using [Oj](https://github.com/ohler55/oj) for JSON serialization. In order to install Oj you can add this line to your Gemfile:
|
data/lib/rollbar/delayed_job.rb
CHANGED
@@ -56,13 +56,17 @@ module Rollbar
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def self.report(e, job)
|
59
|
-
return
|
59
|
+
return if skip_report?(job)
|
60
60
|
|
61
61
|
data = build_job_data(job)
|
62
62
|
|
63
63
|
::Rollbar.scope(:request => data).error(e, :use_exception_level_filters => true)
|
64
64
|
end
|
65
65
|
|
66
|
+
def self.skip_report?(job)
|
67
|
+
job.attempts < ::Rollbar.configuration.dj_threshold
|
68
|
+
end
|
69
|
+
|
66
70
|
def self.build_job_data(job)
|
67
71
|
return nil unless ::Rollbar.configuration.report_dj_data
|
68
72
|
|
data/lib/rollbar/version.rb
CHANGED
@@ -58,4 +58,29 @@ describe Rollbar::Delayed, :reconfigure_notifier => true do
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
61
|
+
|
62
|
+
describe '.skip_report' do
|
63
|
+
let(:configuration) { Rollbar.configuration }
|
64
|
+
let(:threshold) { 5 }
|
65
|
+
|
66
|
+
before do
|
67
|
+
allow(configuration).to receive(:dj_threshold).and_return(threshold)
|
68
|
+
end
|
69
|
+
|
70
|
+
context 'with attempts > configuration.dj_threshold' do
|
71
|
+
let(:job) { double(:attempts => 6) }
|
72
|
+
|
73
|
+
it 'returns true' do
|
74
|
+
expect(described_class.skip_report?(job)).to be(false)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
context 'with attempts < configuration.dj_threshold' do
|
79
|
+
let(:job) { double(:attempts => 3) }
|
80
|
+
|
81
|
+
it 'returns false' do
|
82
|
+
expect(described_class.skip_report?(job)).to be(true)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
61
86
|
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: 2.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rollbar, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|