rollbar 2.19.3 → 2.21.0

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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -0
  3. data/.travis.yml +42 -16
  4. data/Gemfile +31 -14
  5. data/data/rollbar.snippet.js +1 -1
  6. data/docs/configuration.md +9 -0
  7. data/gemfiles/rails30.gemfile +8 -10
  8. data/gemfiles/rails31.gemfile +8 -9
  9. data/gemfiles/rails32.gemfile +8 -9
  10. data/gemfiles/rails40.gemfile +8 -9
  11. data/gemfiles/rails41.gemfile +8 -9
  12. data/gemfiles/rails42.gemfile +8 -11
  13. data/gemfiles/rails50.gemfile +13 -12
  14. data/gemfiles/rails51.gemfile +13 -12
  15. data/gemfiles/rails52.gemfile +13 -12
  16. data/gemfiles/rails60.gemfile +67 -0
  17. data/lib/rails/rollbar_runner.rb +1 -1
  18. data/lib/rollbar/configuration.rb +11 -1
  19. data/lib/rollbar/item.rb +15 -6
  20. data/lib/rollbar/json.rb +2 -51
  21. data/lib/rollbar/language_support.rb +3 -19
  22. data/lib/rollbar/logger_proxy.rb +5 -1
  23. data/lib/rollbar/notifier.rb +23 -10
  24. data/lib/rollbar/plugins/basic_socket.rb +1 -1
  25. data/lib/rollbar/rake_tasks.rb +3 -147
  26. data/lib/rollbar/request_data_extractor.rb +3 -2
  27. data/lib/rollbar/rollbar_test.rb +147 -0
  28. data/lib/rollbar/scrubbers/params.rb +2 -2
  29. data/lib/rollbar/scrubbers/url.rb +0 -1
  30. data/lib/rollbar/truncation.rb +9 -2
  31. data/lib/rollbar/truncation/min_body_strategy.rb +2 -3
  32. data/lib/rollbar/truncation/remove_any_key_strategy.rb +123 -0
  33. data/lib/rollbar/truncation/remove_extra_strategy.rb +35 -0
  34. data/lib/rollbar/truncation/remove_request_strategy.rb +21 -0
  35. data/lib/rollbar/truncation/strings_strategy.rb +2 -3
  36. data/lib/rollbar/util.rb +2 -2
  37. data/lib/rollbar/util/hash.rb +15 -0
  38. data/lib/rollbar/version.rb +1 -1
  39. data/rollbar.gemspec +0 -2
  40. metadata +10 -21
  41. data/gemfiles/ruby_1_8_and_1_9_2.gemfile +0 -51
  42. data/lib/rollbar/json/default.rb +0 -11
  43. data/lib/rollbar/json/oj.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5503cff74b3885c82665a6d7ce5c491be89ba4a66e5176547dbe2249ab1be90b
4
- data.tar.gz: 6cfe51c21ab4bc1ce799b1550f8d2096ed68ac608f41b35fbee170a91d208fd4
3
+ metadata.gz: b238c5e9208112f61a5b731fff4f6743b310d693568220e75e2c50191f2445b9
4
+ data.tar.gz: c374dda5d39adaae28d4503be35ed2e2035c2454af036ff20014d7e021b19e8f
5
5
  SHA512:
6
- metadata.gz: 63d85d9a87c65605f692ace193e8b1d2da282f73dfb834f38840929cb4d85354212ed0fd9b3d387c31ef8a60a7bf77ec273072b03ac4da645b7c07d118e270a3
7
- data.tar.gz: d7f0973b1f0e6b07fe7f51c08e16e82e35966c575d806c696d40c6b4671786d700d1e121fba63662ccdbddbbf014b3c4fe44af34c1462050c9a8b35cd36aea29
6
+ metadata.gz: 6db3b292b970bf003274851c9adc017c173ab7774320d8f3b9430ee580dc588035fc718b633c07349a4ac1070b1ff0f42b3786ccb44218241cb9b35e659b703b
7
+ data.tar.gz: b2a3b923c55971b410da65d2ff073b7318e1a42f4ac5c7facae240f076ada135902769fcaad557d95bf4514546cf8304adc1a5e5d6e1ffae85e5f87d45196513
data/.rubocop.yml CHANGED
@@ -61,3 +61,8 @@ Style/CaseEquality:
61
61
  # or a string and `str1 =~ str2` isn't valid. Whoever enables this cop should carefully
