rollbar 2.13.1 → 2.13.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 +11 -0
- data/README.md +15 -1
- data/lib/rollbar/plugins/active_job.rb +4 -1
- data/lib/rollbar/scrubbers/url.rb +1 -1
- data/lib/rollbar/version.rb +1 -1
- data/spec/rollbar/plugins/active_job_spec.rb +5 -1
- data/spec/rollbar/scrubbers/url_spec.rb +20 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8800f7b1709a4ea49c5bb9e3e34f700969f565ec
|
4
|
+
data.tar.gz: 5d30db66f500e836d98758c3583647c0be60c5d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f63851372ea962c2d438321bbeb19b9caab293ef9c0146a6a672eef6ba9a12c74d67a08679743edc5703a4edffb0bd97b0439e29bc0e9ca7a684f4ed1a08a25d
|
7
|
+
data.tar.gz: 0a8ec4b9c0b849ab53b040668d74cd7f527b5e4594076031e0ccbdbdca0c257307a8bab62d39bbeadadf0f8385d3a07c77cf3250e73d3734b44f4b377a6e096f
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,17 @@
|
|
4
4
|
|
5
5
|
Fixes:
|
6
6
|
|
7
|
+
- Fix URL scrubbing with spaces in the query. See [#532](https://github.com/rollbar/rollbar-gem/pull/532).
|
8
|
+
- Use :use_exception_level_filters in ActiveJob plugin. See [#533](https://github.com/rollbar/rollbar-gem/pull/533).
|
9
|
+
|
10
|
+
Other:
|
11
|
+
|
12
|
+
- Add docs for custom scrubbing with transform hook. See [#526](https://github.com/rollbar/rollbar-gem/pull/526).
|
13
|
+
|
14
|
+
## 2.13.1
|
15
|
+
|
16
|
+
Fixes:
|
17
|
+
|
7
18
|
- Inherit test controller from ActionController::Base
|
8
19
|
- Fix test rake task when Rack::MockRequest is not defined
|
9
20
|
- Fix docs for Sinatra middleware
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Rollbar [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v2.13.
|
1
|
+
# Rollbar [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v2.13.2)](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.
|
@@ -484,6 +484,20 @@ If you want to obfuscate the user IP reported to the Rollbar API you can configu
|
|
484
484
|
Rollbar.configuration.user_ip_obfuscator_secret = "a-private-secret-here"
|
485
485
|
```
|
486
486
|
|
487
|
+
The fields in `scrub_fields` will be used to scrub the values for the matching keys in the GET, POST, raw body and route params and also in cookies and session. If you want to customize better exactly which part of the request data is scrubbed you can use the [Transform hook](#transform-hook).
|
488
|
+
|
489
|
+
Example:
|
490
|
+
|
491
|
+
```
|
492
|
+
config.transform << proc do |options|
|
493
|
+
data = options[:payload]['data']
|
494
|
+
data[:request][:session][:key] = Rollbar::Scrubbers.scrub_value(data[:request][:session][:key])
|
495
|
+
end
|
496
|
+
```
|
497
|
+
|
498
|
+
In the previous example we are scrubbing the `key` value inside the session data.
|
499
|
+
|
500
|
+
|
487
501
|
## Including additional runtime data
|
488
502
|
|
489
503
|
You can provide a callable that will be called for each exception or message report. ```custom_data_method``` should be a lambda that takes no arguments and returns a hash.
|
@@ -3,7 +3,10 @@ module Rollbar
|
|
3
3
|
module ActiveJob
|
4
4
|
def self.included(base)
|
5
5
|
base.send :rescue_from, Exception do |exception|
|
6
|
-
Rollbar.error(exception,
|
6
|
+
Rollbar.error(exception,
|
7
|
+
:job => self.class.name,
|
8
|
+
:job_id => job_id,
|
9
|
+
:use_exception_level_filters => true)
|
7
10
|
raise exception
|
8
11
|
end
|
9
12
|
end
|
@@ -60,7 +60,7 @@ module Rollbar
|
|
60
60
|
encoded_query = encode_www_form(filter_query_params(params, regex, randomize_scrub_length))
|
61
61
|
|
62
62
|
# We want this to rebuild array params like foo[]=1&foo[]=2
|
63
|
-
CGI.unescape(encoded_query)
|
63
|
+
URI.escape(CGI.unescape(encoded_query))
|
64
64
|
end
|
65
65
|
|
66
66
|
def decode_www_form(query)
|
data/lib/rollbar/version.rb
CHANGED
@@ -23,7 +23,11 @@ describe Rollbar::ActiveJob do
|
|
23
23
|
let(:job_id) { "123" }
|
24
24
|
|
25
25
|
it "reports the error to Rollbar" do
|
26
|
-
expected_params = {
|
26
|
+
expected_params = {
|
27
|
+
:job => "TestJob",
|
28
|
+
:job_id => job_id,
|
29
|
+
:use_exception_level_filters => true
|
30
|
+
}
|
27
31
|
expect(Rollbar).to receive(:error).with(exception, expected_params)
|
28
32
|
TestJob.new.perform(exception, job_id) rescue nil
|
29
33
|
end
|
@@ -111,6 +111,26 @@ describe Rollbar::Scrubbers::URL do
|
|
111
111
|
expect(subject.call(options)).to be_eql(url)
|
112
112
|
end
|
113
113
|
end
|
114
|
+
|
115
|
+
context 'with URL with spaces and arrays' do
|
116
|
+
let(:url) do
|
117
|
+
'https://server.com/api/v1/assignments/4430038?user_id=1&assignable_id=2&starts_at=Wed%20Jul%2013%202016%2000%3A00%3A00%20GMT-0700%20(PDT)&ends_at=Fri%20Jul%2029%202016%2000%3A00%3A00%20GMT-0700%20(PDT)&allocation_mode=hours_per_day&percent=&fixed_hours=&hours_per_day=0&auth=REMOVED&___uidh=2228207862&password[]=mypassword'
|
118
|
+
end
|
119
|
+
let(:options) do
|
120
|
+
{
|
121
|
+
:url => url,
|
122
|
+
:scrub_fields => [:passwd, :password, :password_confirmation, :secret, :confirm_password, :secret_token, :api_key, :access_token, :auth, :SAMLResponse, :password, :auth],
|
123
|
+
:scrub_user => true,
|
124
|
+
:scrub_password => true,
|
125
|
+
:randomize_scrub_length => true
|
126
|
+
}
|
127
|
+
end
|
128
|
+
|
129
|
+
it 'doesnt logs error' do
|
130
|
+
expect(Rollbar.logger).not_to receive(:error).and_call_original
|
131
|
+
subject.call(options)
|
132
|
+
end
|
133
|
+
end
|
114
134
|
end
|
115
135
|
end
|
116
136
|
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.13.
|
4
|
+
version: 2.13.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: 2016-09-
|
11
|
+
date: 2016-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
276
|
version: '0'
|
277
277
|
requirements: []
|
278
278
|
rubyforge_project:
|
279
|
-
rubygems_version: 2.
|
279
|
+
rubygems_version: 2.3.0
|
280
280
|
signing_key:
|
281
281
|
specification_version: 4
|
282
282
|
summary: Reports exceptions to Rollbar
|