rollbar 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/rollbar.rb +7 -8
- data/lib/rollbar/request_data_extractor.rb +2 -1
- data/lib/rollbar/version.rb +1 -1
- data/rollbar.gemspec +1 -0
- data/spec/rollbar/delayed_job_spec.rb +43 -0
- metadata +18 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a432f94f474059f9731e64f22f23963c4b3926e
|
4
|
+
data.tar.gz: 0ccbc7ed06b952be8139592dcc7e40ca8ff396be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 098d37ecd9ba8c011bc73fb23da48d90d19c70d123a455412ede696de8b22c369a76b3a80fb9d8874afc6c7ab3c2dadda2a205ad1b7e8430f3e68339d68b837d
|
7
|
+
data.tar.gz: ba67c227bd1f08f21943cfcfa58a043c0be64845d5e98b227456fac58caecb2713110322c1c10482d14ef2e490a12fcfaf7c2eb5b80c37a198211fd7e3460c72
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
**1.2.2**
|
4
|
+
- Fix issue with delayed_job and Rollbar.report_exception (bug introduced in 1.2.0). See [#145](https://github.com/rollbar/rollbar-gem/issues/145)
|
5
|
+
- Explicitly require 'rack' in request_data_extractor. See [#144](https://github.com/rollbar/rollbar-gem/pull/144)
|
6
|
+
|
3
7
|
**1.2.1**
|
4
8
|
- Revert change made as part of 1.2.0 where all procs in the payload would be evaluated. See [#143](https://github.com/rollbar/rollbar-gem/pull/143).
|
5
9
|
|
data/README.md
CHANGED
data/lib/rollbar.rb
CHANGED
@@ -733,31 +733,30 @@ module Rollbar
|
|
733
733
|
|
734
734
|
# Backwards compatibility methods
|
735
735
|
|
736
|
-
def report_exception(exception, request_data =
|
736
|
+
def report_exception(exception, request_data = nil, person_data = nil, level = 'error')
|
737
737
|
Kernel.warn('[DEPRECATION] Rollbar.report_exception has been deprecated, please use log() or one of the level functions')
|
738
738
|
|
739
739
|
scope = {}
|
740
|
-
scope[:request] = request_data if request_data
|
741
|
-
scope[:person] = person_data if person_data
|
740
|
+
scope[:request] = request_data if request_data
|
741
|
+
scope[:person] = person_data if person_data
|
742
742
|
|
743
743
|
Rollbar.scoped(scope) do
|
744
744
|
Rollbar.notifier.log(level, exception)
|
745
745
|
end
|
746
746
|
end
|
747
747
|
|
748
|
-
def report_message(message, level = 'info', extra_data =
|
748
|
+
def report_message(message, level = 'info', extra_data = nil)
|
749
749
|
Kernel.warn('[DEPRECATION] Rollbar.report_message has been deprecated, please use log() or one of the level functions')
|
750
750
|
|
751
751
|
Rollbar.notifier.log(level, message, extra_data)
|
752
752
|
end
|
753
753
|
|
754
|
-
def report_message_with_request(message, level = 'info', request_data =
|
754
|
+
def report_message_with_request(message, level = 'info', request_data = nil, person_data = nil, extra_data = nil)
|
755
755
|
Kernel.warn('[DEPRECATION] Rollbar.report_message_with_request has been deprecated, please use log() or one of the level functions')
|
756
756
|
|
757
757
|
scope = {}
|
758
|
-
scope[:request] = request_data if request_data
|
759
|
-
scope[:person] = person_data if person_data
|
760
|
-
|
758
|
+
scope[:request] = request_data if request_data
|
759
|
+
scope[:person] = person_data if person_data
|
761
760
|
|
762
761
|
Rollbar.scoped(:request => request_data, :person => person_data) do
|
763
762
|
Rollbar.notifier.log(level, message, extra_data)
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'multi_json'
|
2
|
+
require 'rack'
|
2
3
|
|
3
4
|
module Rollbar
|
4
5
|
module RequestDataExtractor
|
@@ -14,7 +15,7 @@ module Rollbar
|
|
14
15
|
end
|
15
16
|
|
16
17
|
def extract_request_data_from_rack(env)
|
17
|
-
rack_req = Rack::Request.new(env)
|
18
|
+
rack_req = ::Rack::Request.new(env)
|
18
19
|
|
19
20
|
sensitive_params = sensitive_params_list(env)
|
20
21
|
request_params = rollbar_filtered_params(sensitive_params, rollbar_request_params(env))
|
data/lib/rollbar/version.rb
CHANGED
data/rollbar.gemspec
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'delayed_job'
|
3
|
+
require 'rollbar/delayed_job'
|
4
|
+
|
5
|
+
describe Rollbar::Delayed do
|
6
|
+
class FailingJob
|
7
|
+
class TestException < Exception; end
|
8
|
+
|
9
|
+
def perform
|
10
|
+
fail(TestException, 'failing')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
module DummyBackend
|
15
|
+
class Job
|
16
|
+
include Delayed::Backend::Base
|
17
|
+
|
18
|
+
attr_accessor :handler, :attempts
|
19
|
+
|
20
|
+
def initialize(options = {})
|
21
|
+
@payload_object = options[:payload_object]
|
22
|
+
@attempts = 0
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
let(:logger) { Rollbar.logger }
|
28
|
+
|
29
|
+
before do
|
30
|
+
Rollbar::Delayed.wrap_worker
|
31
|
+
Delayed::Worker.delay_jobs = false
|
32
|
+
Delayed::Worker.backend = DummyBackend::Job
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'sends the exception' do
|
36
|
+
expect do
|
37
|
+
Delayed::Job.enqueue(FailingJob.new)
|
38
|
+
end.to raise_error(FailingJob::TestException)
|
39
|
+
|
40
|
+
last_report = Rollbar.last_report
|
41
|
+
expect(last_report[:request]).to be_kind_of(DummyBackend::Job)
|
42
|
+
end
|
43
|
+
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: 1.2.
|
4
|
+
version: 1.2.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: 2014-10-
|
11
|
+
date: 2014-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: delayed_job
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
description: Rails plugin to catch and send exceptions to Rollbar
|
154
168
|
email:
|
155
169
|
- support@rollbar.com
|
@@ -267,6 +281,7 @@ files:
|
|
267
281
|
- spec/rollbar/delay/girl_friday_spec.rb
|
268
282
|
- spec/rollbar/delay/resque_spec.rb
|
269
283
|
- spec/rollbar/delay/thread_spec.rb
|
284
|
+
- spec/rollbar/delayed_job_spec.rb
|
270
285
|
- spec/rollbar/logger_proxy_spec.rb
|
271
286
|
- spec/rollbar/middleware/rack/builder_spec.rb
|
272
287
|
- spec/rollbar/middleware/sinatra_spec.rb
|
@@ -358,6 +373,7 @@ test_files:
|
|
358
373
|
- spec/rollbar/delay/girl_friday_spec.rb
|
359
374
|
- spec/rollbar/delay/resque_spec.rb
|
360
375
|
- spec/rollbar/delay/thread_spec.rb
|
376
|
+
- spec/rollbar/delayed_job_spec.rb
|
361
377
|
- spec/rollbar/logger_proxy_spec.rb
|
362
378
|
- spec/rollbar/middleware/rack/builder_spec.rb
|
363
379
|
- spec/rollbar/middleware/sinatra_spec.rb
|