rollbar 2.16.2 → 2.22.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +47 -0
  3. data/.travis.yml +182 -94
  4. data/Appraisals +10 -10
  5. data/Gemfile +45 -13
  6. data/README.md +20 -3
  7. data/Rakefile +0 -0
  8. data/data/rollbar.snippet.js +1 -1
  9. data/docs/configuration.md +15 -0
  10. data/gemfiles/rails30.gemfile +21 -14
  11. data/gemfiles/rails31.gemfile +21 -12
  12. data/gemfiles/rails32.gemfile +18 -8
  13. data/gemfiles/rails40.gemfile +18 -6
  14. data/gemfiles/rails41.gemfile +17 -6
  15. data/gemfiles/rails42.gemfile +24 -14
  16. data/gemfiles/rails50.gemfile +20 -11
  17. data/gemfiles/rails51.gemfile +20 -10
  18. data/gemfiles/rails52.gemfile +65 -0
  19. data/gemfiles/rails60.gemfile +67 -0
  20. data/lib/generators/rollbar/rollbar_generator.rb +1 -1
  21. data/lib/rails/rollbar_runner.rb +17 -2
  22. data/lib/rollbar.rb +2 -3
  23. data/lib/rollbar/capistrano.rb +71 -39
  24. data/lib/rollbar/capistrano3.rb +56 -1
  25. data/lib/rollbar/capistrano_tasks.rb +130 -0
  26. data/lib/rollbar/configuration.rb +95 -7
  27. data/lib/rollbar/delay/active_job.rb +17 -0
  28. data/lib/rollbar/delay/girl_friday.rb +2 -2
  29. data/lib/rollbar/delay/resque.rb +4 -6
  30. data/lib/rollbar/delay/shoryuken.rb +15 -9
  31. data/lib/rollbar/delay/sidekiq.rb +6 -8
  32. data/lib/rollbar/delay/sucker_punch.rb +17 -19
  33. data/lib/rollbar/delay/thread.rb +3 -3
  34. data/lib/rollbar/deploy.rb +90 -0
  35. data/lib/rollbar/encoding/encoder.rb +9 -9
  36. data/lib/rollbar/exception_reporter.rb +19 -5
  37. data/lib/rollbar/item.rb +62 -20
  38. data/lib/rollbar/item/backtrace.rb +4 -4
  39. data/lib/rollbar/item/frame.rb +7 -1
  40. data/lib/rollbar/item/locals.rb +56 -0
  41. data/lib/rollbar/json.rb +5 -51
  42. data/lib/rollbar/language_support.rb +4 -20
  43. data/lib/rollbar/lazy_store.rb +5 -5
  44. data/lib/rollbar/logger.rb +1 -0
  45. data/lib/rollbar/logger_proxy.rb +15 -2
  46. data/lib/rollbar/middleware/js.rb +110 -10
  47. data/lib/rollbar/middleware/js/json_value.rb +26 -0
  48. data/lib/rollbar/middleware/rack.rb +4 -1
  49. data/lib/rollbar/middleware/rails/rollbar.rb +10 -1
  50. data/lib/rollbar/notifier.rb +118 -49
  51. data/lib/rollbar/notifier/trace_with_bindings.rb +65 -0
  52. data/lib/rollbar/plugin.rb +54 -6
  53. data/lib/rollbar/plugins.rb +7 -1
  54. data/lib/rollbar/plugins/active_job.rb +5 -1
  55. data/lib/rollbar/plugins/basic_socket.rb +21 -6
  56. data/lib/rollbar/plugins/delayed_job/job_data.rb +3 -3
  57. data/lib/rollbar/plugins/delayed_job/plugin.rb +3 -3
  58. data/lib/rollbar/plugins/goalie.rb +11 -3
  59. data/lib/rollbar/plugins/rails/controller_methods.rb +17 -4
  60. data/lib/rollbar/plugins/rails/railtie_mixin.rb +7 -3
  61. data/lib/rollbar/plugins/rake.rb +2 -2
  62. data/lib/rollbar/plugins/sidekiq/plugin.rb +10 -6
  63. data/lib/rollbar/rake_tasks.rb +3 -86
  64. data/lib/rollbar/request_data_extractor.rb +35 -21
  65. data/lib/rollbar/rollbar_test.rb +147 -0
  66. data/lib/rollbar/scrubbers.rb +7 -3
  67. data/lib/rollbar/scrubbers/params.rb +38 -20
  68. data/lib/rollbar/scrubbers/url.rb +27 -13
  69. data/lib/rollbar/truncation.rb +9 -2
  70. data/lib/rollbar/truncation/min_body_strategy.rb +2 -3
  71. data/lib/rollbar/truncation/remove_any_key_strategy.rb +123 -0
  72. data/lib/rollbar/truncation/remove_extra_strategy.rb +35 -0
  73. data/lib/rollbar/truncation/remove_request_strategy.rb +21 -0
  74. data/lib/rollbar/truncation/strings_strategy.rb +3 -4
  75. data/lib/rollbar/util.rb +75 -45
  76. data/lib/rollbar/util/hash.rb +30 -6
  77. data/lib/rollbar/util/ip_anonymizer.rb +8 -7
  78. data/lib/rollbar/util/ip_obfuscator.rb +1 -1
  79. data/lib/rollbar/version.rb +1 -1
  80. data/lib/tasks/benchmark.rake +103 -0
  81. data/rollbar.gemspec +14 -8
  82. metadata +25 -277
  83. data/gemfiles/ruby_1_8_and_1_9_2.gemfile +0 -49
  84. data/lib/rollbar/json/default.rb +0 -11
  85. data/lib/rollbar/json/oj.rb +0 -16
  86. data/lib/rollbar/tasks/rollbar.cap +0 -47
  87. data/spec/cacert.pem +0 -3988
  88. data/spec/controllers/home_controller_spec.rb +0 -480
  89. data/spec/delay/sidekiq_spec.rb +0 -61
  90. data/spec/delay/sucker_punch_spec.rb +0 -25
  91. data/spec/delayed/backend/test.rb +0 -140
  92. data/spec/delayed/serialization/test.rb +0 -0
  93. data/spec/dummyapp/.gitignore +0 -73
  94. data/spec/dummyapp/Rakefile +0 -7
  95. data/spec/dummyapp/app/assets/javascripts/application.js +0 -3
  96. data/spec/dummyapp/app/assets/stylesheets/application.css.scss +0 -37
  97. data/spec/dummyapp/app/controllers/application_controller.rb +0 -3
  98. data/spec/dummyapp/app/controllers/home_controller.rb +0 -60
  99. data/spec/dummyapp/app/controllers/users_controller.rb +0 -17
  100. data/spec/dummyapp/app/helpers/.gitkeep +0 -0
  101. data/spec/dummyapp/app/mailers/.gitkeep +0 -0
  102. data/spec/dummyapp/app/models/.gitkeep +0 -0
  103. data/spec/dummyapp/app/models/book.rb +0 -5
  104. data/spec/dummyapp/app/models/post.rb +0 -9
  105. data/spec/dummyapp/app/models/user.rb +0 -9
  106. data/spec/dummyapp/app/views/devise/registrations/edit.html.erb +0 -27
  107. data/spec/dummyapp/app/views/devise/registrations/new.html.erb +0 -20
  108. data/spec/dummyapp/app/views/devise/shared/_links.html.erb +0 -25
  109. data/spec/dummyapp/app/views/home/cause_exception.html.erb +0 -1
  110. data/spec/dummyapp/app/views/home/index.html.erb +0 -4
  111. data/spec/dummyapp/app/views/home/report_exception.html.erb +0 -1
  112. data/spec/dummyapp/app/views/js/test.html.erb +0 -1
  113. data/spec/dummyapp/app/views/layouts/_messages.html.erb +0 -5
  114. data/spec/dummyapp/app/views/layouts/_navigation.html.erb +0 -21
  115. data/spec/dummyapp/app/views/layouts/application.html.erb +0 -25
  116. data/spec/dummyapp/app/views/layouts/simple.html.erb +0 -18
  117. data/spec/dummyapp/app/views/users/index.html.erb +0 -8
  118. data/spec/dummyapp/app/views/users/show.html.erb +0 -3
  119. data/spec/dummyapp/config.ru +0 -4
  120. data/spec/dummyapp/config/application.rb +0 -59
  121. data/spec/dummyapp/config/boot.rb +0 -10
  122. data/spec/dummyapp/config/database.yml +0 -25
  123. data/spec/dummyapp/config/environment.rb +0 -5
  124. data/spec/dummyapp/config/environments/development.rb +0 -37
  125. data/spec/dummyapp/config/environments/production.rb +0 -67
  126. data/spec/dummyapp/config/environments/test.rb +0 -37
  127. data/spec/dummyapp/config/initializers/backtrace_silencers.rb +0 -7
  128. data/spec/dummyapp/config/initializers/inflections.rb +0 -15
  129. data/spec/dummyapp/config/initializers/mime_types.rb +0 -5
  130. data/spec/dummyapp/config/initializers/rollbar.rb +0 -26
  131. data/spec/dummyapp/config/initializers/secret_token.rb +0 -7
  132. data/spec/dummyapp/config/initializers/session_store.rb +0 -8
  133. data/spec/dummyapp/config/initializers/wrap_parameters.rb +0 -16
  134. data/spec/dummyapp/config/locales/devise.en.yml +0 -58
  135. data/spec/dummyapp/config/locales/en.yml +0 -5
  136. data/spec/dummyapp/config/routes.rb +0 -17
  137. data/spec/dummyapp/config/secrets.yml +0 -2
  138. data/spec/dummyapp/db/migrate/20121121184652_devise_create_users.rb +0 -46
  139. data/spec/dummyapp/db/migrate/20121121184654_add_name_to_users.rb +0 -5
  140. data/spec/dummyapp/db/migrate/20161219184410_create_books.rb +0 -10
  141. data/spec/dummyapp/db/migrate/20161219185529_add_username_to_users.rb +0 -5
  142. data/spec/dummyapp/db/schema.rb +0 -41
  143. data/spec/dummyapp/db/seeds.rb +0 -12
  144. data/spec/dummyapp/lib/assets/.gitkeep +0 -0
  145. data/spec/dummyapp/public/404.html +0 -26
  146. data/spec/dummyapp/public/422.html +0 -26
  147. data/spec/dummyapp/public/500.html +0 -25
  148. data/spec/dummyapp/public/favicon.ico +0 -0
  149. data/spec/dummyapp/script/rails +0 -6
  150. data/spec/fixtures/file1 +0 -1
  151. data/spec/fixtures/file2 +0 -1
  152. data/spec/fixtures/payloads/message.json +0 -25
  153. data/spec/fixtures/payloads/sample.trace.json +0 -275
  154. data/spec/fixtures/payloads/sample.trace_chain.json +0 -530
  155. data/spec/fixtures/plugins/dummy1.rb +0 -5
  156. data/spec/fixtures/plugins/dummy2.rb +0 -5
  157. data/spec/generators/rollbar/rollbar_generator_rails30_spec.rb +0 -31
  158. data/spec/generators/rollbar/rollbar_generator_spec.rb +0 -51
  159. data/spec/requests/home_spec.rb +0 -49
  160. data/spec/rollbar/configuration_spec.rb +0 -46
  161. data/spec/rollbar/delay/delayed_job_spec.rb +0 -22
  162. data/spec/rollbar/delay/girl_friday_spec.rb +0 -41
  163. data/spec/rollbar/delay/resque_spec.rb +0 -37
  164. data/spec/rollbar/delay/thread_spec.rb +0 -27
  165. data/spec/rollbar/encoding/encoder_spec.rb +0 -63
  166. data/spec/rollbar/item/backtrace_spec.rb +0 -26
  167. data/spec/rollbar/item/frame_spec.rb +0 -267
  168. data/spec/rollbar/item_spec.rb +0 -736
  169. data/spec/rollbar/json/oj_spec.rb +0 -18
  170. data/spec/rollbar/json_spec.rb +0 -110
  171. data/spec/rollbar/lazy_store_spec.rb +0 -99
  172. data/spec/rollbar/logger_proxy_spec.rb +0 -50
  173. data/spec/rollbar/logger_spec.rb +0 -124
  174. data/spec/rollbar/middleware/js_spec.rb +0 -421
  175. data/spec/rollbar/middleware/sinatra_spec.rb +0 -197
  176. data/spec/rollbar/notifier_spec.rb +0 -56
  177. data/spec/rollbar/plugin_spec.rb +0 -209
  178. data/spec/rollbar/plugins/active_job_spec.rb +0 -38
  179. data/spec/rollbar/plugins/delayed_job/job_data_spec.rb +0 -48
  180. data/spec/rollbar/plugins/delayed_job_spec.rb +0 -129
  181. data/spec/rollbar/plugins/rack_spec.rb +0 -152
  182. data/spec/rollbar/plugins/rails_js_spec.rb +0 -19
  183. data/spec/rollbar/plugins/rake_spec.rb +0 -34
  184. data/spec/rollbar/plugins/resque/failure_spec.rb +0 -36
  185. data/spec/rollbar/plugins/sidekiq_spec.rb +0 -171
  186. data/spec/rollbar/plugins/validations_spec.rb +0 -56
  187. data/spec/rollbar/plugins_spec.rb +0 -68
  188. data/spec/rollbar/request_data_extractor_spec.rb +0 -270
  189. data/spec/rollbar/scrubbers/params_spec.rb +0 -314
  190. data/spec/rollbar/scrubbers/url_spec.rb +0 -136
  191. data/spec/rollbar/scrubbers_spec.rb +0 -31
  192. data/spec/rollbar/sidekig/clear_scope_spec.rb +0 -19
  193. data/spec/rollbar/truncation/frames_strategy_spec.rb +0 -70
  194. data/spec/rollbar/truncation/min_body_strategy_spec.rb +0 -57
  195. data/spec/rollbar/truncation/strings_strategy_spec.rb +0 -89
  196. data/spec/rollbar/truncation_spec.rb +0 -27
  197. data/spec/rollbar/util/hash_spec.rb +0 -22
  198. data/spec/rollbar/util/ip_anonymizer_spec.rb +0 -30
  199. data/spec/rollbar/util_spec.rb +0 -80
  200. data/spec/rollbar_bc_spec.rb +0 -380
  201. data/spec/rollbar_spec.rb +0 -1667
  202. data/spec/spec_helper.rb +0 -84
  203. data/spec/support/cause_exception.rb +0 -1
  204. data/spec/support/encoding_helpers.rb +0 -8
  205. data/spec/support/encodings/iso_8859_9 +0 -1
  206. data/spec/support/fixture_helpers.rb +0 -10
  207. data/spec/support/get_ip_raising.rb +0 -7
  208. data/spec/support/helpers.rb +0 -5
  209. data/spec/support/matchers.rb +0 -23
  210. data/spec/support/notifier_helpers.rb +0 -57
  211. data/spec/support/rollbar_api.rb +0 -57
  212. data/spec/support/shared_contexts.rb +0 -12
data/Gemfile CHANGED
@@ -2,22 +2,39 @@
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.7.1'
19
+ gem 'rails', GEMFILE_RAILS_VERSION
11
20
  gem 'rake'
12
- gem 'rspec-rails', '~> 3.4'
13
- gem 'sqlite3', :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
- gem 'oj', '~> 2.12.14' unless is_jruby
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
32
+ end
16
33
 
17
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
18
- gem 'sidekiq', '>= 2.13.0', '< 5.0'
34
+ if RUBY_VERSION < '2.2.2'
35
+ gem 'sidekiq', '~> 2.13.0'
19
36
  else
20
- gem 'sidekiq', '>= 2.13.0'
37
+ gem 'sidekiq', '>= 2.13.0' # rubocop:disable Bundler/DuplicatedGem
21
38
  end
22
39
 
23
40
  platforms :rbx do
@@ -28,19 +45,34 @@ platforms :rbx do
28
45
  end
29
46
 
30
47
  if RUBY_VERSION.start_with?('1.9')
48
+ gem 'capistrano', '<= 3.4.1', :require => false
49
+ gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
31
50
  gem 'sucker_punch', '~> 1.0'
32
51
  elsif RUBY_VERSION.start_with?('2')
33
- gem 'sucker_punch', '~> 2.0'
52
+ gem 'capistrano', :require => false # rubocop:disable Bundler/DuplicatedGem
53
+ gem 'codacy-coverage'
54
+ gem 'shoryuken' # rubocop:disable Bundler/DuplicatedGem
55
+ gem 'simplecov'
56
+ gem 'sucker_punch', '~> 2.0' # rubocop:disable Bundler/DuplicatedGem
57
+ end
58
+
59
+ unless is_jruby
60
+ # JRuby doesn't support fork, which is required for this test helper.
61
+ gem 'rspec-command'
34
62
  end
35
63
 
36
64
  gem 'aws-sdk-sqs'
37
- gem 'database_cleaner', '~> 1.0.0'
38
- gem 'delayed_job', :require => false
65
+ gem 'database_cleaner'
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
39
71
  gem 'generator_spec'
40
72
  gem 'girl_friday', '>= 0.11.1'
41
73
  gem 'redis'
42
- gem 'resque'
43
- gem 'shoryuken'
74
+ gem 'resque', '< 2.0.0'
75
+ gem 'rubocop', :require => false
44
76
  gem 'sinatra'
45
-
77
+ gem 'webmock', :require => false
46
78
  gemspec
data/README.md CHANGED
@@ -1,5 +1,16 @@
1
- # Rollbar-gem
1
+ # Rollbar-gem
2
2
  [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=master)](https://travis-ci.org/rollbar/rollbar-gem/branches)
3
+ [![Gem Version](https://badge.fury.io/rb/rollbar.svg)](http://badge.fury.io/rb/rollbar)
4
+ [![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=rollbar&package-manager=bundler&version-scheme=semver&target-version=latest)](https://dependabot.com/compatibility-score.html?dependency-name=rollbar&package-manager=bundler&version-scheme=semver&new-version=latest)
5
+
6
+
7
+ > WARNING: Ruby 2.6.0 introduced a new bug bug ([#15472 -
8
+ Invalid JSON data being sent from Net::HTTP in some cases with Ruby 2.6.0](https://bugs.ruby-lang.org/issues/15472)) that may result in the Rollbar API returning an error when an exception is reported. (See [rollbar-gem issue #797](https://github.com/rollbar/rollbar-gem/issues/797)).
9
+
10
+ > UPDATE: This bug is fixed in Ruby 2.6.1, and rollbar-gem has a safe workaround in version >= 2.19.0.
11
+ If you need to stay on Ruby 2.6.0 for any reason, make sure you have the latest rollbar-gem.
12
+
13
+
3
14
 
4
15
  [Rollbar](https://rollbar.com) is a real-time exception reporting 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.
5
16
 
@@ -13,7 +24,13 @@ Rollbar-gem is the SDK for Ruby apps and includes support for apps using Rails,
13
24
  ## Usage and Reference
14
25
 
15
26
  For complete usage instructions and configuration reference, see our [Ruby SDK docs](https://docs.rollbar.com/docs/ruby).
16
-
27
+
28
+ ## Compatibility
29
+
30
+ Version >= 2.19.0 is compatible with Ruby >= 1.9.3.
31
+
32
+ Version < 2.19.0 is compatible with Ruby >= 1.8.7.
33
+
17
34
  ## Release History & Changelog
18
35
 
19
36
  See our [Releases](https://github.com/rollbar/rollbar-gem/releases) page for a list of all releases, including changes.
@@ -35,4 +52,4 @@ For bug reports, please [open an issue on GitHub](https://github.com/rollbar/rol
35
52
  We're using RSpec for testing. Run the test suite with ```rake spec```. Tests for pull requests are appreciated but not required. (If you don't include a test, we'll write one before merging.)
36
53
 
37
54
  ## License
38
- Rollbar-gem is free software released under the MIT License. See [LICENSE.txt](LICENSE.txt) for details.
55
+ Rollbar-gem is free software released under the MIT License. See [LICENSE](LICENSE) for details.
data/Rakefile CHANGED
File without changes
@@ -1 +1 @@
1
- !function(r){function e(n){if(o[n])return o[n].exports;var t=o[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,e),t.loaded=!0,t.exports}var o={};return e.m=r,e.c=o,e.p="",e(0)}([function(r,e,o){"use strict";var n=o(1),t=o(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.3.8/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){"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,e){this.options=r,this._rollbarOldOnError=null;var o=s++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}function a(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(e);return n(function(){e.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),e.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=e.autoInstrument;return e.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[o]=t,t})()}}function l(r){return n(function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=o(2),s=0,d=o(3),c=function(r,e){return new t(r,e)},p=d.bind(null,c);t.prototype.loadFull=function(r,e,o,t,a){var l=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(l=t[i],"function"==typeof l){l(e);break}}"function"==typeof a&&a(e)},i=!1,s=e.createElement("script"),d=e.getElementsByTagName("script")[0],c=d.parentNode;s.crossOrigin="",s.src=t.rollbarJsUrl,o||(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,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"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 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,e){"use strict";function o(r,e,o){if(r){var t;"function"==typeof e._rollbarOldOnError?t=e._rollbarOldOnError:r.onerror&&!r.onerror.belongsToShim&&(t=r.onerror,e._rollbarOldOnError=t);var a=function(){var o=Array.prototype.slice.call(arguments,0);n(r,e,t,o)};a.belongsToShim=o,r.onerror=a}}function n(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)}function t(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){t="[unhandledrejection] error getting `detail` from event"}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)}}function a(r,e,o){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(e,r[t].prototype,o)}}function l(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:o,captureUnhandledRejections:t,wrapGlobals:a}},function(r,e){"use strict";function o(r,e){this.impl=r(e,this),this.options=e,n(o.prototype)}function n(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,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad".split(","),n=0;n<o.length;n++)r[o[n]]=e(o[n])}o.prototype._swapAndProcessMessages=function(r,e){this.impl=r(this.options);for(var o,n,t;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){"use strict";r.exports=function(r){return function(e){if(!e&&!window._rollbarInitialized){r=r||{};for(var o,n,t=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}}}}]);
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.12.3/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),s=function(r,e){return new l(r,e)},d=function(r){return new i(s,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"),s=e.getElementsByTagName("script")[0],d=s.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{d.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)}()}}),d.insertBefore(i,s)},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 d(e);return t(function(){e.captureUncaught&&(a._rollbarOldOnError=r.onerror,n.captureUncaughtExceptions(r,a,!0),e.wrapGlobalEventHandlers&&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:d}},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);var t=e.handleUncaughtException.apply(e,n);o&&o.apply(r,n),"anonymous"===t&&(e.anonymousErrorsPending+=1)}(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}}}}]);
@@ -64,6 +64,12 @@ end
64
64
  What logger to use for printing debugging and informational messages during
65
65
  operation.
66
66
 
67
+ ### logger_level
68
+
69
+ **Default** `:info`
70
+
71
+ Regardless of what Logger you're using, Rollbar will not proxy logs to it if its less than this particular level.
72
+
67
73
  ### disable_monkey_patch
68
74
 
69
75
  **Default** `false`
@@ -236,6 +242,15 @@ Fields to scrub out of the parsed request data. Will scrub from `GET`, `POST`,
236
242
  url, and several other locations. Does not currently recurse into the full
237
243
  payload.
238
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
+
239
254
  ### scrub_user
240
255
 
241
256
  **Default** `true`
@@ -2,9 +2,16 @@ 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
- gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
14
+ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
8
15
  gem 'jruby-openssl', :platform => :jruby
9
16
  gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
10
17
  gem 'appraisal', '= 1.0.2'
@@ -12,15 +19,11 @@ 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
- gem 'oj', '~> 2.12.14' unless is_jruby
18
- if RUBY_VERSION > '1.8.7'
19
- if RUBY_VERSION < '2.2.2'
20
- gem 'sidekiq', '>= 2.13.0', '< 5.0'
21
- else
22
- gem 'sidekiq', '>= 2.13.0'
23
- end
22
+
23
+ if RUBY_VERSION < '2.2.2'
24
+ gem 'sidekiq', '~> 2.13.0'
25
+ else
26
+ gem 'sidekiq', '>= 2.13.0'
24
27
  end
25
28
 
26
29
  platforms :rbx do
@@ -32,18 +35,24 @@ platforms :rbx do
32
35
  end
33
36
 
34
37
  if RUBY_VERSION.start_with?('1.9')
38
+ gem 'capistrano', '<= 3.4.1', :require => false
35
39
  gem 'sucker_punch', '~> 1.0'
40
+ gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
36
41
  elsif RUBY_VERSION.start_with?('2')
42
+ gem 'capistrano', :require => false
37
43
  gem 'sucker_punch', '~> 2.0'
44
+ gem 'shoryuken'
45
+ gem 'codacy-coverage'
46
+ gem 'simplecov'
38
47
  end
39
48
 
40
49
  gem 'sinatra'
41
- gem 'resque'
42
50
  gem 'delayed_job', :require => false
43
51
  gem 'redis'
44
52
  gem 'database_cleaner', '~> 1.0.0'
45
53
  gem 'genspec', '>= 0.2.8'
46
54
  gem 'girl_friday', '>= 0.11.1'
55
+ gem 'rspec-command'
47
56
 
48
57
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
49
58
  gem 'public_suffix', '< 1.5'
@@ -53,9 +62,7 @@ else
53
62
  gem 'webmock', :require => false
54
63
  end
55
64
 
56
- gem 'resque'
57
-
65
+ gem 'resque', '< 2.0.0'
58
66
  gem 'aws-sdk-sqs'
59
- gem 'shoryuken'
60
67
 
61
68
  gemspec :path => '../'
@@ -2,9 +2,16 @@ 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
- gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
14
+ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
8
15
  gem 'jruby-openssl', :platform => :jruby
9
16
  gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
10
17
  gem 'appraisal', '= 1.0.2'
@@ -12,7 +19,11 @@ gem 'rails', '3.1.12'
12
19
  gem 'rspec-rails', '~> 3.4'
13
20
  gem 'rake'
14
21
 
15
- gem 'oj', '~> 2.12.14' unless is_jruby
22
+ if RUBY_VERSION < '2.2.2'
23
+ gem 'sidekiq', '~> 2.13.0'
24
+ else
25
+ gem 'sidekiq', '>= 2.13.0'
26
+ end
16
27
 
17
28
  platforms :rbx do
18
29
  gem 'minitest'
@@ -23,36 +34,34 @@ platforms :rbx do
23
34
  end
24
35
 
25
36
  if RUBY_VERSION.start_with?('1.9')
37
+ gem 'capistrano', '<= 3.4.1', :require => false
26
38
  gem 'sucker_punch'
39
+ gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
27
40
  elsif RUBY_VERSION.start_with?('2')
41
+ gem 'capistrano', :require => false
28
42
  gem 'sucker_punch'
43
+ gem 'shoryuken'
44
+ gem 'codacy-coverage'
45
+ gem 'simplecov'
29
46
  end
30
47
 
31
48
  gem 'sinatra'
32
- gem 'resque'
33
49
  gem 'delayed_job', :require => false
34
50
  gem 'redis'
35
51
  gem 'database_cleaner'
36
52
  gem 'girl_friday'
37
53
  gem 'generator_spec'
54
+ gem 'rspec-command'
38
55
 
39
56
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
40
57
  gem 'mime-types', '< 3.0'
41
58
  gem 'public_suffix', '< 1.5'
42
59
  gem 'webmock', '< 2.3.0', :require => false
43
- gem 'sidekiq', '< 2.13.0'
44
60
  else
45
61
  gem 'webmock', :require => false
46
- if RUBY_VERSION < '2.2.2'
47
- gem 'sidekiq', '>= 2.13.0', '< 5.0'
48
- else
49
- gem 'sidekiq', '>= 2.13.0'
50
- end
51
62
  end
52
63
 
53
- gem 'resque'
54
-
64
+ gem 'resque', '< 2.0.0'
55
65
  gem 'aws-sdk-sqs'
56
- gem 'shoryuken'
57
66
 
58
67
  gemspec :path => '../'
@@ -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'
@@ -10,13 +17,12 @@ gem 'jruby-openssl', :platform => :jruby
10
17
  gem 'rails', '3.2.22'
11
18
  gem 'rake'
12
19
  gem 'rspec-rails', '~> 3.4'
13
- gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
20
+ 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
- gem 'oj', '~> 2.12.14' unless is_jruby
18
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
19
- gem 'sidekiq', '>= 2.13.0', '< 5.0'
24
+ if RUBY_VERSION < '2.2.2'
25
+ gem 'sidekiq', '~> 2.13.0'
20
26
  else
21
27
  gem 'sidekiq', '>= 2.13.0'
22
28
  end
@@ -30,19 +36,25 @@ platforms :rbx do
30
36
  end
31
37
 
32
38
  if RUBY_VERSION.start_with?('1.9')
39
+ gem 'capistrano', '<= 3.4.1', :require => false
33
40
  gem 'sucker_punch', '~> 1.0'
41
+ gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
34
42
  elsif RUBY_VERSION.start_with?('2')
43
+ gem 'capistrano', :require => false
35
44
  gem 'sucker_punch', '~> 2.0'
45
+ gem 'shoryuken'
46
+ gem 'codacy-coverage'
47
+ gem 'simplecov'
36
48
  end
37
49
 
38
50
  gem 'delayed_job', :require => false
39
51
  gem 'redis'
40
- gem 'resque'
41
52
  gem 'sinatra'
42
53
 
43
54
  gem 'database_cleaner', '~> 1.0.0'
44
55
  gem 'generator_spec'
45
56
  gem 'girl_friday', '>= 0.11.1'
57
+ gem 'rspec-command'
46
58
 
47
59
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
48
60
  gem 'mime-types', '< 3.0'
@@ -52,9 +64,7 @@ else
52
64
  gem 'webmock', :require => false
53
65
  end
54
66
 
55
- gem 'resque'
56
-
67
+ gem 'resque', '< 2.0.0'
57
68
  gem 'aws-sdk-sqs'
58
- gem 'shoryuken'
59
69
 
60
70
  gemspec :path => '../'
@@ -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'
@@ -10,13 +17,12 @@ gem 'jruby-openssl', :platform => :jruby
10
17
  gem 'rails', '4.0.13'
11
18
  gem 'rake'
12
19
  gem 'rspec-rails', '~> 3.4'
13
- gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
20
+ 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
- gem 'oj', '~> 2.12.14' unless is_jruby
18
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
19
- gem 'sidekiq', '>= 2.13.0', '< 5.0'
24
+ if RUBY_VERSION < '2.2.2'
25
+ gem 'sidekiq', '~> 2.13.0'
20
26
  else
21
27
  gem 'sidekiq', '>= 2.13.0'
22
28
  end
@@ -30,11 +36,17 @@ platforms :rbx do
30
36
  end
31
37
 
32
38
  if RUBY_VERSION.start_with?('1.9')
39
+ gem 'capistrano', '<= 3.4.1', :require => false
33
40
  gem 'sucker_punch', '~> 1.0'
34
41
  gem 'json', '~> 1.8'
42
+ gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
35
43
  elsif RUBY_VERSION.start_with?('2')
44
+ gem 'capistrano', :require => false
36
45
  gem 'sucker_punch', '~> 2.0'
37
46
  gem 'json', '~> 2.0'
47
+ gem 'shoryuken'
48
+ gem 'codacy-coverage'
49
+ gem 'simplecov'
38
50
  end
39
51
 
40
52
  gem 'delayed_job', :require => false
@@ -45,6 +57,7 @@ gem 'sinatra'
45
57
  gem 'database_cleaner', '~> 1.0.0'
46
58
  gem 'generator_spec'
47
59
  gem 'girl_friday', '>= 0.11.1'
60
+ gem 'rspec-command'
48
61
 
49
62
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
50
63
  gem 'mime-types', '< 3.0'
@@ -55,6 +68,5 @@ else
55
68
  end
56
69
 
57
70
  gem 'aws-sdk-sqs'
58
- gem 'shoryuken'
59
71
 
60
- gemspec :path => '../'
72
+ gemspec :path => '../'
@@ -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'
@@ -10,11 +17,10 @@ gem 'jruby-openssl', :platform => :jruby
10
17
  gem 'rails', '4.1.12'
11
18
  gem 'rake'
12
19
  gem 'rspec-rails', '~> 3.4'
13
- gem 'sqlite3', :platform => [:ruby, :mswin, :mingw]
20
+ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
14
21
 
15
- gem 'oj', '~> 2.12.14' unless is_jruby
16
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
17
- gem 'sidekiq', '>= 2.13.0', '< 5.0'
22
+ if RUBY_VERSION < '2.2.2'
23
+ gem 'sidekiq', '~> 2.13.0'
18
24
  else
19
25
  gem 'sidekiq', '>= 2.13.0'
20
26
  end
@@ -27,9 +33,15 @@ platforms :rbx do
27
33
  end
28
34
 
29
35
  if RUBY_VERSION.start_with?('1.9')
36
+ gem 'capistrano', '<= 3.4.1', :require => false
30
37
  gem 'sucker_punch', '~> 1.0'
38
+ gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
31
39
  elsif RUBY_VERSION.start_with?('2')
40
+ gem 'capistrano', :require => false
32
41
  gem 'sucker_punch', '~> 2.0'
42
+ gem 'shoryuken'
43
+ gem 'codacy-coverage'
44
+ gem 'simplecov'
33
45
  end
34
46
 
35
47
  gem 'delayed_job', :require => false
@@ -40,6 +52,7 @@ gem 'sinatra'
40
52
  gem 'database_cleaner', '~> 1.0.0'
41
53
  gem 'generator_spec'
42
54
  gem 'girl_friday', '>= 0.11.1'
55
+ gem 'rspec-command'
43
56
 
44
57
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
45
58
  gem 'mime-types', '< 3.0'
@@ -50,8 +63,6 @@ else
50
63
  end
51
64
 
52
65
  gem 'resque'
53
-
54
66
  gem 'aws-sdk-sqs'
55
- gem 'shoryuken'
56
67
 
57
68
  gemspec :path => '../'