62
62
  # review and test each of these.
63
63
  Enabled: false
64
+
65
+ Style/FrozenStringLiteralComment:
66
+ # If we do this, it will be in its own PR. It requires adding these magic comments
67
+ # throughout the project, in order to prepare for a future Ruby 3.x.
68
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  sudo: false
2
+ dist: trusty
2
3
  services:
3
4
  - redis-server
4
5
  language: ruby
@@ -14,13 +15,15 @@ rvm:
14
15
  - 2.0.0
15
16
  - 2.1.0
16
17
  - 2.2.2
17
- - 2.3.0
18
18
  - 2.3.8
19
19
  - 2.4.5
20
20
  - 2.5.3
21
21
  - 2.6.0
22
+ - 2.6.3
22
23
  - rbx
23
- - jruby-9.1.9.0
24
+ # Travis's own rvm installer is failing on JRuby builds, TODO: reenable when fixed.
25
+ # - jruby-9.1.9.0
26
+
24
27
  #
25
28
  # # About legacy JRuby
26
29
  #
@@ -53,8 +56,6 @@ jdk:
53
56
  - openjdk8
54
57
  - oraclejdk8
55
58
  - oraclejdk9
56
- env:
57
- - ROLLBAR_SSL_CERT_FILE=/home/travis/build/rollbar/rollbar-gem/spec/cacert.pem
58
59
  gemfile:
59
60
  - gemfiles/rails30.gemfile
60
61
  - gemfiles/rails31.gemfile
@@ -65,6 +66,7 @@ gemfile:
65
66
  - gemfiles/rails50.gemfile
66
67
  - gemfiles/rails51.gemfile
67
68
  - gemfiles/rails52.gemfile
69
+ - gemfiles/rails60.gemfile
68
70
  matrix:
69
71
  include: []
70
72
 
@@ -73,6 +75,7 @@ matrix:
73
75
  - rvm: jruby-head
74
76
  # Ruby 2.6.x is still being eveluated and may have test failures
75
77
  - rvm: 2.6.0
78
+ - rvm: 2.6.3
76
79
  # oraclejdk9 has a dependency issue that needs to be investigated
77
80
  - jdk: oraclejdk9
78
81
 
@@ -103,12 +106,6 @@ matrix:
103
106
  jdk: oraclejdk8
104
107
  - rvm: 2.2.2
105
108
  jdk: oraclejdk9
106
- - rvm: 2.3.0
107
- jdk: openjdk8
108
- - rvm: 2.3.0
109
- jdk: oraclejdk8
110
- - rvm: 2.3.0
111
- jdk: oraclejdk9
112
109
  - rvm: 2.3.8
113
110
  jdk: openjdk8
114
111
  - rvm: 2.3.8
@@ -133,6 +130,12 @@ matrix:
133
130
  jdk: oraclejdk8
134
131
  - rvm: 2.6.0
135
132
  jdk: oraclejdk9
133
+ - rvm: 2.6.3
134
+ jdk: openjdk8
135
+ - rvm: 2.6.3
136
+ jdk: oraclejdk8
137
+ - rvm: 2.6.3
138
+ jdk: oraclejdk9
136
139
 
137
140
  - rvm: ruby-head
138
141
  jdk: openjdk8
@@ -147,6 +150,13 @@ matrix:
147
150
  - rvm: rbx
148
151
  jdk: oraclejdk9
149
152
 
153
+ # Rails 6.x requires Ruby 2.5.0 or higher
154
+ - rvm: 2.2.2
155
+ gemfile: gemfiles/rails60.gemfile
156
+ - rvm: 2.3.8
157
+ gemfile: gemfiles/rails60.gemfile
158
+ - rvm: 2.4.5
159
+ gemfile: gemfiles/rails60.gemfile
150
160
  # Rails 5.x requires Ruby 2.2.2 or higher
151
161
  - rvm: 1.9.3
152
162
  gemfile: gemfiles/rails50.gemfile
@@ -154,6 +164,8 @@ matrix:
154
164
  gemfile: gemfiles/rails51.gemfile
155
165
  - rvm: 1.9.3
156
166
  gemfile: gemfiles/rails52.gemfile
167
+ - rvm: 1.9.3
168
+ gemfile: gemfiles/rails60.gemfile
157
169
  # Rails 5.x requires Ruby 2.2.2 or higher
158
170
  - rvm: 2.0.0
159
171
  gemfile: gemfiles/rails50.gemfile
@@ -161,6 +173,8 @@ matrix:
161
173
  gemfile: gemfiles/rails51.gemfile
162
174
  - rvm: 2.0.0
163
175
  gemfile: gemfiles/rails52.gemfile
176
+ - rvm: 2.0.0
177
+ gemfile: gemfiles/rails60.gemfile
164
178
  # Rails 5.x requires Ruby 2.2.2 or higher
165
179
  - rvm: 2.1.0
166
180
  gemfile: gemfiles/rails50.gemfile
@@ -168,18 +182,14 @@ matrix:
168
182
  gemfile: gemfiles/rails51.gemfile
169
183
  - rvm: 2.1.0
170
184
  gemfile: gemfiles/rails52.gemfile
185
+ - rvm: 2.1.0
186
+ gemfile: gemfiles/rails60.gemfile
171
187
  # MRI 2.2.2 supports Rails 3.2.x and higher
172
188
  - rvm: 2.2.2
173
189
  gemfile: gemfiles/rails30.gemfile
174
190
  - rvm: 2.2.2
175
191
  gemfile: gemfiles/rails31.gemfile
176
192
  # MRI 2.3.x supports Rails 4.0.x and higher
177
- - rvm: 2.3.0
178
- gemfile: gemfiles/rails30.gemfile
179
- - rvm: 2.3.0
180
- gemfile: gemfiles/rails31.gemfile
181
- - rvm: 2.3.0
182
- gemfile: gemfiles/rails32.gemfile
183
193
  - rvm: 2.3.8
184
194
  gemfile: gemfiles/rails30.gemfile
185
195
  - rvm: 2.3.8
@@ -222,6 +232,20 @@ matrix:
222
232
  gemfile: gemfiles/rails40.gemfile
223
233
  - rvm: 2.6.0
224
234
  gemfile: gemfiles/rails41.gemfile
235
+ - rvm: 2.6.0
236
+ gemfile: gemfiles/rails42.gemfile
237
+ - rvm: 2.6.3
238
+ gemfile: gemfiles/rails30.gemfile
239
+ - rvm: 2.6.3
240
+ gemfile: gemfiles/rails31.gemfile
241
+ - rvm: 2.6.3
242
+ gemfile: gemfiles/rails32.gemfile
243
+ - rvm: 2.6.3
244
+ gemfile: gemfiles/rails40.gemfile
245
+ - rvm: 2.6.3
246
+ gemfile: gemfiles/rails41.gemfile
247
+ - rvm: 2.6.3
248
+ gemfile: gemfiles/rails42.gemfile
225
249
  # JRuby JDBC Adapter is only compatible with Rails >= 5.x
226
250
  - rvm: jruby-9.1.9.0
227
251
  gemfile: gemfiles/rails30.gemfile
@@ -253,3 +277,5 @@ matrix:
253
277
  gemfile: gemfiles/rails51.gemfile
254
278
  - rvm: rbx
255
279
  gemfile: gemfiles/rails52.gemfile
280
+ - rvm: rbx
281
+ gemfile: gemfiles/rails60.gemfile
data/Gemfile CHANGED
@@ -2,27 +2,36 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ # Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
6
+ # new process is created during tests. (Testing rake tasks, for example.)
7
+ # This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
8
+ # We use the ||= assignment because Travis loads the gemfile twice, the second time
9
+ # with the wrong gemfile path.
10
+ ENV['CURRENT_GEMFILE'] ||= __FILE__
11
+
5
12
  is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
6
13
 
14
+ GEMFILE_RAILS_VERSION = '5.2.2'.freeze
15
+
7
16
  gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
8
17
  gem 'appraisal'
9
18
  gem 'jruby-openssl', :platform => :jruby
10
- gem 'rails', '4.2.8'
19
+ gem 'rails', GEMFILE_RAILS_VERSION
11
20
  gem 'rake'
12
- gem 'rspec-rails', '~> 3.4'
13
- gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
21
+ if GEMFILE_RAILS_VERSION < '6.0'
22
+ gem 'rspec-rails', '~> 3.4'
23
+ else
24
+ # TODO: update this when 4.x becomes available on Rubygems
25
+ gem 'rspec-rails', :git => 'https://github.com/rspec/rspec-rails', :ref => 'v4.0.0.beta2' # rubocop:disable Bundler/DuplicatedGem
26
+ end
14
27
 
15
- unless is_jruby
16
- if RUBY_VERSION >= '2.5'
17
- gem 'oj'
18
- elsif RUBY_VERSION >= '2.4.0'
19
- gem 'oj', '~> 2.16.1' # rubocop:disable Bundler/DuplicatedGem
20
- else
21
- gem 'oj', '~> 2.12.14' # rubocop:disable Bundler/DuplicatedGem
22
- end
28
+ if GEMFILE_RAILS_VERSION < '6.0'
29
+ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
30
+ else
31
+ gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw] # rubocop:disable Bundler/DuplicatedGem
23
32
  end
24
33
 
25
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
34
+ if RUBY_VERSION < '2.2.2'
26
35
  gem 'sidekiq', '~> 2.13.0'
27
36
  else
28
37
  gem 'sidekiq', '>= 2.13.0' # rubocop:disable Bundler/DuplicatedGem
@@ -47,14 +56,22 @@ elsif RUBY_VERSION.start_with?('2')
47
56
  gem 'sucker_punch', '~> 2.0' # rubocop:disable Bundler/DuplicatedGem
48
57
  end
49
58
 
59
+ unless is_jruby
60
+ # JRuby doesn't support fork, which is required for this test helper.
61
+ gem 'rspec-command'
62
+ end
63
+
50
64
  gem 'aws-sdk-sqs'
51
65
  gem 'database_cleaner'
52
- gem 'delayed_job', :require => false
66
+ if GEMFILE_RAILS_VERSION < '6.0'
67
+ gem 'delayed_job', :require => false
68
+ else
69
+ gem 'delayed_job', '~> 4.1', :require => false # rubocop:disable Bundler/DuplicatedGem
70
+ end
53
71
  gem 'generator_spec'
54
72
  gem 'girl_friday', '>= 0.11.1'
55
73
  gem 'redis'
56
74
  gem 'resque', '< 2.0.0'
57
- gem 'rspec-command'
58
75
  gem 'rubocop', :require => false
59
76
  gem 'sinatra'
60
77
  gem 'webmock', :require => false
@@ -1 +1 @@
1
- !function(r){function o(n){if(e[n])return e[n].exports;var t=e[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var e={};return o.m=r,o.c=e,o.p="",o(0)}([function(r,o,e){"use strict";var n=e(1),t=e(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.5.4/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,o,e){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,o){this.options=r,this._rollbarOldOnError=null;var e=s++;this.shimId=function(){return e},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[e]={handler:o,messages:[]})}function a(r,o){if(r){var e=o.globalAlias||"Rollbar";if("object"==typeof r[e])return r[e];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(o);return n(function(){o.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),o.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=o.autoInstrument;return o.enabled!==!1&&(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[e]=t,t})()}}function l(r){return n(function(){var o=this,e=Array.prototype.slice.call(arguments,0),n={shim:o,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=e(2),s=0,d=e(3),c=function(r,o){return new t(r,o)},p=function(r){return new d(c,r)};t.prototype.loadFull=function(r,o,e,t,a){var l=function(){var o;if(void 0===r._rollbarDidLoad){o=new Error("rollbar.js did not load");for(var e,n,t,l,i=0;e=r._rollbarShims[i++];)for(e=e.messages||[];n=e.shift();)for(t=n.args||[],i=0;i<t.length;++i)if(l=t[i],"function"==typeof l){l(o);break}}"function"==typeof a&&a(o)},i=!1,s=o.createElement("script"),d=o.getElementsByTagName("script")[0],c=d.parentNode;s.crossOrigin="",s.src=t.rollbarJsUrl,e||(s.async=!0),s.onload=s.onreadystatechange=n(function(){if(!(i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){s.onload=s.onreadystatechange=null;try{c.removeChild(s)}catch(r){}i=!0,l()}}),c.insertBefore(s,d)},t.prototype.wrap=function(r,o,e){try{var n;if(n="function"==typeof o?o:function(){return o||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){e&&"function"==typeof e&&e.apply(this,arguments);try{return r.apply(this,arguments)}catch(e){var o=e;throw o&&("string"==typeof o&&(o=new String(o)),o._rollbarContext=n()||{},o._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=o),o}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(o){return r}};for(var u="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad".split(","),f=0;f<u.length;++f)t.prototype[u[f]]=l(u[f]);r.exports={setupShim:a,Rollbar:p}},function(r,o){"use strict";function e(r,o,e){if(r){var t;if("function"==typeof o._rollbarOldOnError)t=o._rollbarOldOnError;else if(r.onerror){for(t=r.onerror;t._rollbarOldOnError;)t=t._rollbarOldOnError;o._rollbarOldOnError=t}var a=function(){var e=Array.prototype.slice.call(arguments,0);n(r,o,t,e)};e&&(a._rollbarOldOnError=t),r.onerror=a}}function n(r,o,e,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null),o.handleUncaughtException.apply(o,n),e&&e.apply(r,n)}function t(r,o,e){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var e,n,t;try{e=r.reason}catch(r){e=void 0}try{n=r.promise}catch(r){n="[unhandledrejection] error getting `promise` from event"}try{t=r.detail,!e&&t&&(e=t.reason,n=t.promise)}catch(r){}e||(e="[unhandledrejection] error getting `reason` from event"),o&&o.handleUnhandledRejection&&o.handleUnhandledRejection(e,n)};n.belongsToShim=e,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}}function a(r,o,e){if(r){var n,t,a="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(n=0;n<a.length;++n)t=a[n],r[t]&&r[t].prototype&&l(o,r[t].prototype,e)}}function l(r,o,e){if(o.hasOwnProperty&&o.hasOwnProperty("addEventListener")){for(var n=o.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(o,e,t){n.call(this,o,r.wrap(e),t)};t._rollbarOldAdd=n,t.belongsToShim=e,o.addEventListener=t;for(var a=o.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,o,e){a.call(this,r,o&&o._rollbar_wrapped||o,e)};l._rollbarOldRemove=a,l.belongsToShim=e,o.removeEventListener=l}}r.exports={captureUncaughtExceptions:e,captureUnhandledRejections:t,wrapGlobals:a}},function(r,o){"use strict";function e(r,o){this.impl=r(o,this),this.options=o,n(e.prototype)}function n(r){for(var o=function(r){return function(){var o=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,o)}},e="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad".split(","),n=0;n<e.length;n++)r[e[n]]=o(e[n])}e.prototype._swapAndProcessMessages=function(r,o){this.impl=r(this.options);for(var e,n,t;e=o.shift();)n=e.method,t=e.args,this[n]&&"function"==typeof this[n]&&("captureDomContentLoaded"===n||"captureLoad"===n?this[n].apply(this,[t[0],e.ts]):this[n].apply(this,t));return this},r.exports=e},function(r,o){"use strict";r.exports=function(r){return function(o){if(!o&&!window._rollbarInitialized){r=r||{};for(var e,n,t=r.globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;e=window._rollbarShims[i++];)n||(n=e.handler),e.handler._swapAndProcessMessages(l,e.messages);window[t]=n,window._rollbarInitialized=!0}}}}]);
1
+ !function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){var n=o(1),t=o(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.8.1/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){var n=o(2);function t(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var a=0;function l(r,e){this.options=r,this._rollbarOldOnError=null;var o=a++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var i=o(3),d=function(r,e){return new l(r,e)},s=function(r){return new i(d,r)};function c(r){return t(function(){var e=Array.prototype.slice.call(arguments,0),o={shim:this,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(o)})}l.prototype.loadFull=function(r,e,o,n,a){var l=!1,i=e.createElement("script"),d=e.getElementsByTagName("script")[0],s=d.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=t(function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{s.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,t,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(t=n.args||[],i=0;i<t.length;++i)if("function"==typeof(l=t[i])){l(e);break}}"function"==typeof a&&a(e)}()}}),s.insertBefore(i,d)},l.prototype.wrap=function(r,e,o){try{var n;if(n="function"==typeof e?e:function(){return e||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){o&&"function"==typeof o&&o.apply(this,arguments);try{return r.apply(this,arguments)}catch(o){var e=o;throw e&&("string"==typeof e&&(e=new String(e)),e._rollbarContext=n()||{},e._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=e),e}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(e){return r}};for(var p="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad".split(","),u=0;u<p.length;++u)l.prototype[p[u]]=c(p[u]);r.exports={setupShim:function(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var a=new s(e);return t(function(){e.captureUncaught&&(a._rollbarOldOnError=r.onerror,n.captureUncaughtExceptions(r,a,!0),n.wrapGlobals(r,a,!0)),e.captureUnhandledRejections&&n.captureUnhandledRejections(r,a,!0);var t=e.autoInstrument;return!1!==e.enabled&&(void 0===t||!0===t||"object"==typeof t&&t.network)&&r.addEventListener&&(r.addEventListener("load",a.captureLoad.bind(a)),r.addEventListener("DOMContentLoaded",a.captureDomContentLoaded.bind(a))),r[o]=a,a})()}},Rollbar:s}},function(r,e){function o(r,e,o){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(e,o,t){n.call(this,e,r.wrap(o),t)};t._rollbarOldAdd=n,t.belongsToShim=o,e.addEventListener=t;for(var a=e.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,e,o){a.call(this,r,e&&e._rollbar_wrapped||e,o)};l._rollbarOldRemove=a,l.belongsToShim=o,e.removeEventListener=l}}r.exports={captureUncaughtExceptions:function(r,e,o){if(r){var n;if("function"==typeof e._rollbarOldOnError)n=e._rollbarOldOnError;else if(r.onerror){for(n=r.onerror;n._rollbarOldOnError;)n=n._rollbarOldOnError;e._rollbarOldOnError=n}e.handleAnonymousErrors();var t=function(){var o=Array.prototype.slice.call(arguments,0);!function(r,e,o,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null),e.handleUncaughtException.apply(e,n),o&&o.apply(r,n)}(r,e,n,o)};o&&(t._rollbarOldOnError=n),r.onerror=t}},captureUnhandledRejections:function(r,e,o){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var o,n,t;try{o=r.reason}catch(r){o=void 0}try{n=r.promise}catch(r){n="[unhandledrejection] error getting `promise` from event"}try{t=r.detail,!o&&t&&(o=t.reason,n=t.promise)}catch(r){}o||(o="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(o,n)};n.belongsToShim=o,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}},wrapGlobals:function(r,e,n){if(r){var t,a,l="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(t=0;t<l.length;++t)r[a=l[t]]&&r[a].prototype&&o(e,r[a].prototype,n)}}}},function(r,e){function o(r,e){this.impl=r(e,this),this.options=e,function(r){for(var e=function(r){return function(){var e=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,e)}},o="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad".split(","),n=0;n<o.length;n++)r[o[n]]=e(o[n])}(o.prototype)}o.prototype._swapAndProcessMessages=function(r,e){var o,n,t;for(this.impl=r(this.options);o=e.shift();)n=o.method,t=o.args,this[n]&&"function"==typeof this[n]&&("captureDomContentLoaded"===n||"captureLoad"===n?this[n].apply(this,[t[0],o.ts]):this[n].apply(this,t));return this},r.exports=o},function(r,e){r.exports=function(r){return function(e){if(!e&&!window._rollbarInitialized){for(var o,n,t=(r=r||{}).globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;o=window._rollbarShims[i++];)n||(n=o.handler),o.handler._swapAndProcessMessages(l,o.messages);window[t]=n,window._rollbarInitialized=!0}}}}]);
@@ -242,6 +242,15 @@ Fields to scrub out of the parsed request data. Will scrub from `GET`, `POST`,
242
242
  url, and several other locations. Does not currently recurse into the full
243
243
  payload.
244
244
 
245
+ If set to `[:scrub_all]` it will scrub all fields. It will not scrub anything
246
+ that is in the scrub_whitelist configuration array even if :scrub_all is true.
247
+
248
+ ### scrub_whitelist
249
+
250
+ Set the list of fields to be whitelisted when `scrub_fields` is set to `[:scrub_all]`.
251
+
252
+ Supports regex entries for partial matching e.g. `[:foo, /\A.+_id\z/, :bar]`
253
+
245
254
  ### scrub_user
246
255
 
247
256
  **Default** `true`
@@ -2,6 +2,13 @@ require 'rubygems/version'
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ # Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
6
+ # new process is created during tests. (Testing rake tasks, for example.)
7
+ # This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
8
+ # We use the ||= assignment because Travis loads the gemfile twice, the second time
9
+ # with the wrong gemfile path.
10
+ ENV['CURRENT_GEMFILE'] ||= __FILE__
11
+
5
12
  is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
6
13
 
7
14
  gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
@@ -12,17 +19,8 @@ gem 'rails', '3.0.20'
12
19
  gem 'hitimes', '< 1.2.2'
13
20
  gem 'rake', '< 11'
14
21
  gem 'rspec-rails', '>= 2.14.0'
15
- gem 'celluloid', '< 0.17.0' if RUBY_VERSION == '1.9.2'
16
-
17
- unless is_jruby
18
- if RUBY_VERSION >= '2.4.0'
19
- gem 'oj', '~> 2.16.1'
20
- else
21
- gem 'oj', '~> 2.12.14'
22
- end
23
- end
24
22
 
25
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
23
+ if RUBY_VERSION < '2.2.2'
26
24
  gem 'sidekiq', '~> 2.13.0'
27
25
  else
28
26
  gem 'sidekiq', '>= 2.13.0'
@@ -2,6 +2,13 @@ require 'rubygems/version'
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ # Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
6
+ # new process is created during tests. (Testing rake tasks, for example.)
7
+ # This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
8
+ # We use the ||= assignment because Travis loads the gemfile twice, the second time
9
+ # with the wrong gemfile path.
10
+ ENV['CURRENT_GEMFILE'] ||= __FILE__
11
+
5
12
  is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
6
13
 
7
14
  gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
@@ -12,15 +19,7 @@ gem 'rails', '3.1.12'
12
19
  gem 'rspec-rails', '~> 3.4'
13
20
  gem 'rake'
14
21
 
15
- unless is_jruby
16
- if RUBY_VERSION >= '2.4.0'
17
- gem 'oj', '~> 2.16.1'
18
- else
19
- gem 'oj', '~> 2.12.14'
20
- end
21
- end
22
-
23
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
22
+ if RUBY_VERSION < '2.2.2'
24
23
  gem 'sidekiq', '~> 2.13.0'
25
24
  else
26
25
  gem 'sidekiq', '>= 2.13.0'
@@ -2,6 +2,13 @@ require 'rubygems/version'
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ # Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
6
+ # new process is created during tests. (Testing rake tasks, for example.)
7
+ # This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
8
+ # We use the ||= assignment because Travis loads the gemfile twice, the second time
9
+ # with the wrong gemfile path.
10
+ ENV['CURRENT_GEMFILE'] ||= __FILE__
11
+
5
12
  is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
6
13
 
7
14
  gem 'appraisal'
@@ -14,15 +21,7 @@ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
14
21
  # Please see https://github.com/rspec/rspec-rails/issues/1273
15
22
  gem 'test-unit'
16
23
 
17
- unless is_jruby
18
- if RUBY_VERSION >= '2.4.0'
19
- gem 'oj', '~> 2.16.1'
20
- else
21
- gem 'oj', '~> 2.12.14'
22
- end
23
- end
24
-
25
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
24
+ if RUBY_VERSION < '2.2.2'
26
25
  gem 'sidekiq', '~> 2.13.0'
27
26
  else
28
27
  gem 'sidekiq', '>= 2.13.0'
@@ -2,6 +2,13 @@ require 'rubygems/version'
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ # Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
6
+ # new process is created during tests. (Testing rake tasks, for example.)
7
+ # This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
8
+ # We use the ||= assignment because Travis loads the gemfile twice, the second time
9
+ # with the wrong gemfile path.
10
+ ENV['CURRENT_GEMFILE'] ||= __FILE__
11
+
5
12
  is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
6
13
 
7
14
  gem 'appraisal'
@@ -14,15 +21,7 @@ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
14
21
  # Please see https://github.com/rspec/rspec-rails/issues/1273
15
22
  gem 'test-unit'
16
23
 
17
- unless is_jruby
18
- if RUBY_VERSION >= '2.4.0'
19
- gem 'oj', '~> 2.16.1'
20
- else
21
- gem 'oj', '~> 2.12.14'
22
- end
23
- end
24
-
25
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
24
+ if RUBY_VERSION < '2.2.2'
26
25
  gem 'sidekiq', '~> 2.13.0'
27
26
  else
28
27
  gem 'sidekiq', '>= 2.13.0'
@@ -2,6 +2,13 @@ require 'rubygems/version'
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ # Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
6
+ # new process is created during tests. (Testing rake tasks, for example.)
7
+ # This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
8
+ # We use the ||= assignment because Travis loads the gemfile twice, the second time
9
+ # with the wrong gemfile path.
10
+ ENV['CURRENT_GEMFILE'] ||= __FILE__
11
+
5
12
  is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
6
13
 
7
14
  gem 'appraisal'
@@ -12,15 +19,7 @@ gem 'rake'
12
19
  gem 'rspec-rails', '~> 3.4'
13
20
  gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
14
21
 
15
- unless is_jruby
16
- if RUBY_VERSION >= '2.4.0'
17
- gem 'oj', '~> 2.16.1'
18
- else
19
- gem 'oj', '~> 2.12.14'
20
- end
21
- end
22
-
23
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
22
+ if RUBY_VERSION < '2.2.2'
24
23
  gem 'sidekiq', '~> 2.13.0'
25
24
  else
26
25
  gem 'sidekiq', '>= 2.13.0'
@@ -2,6 +2,13 @@ require 'rubygems/version'
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ # Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
6
+ # new process is created during tests. (Testing rake tasks, for example.)
7
+ # This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
8
+ # We use the ||= assignment because Travis loads the gemfile twice, the second time
9
+ # with the wrong gemfile path.
10
+ ENV['CURRENT_GEMFILE'] ||= __FILE__
11
+
5
12
  is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
6
13
  is_not_jruby = !is_jruby
7
14
 
@@ -20,17 +27,7 @@ platforms :rbx do
20
27
  gem 'rubysl', '~> 2.0' unless RUBY_VERSION.start_with?('1')
21
28
  end
22
29
 
23
- unless is_jruby
24
- if RUBY_VERSION >= '2.5'
25
- gem 'oj'
26
- elsif RUBY_VERSION >= '2.4.0'
27
- gem 'oj', '~> 2.16.1'
28
- else
29
- gem 'oj', '~> 2.12.14'
30
- end
31
- end
32
-
33
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
30
+ if RUBY_VERSION < '2.2.2'
34
31
  gem 'sidekiq', '~> 2.13.0'
35
32
  else
36
33
  gem 'sidekiq', '>= 2.13.0'