rollbar 2.6.0 → 2.6.1

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
  SHA1:
3
- metadata.gz: 94bfaab6020d2299a4f491bcaf08c1fb1e7ffaa7
4
- data.tar.gz: 37873db26e50016607aa5b03a7298da79fe112a4
3
+ metadata.gz: 9fcf3784b3933d22fda12776862079a51dc40d51
4
+ data.tar.gz: 63ad42beb99619d2543b386074d7f8e9b61486b1
5
5
  SHA512:
6
- metadata.gz: 6389ed78df71156fb8f44c22a9d2550d99e367988fede657a3ec58b83bd09781403e8f1d2571f657a7ec535bf1b2c1a12447fb9aace2f678c332d0e1d2fddeae
7
- data.tar.gz: 601cdc2a21f5a2e4ba23a157ed378058e3440cf4e72fea2d1d1b85631cbfa9d67ae0ece44157a732256eee9846ccc7c22cf692bb79fa9e5abadf9b5f36c77a55
6
+ metadata.gz: 9dd2b1859ad864c4c76af2fff36ed43671e4811e7c91bd6a7f251f86e207904d5d02f51efe222956ff9784523531b3cb40b8a35785b9af1395c97ea19aa3c638
7
+ data.tar.gz: 155d347bb7540525e3c17bcb773af226f60cae09806aa3aa2223c19493a049f09a7df091f05b28358cf38653e16d4fafb53f8816cdcf5ae1ab1ec2c2b0bf8b40
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.6.1
4
+
5
+ Bug fix:
6
+
7
+ - Don't skip delayed_job reports if attempts > dj_threshold. See [#340](https://github.com/rollbar/rollbar-gem/pull/340).
8
+
3
9
  ## 2.6.0
4
10
 
5
11
  Features
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.0)](https://travis-ci.org/rollbar/rollbar-gem/branches)
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.0'
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:
@@ -56,13 +56,17 @@ module Rollbar
56
56
  end
57
57
 
58
58
  def self.report(e, job)
59
- return unless job.attempts <= ::Rollbar.configuration.dj_threshold
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
 
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = "2.6.0"
2
+ VERSION = "2.6.1"
3
3
  end
@@ -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.0
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 00:00:00.000000000 Z
11
+ date: 2015-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails