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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a27c812bcbc48208ec5968eaae3a20ef863b43a
4
- data.tar.gz: f6d8171c122522d4f9f44caf1971fb0fa7e1fd94
3
+ metadata.gz: 8800f7b1709a4ea49c5bb9e3e34f700969f565ec
4
+ data.tar.gz: 5d30db66f500e836d98758c3583647c0be60c5d8
5
5
  SHA512:
6
- metadata.gz: ed6a83b65c5a09f55c5605c94adcc18d015bb9691f1ca608c5bb2c0d869ae2ac1f720b12fcb4c50df26fd8c316757c9f5914574ca98dd724f70e6ca30fddfdc0
7
- data.tar.gz: 776e79159576228d00a385c4650499da8e7ae7e5bda62e342f27eb94ec7f7b651335b9a477a29db0cda2634f456c35eb828fb81ea1ef5d1ed411bbb58cf77ecb
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)](https://travis-ci.org/rollbar/rollbar-gem/branches)
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, :job => self.class.name, :job_id => job_id)
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)
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = '2.13.1'.freeze
2
+ VERSION = '2.13.2'
3
3
  end
@@ -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 = { :job => "TestJob", :job_id => job_id }
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.1
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-21 00:00:00.000000000 Z
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.4.5
279
+ rubygems_version: 2.3.0
280
280
  signing_key:
281
281
  specification_version: 4
282
282
  summary: Reports exceptions to Rollbar