rollbar 2.8.3 → 3.6.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 (238) hide show
  1. checksums.yaml +5 -5
  2. data/.codeclimate.yml +18 -0
  3. data/.github/pull_request_template.md +34 -0
  4. data/.github/workflows/ci.yml +67 -0
  5. data/.gitignore +3 -1
  6. data/.rubocop.yml +206 -7
  7. data/Appraisals +10 -10
  8. data/CHANGELOG.md +257 -3
  9. data/Gemfile +74 -13
  10. data/README.md +38 -833
  11. data/Rakefile +0 -0
  12. data/THANKS.md +1 -0
  13. data/data/rollbar.snippet.js +1 -1
  14. data/docs/configuration.md +64 -3
  15. data/docs/plugins.md +46 -0
  16. data/gemfiles/rails50.gemfile +56 -0
  17. data/gemfiles/rails51.gemfile +57 -0
  18. data/gemfiles/rails52.gemfile +56 -0
  19. data/gemfiles/rails60.gemfile +52 -0
  20. data/gemfiles/rails61.gemfile +52 -0
  21. data/gemfiles/rails70.gemfile +52 -0
  22. data/gemfiles/rails71.gemfile +52 -0
  23. data/lib/generators/rollbar/rollbar_generator.rb +24 -20
  24. data/lib/generators/rollbar/templates/{initializer.rb → initializer.erb} +19 -5
  25. data/lib/rails/rollbar_runner.rb +26 -22
  26. data/lib/rollbar/capistrano.rb +78 -38
  27. data/lib/rollbar/capistrano3.rb +62 -1
  28. data/lib/rollbar/capistrano_tasks.rb +166 -0
  29. data/lib/rollbar/configuration.rb +291 -71
  30. data/lib/rollbar/delay/active_job.rb +17 -0
  31. data/lib/rollbar/delay/delayed_job.rb +23 -0
  32. data/lib/rollbar/delay/girl_friday.rb +4 -9
  33. data/lib/rollbar/delay/resque.rb +3 -6
  34. data/lib/rollbar/delay/shoryuken.rb +36 -0
  35. data/lib/rollbar/delay/sidekiq.rb +6 -8
  36. data/lib/rollbar/delay/sucker_punch.rb +17 -22
  37. data/lib/rollbar/delay/thread.rb +74 -3
  38. data/lib/rollbar/deploy.rb +91 -0
  39. data/lib/rollbar/encoding/encoder.rb +22 -11
  40. data/lib/rollbar/encoding.rb +2 -7
  41. data/lib/rollbar/exception_reporter.rb +36 -12
  42. data/lib/rollbar/item/backtrace.rb +118 -0
  43. data/lib/rollbar/item/frame.rb +121 -0
  44. data/lib/rollbar/item/locals.rb +103 -0
  45. data/lib/rollbar/item.rb +314 -0
  46. data/lib/rollbar/js.rb +0 -28
  47. data/lib/rollbar/json.rb +7 -55
  48. data/lib/rollbar/language_support.rb +7 -19
  49. data/lib/rollbar/lazy_store.rb +8 -12
  50. data/lib/rollbar/logger.rb +71 -0
  51. data/lib/rollbar/logger_proxy.rb +18 -1
  52. data/lib/rollbar/middleware/js/json_value.rb +36 -0
  53. data/lib/rollbar/middleware/js.rb +297 -0
  54. data/lib/rollbar/middleware/rack/builder.rb +4 -4
  55. data/lib/rollbar/middleware/rack/test_session.rb +4 -4
  56. data/lib/rollbar/middleware/rack.rb +52 -0
  57. data/lib/rollbar/middleware/rails/rollbar.rb +19 -7
  58. data/lib/rollbar/middleware/rails/show_exceptions.rb +21 -9
  59. data/lib/rollbar/middleware/sinatra.rb +2 -40
  60. data/lib/rollbar/notifier/trace_with_bindings.rb +75 -0
  61. data/lib/rollbar/notifier.rb +913 -0
  62. data/lib/rollbar/plugin.rb +126 -0
  63. data/lib/rollbar/plugins/active_job.rb +54 -0
  64. data/lib/rollbar/plugins/basic_socket.rb +31 -0
  65. data/lib/rollbar/plugins/delayed_job/job_data.rb +50 -0
  66. data/lib/rollbar/plugins/delayed_job/plugin.rb +88 -0
  67. data/lib/rollbar/plugins/delayed_job.rb +12 -0
  68. data/lib/rollbar/plugins/error_context.rb +11 -0
  69. data/lib/rollbar/plugins/goalie.rb +65 -0
  70. data/lib/rollbar/plugins/rack.rb +18 -0
  71. data/lib/rollbar/plugins/rails/controller_methods.rb +56 -0
  72. data/lib/rollbar/plugins/rails/error_subscriber.rb +12 -0
  73. data/lib/rollbar/plugins/rails/railtie30.rb +18 -0
  74. data/lib/rollbar/plugins/rails/railtie32.rb +18 -0
  75. data/lib/rollbar/plugins/rails/railtie_mixin.rb +37 -0
  76. data/lib/rollbar/plugins/rails.rb +89 -0
  77. data/lib/rollbar/plugins/rake.rb +73 -0
  78. data/lib/rollbar/plugins/resque/failure.rb +39 -0
  79. data/lib/rollbar/plugins/resque.rb +11 -0
  80. data/lib/rollbar/plugins/sidekiq/plugin.rb +77 -0
  81. data/lib/rollbar/plugins/sidekiq.rb +37 -0
  82. data/lib/rollbar/plugins/thread.rb +14 -0
  83. data/lib/rollbar/plugins/validations.rb +45 -0
  84. data/lib/rollbar/plugins.rb +47 -0
  85. data/lib/rollbar/rails.rb +0 -1
  86. data/lib/rollbar/rake_tasks.rb +4 -66
  87. data/lib/rollbar/request_data_extractor.rb +157 -117
  88. data/lib/rollbar/rollbar_test.rb +38 -0
  89. data/lib/rollbar/scrubbers/params.rb +133 -0
  90. data/lib/rollbar/scrubbers/url.rb +90 -35
  91. data/lib/rollbar/scrubbers.rb +13 -0
  92. data/lib/rollbar/truncation/frames_strategy.rb +2 -1
  93. data/lib/rollbar/truncation/min_body_strategy.rb +3 -4
  94. data/lib/rollbar/truncation/mixin.rb +1 -1
  95. data/lib/rollbar/truncation/remove_any_key_strategy.rb +126 -0
  96. data/lib/rollbar/truncation/remove_extra_strategy.rb +37 -0
  97. data/lib/rollbar/truncation/remove_request_strategy.rb +21 -0
  98. data/lib/rollbar/truncation/strings_strategy.rb +6 -5
  99. data/lib/rollbar/truncation.rb +10 -4
  100. data/lib/rollbar/util/hash.rb +37 -6
  101. data/lib/rollbar/util/ip_anonymizer.rb +33 -0
  102. data/lib/rollbar/util/ip_obfuscator.rb +1 -1
  103. data/lib/rollbar/util.rb +101 -55
  104. data/lib/rollbar/version.rb +1 -1
  105. data/lib/rollbar.rb +91 -879
  106. data/lib/tasks/benchmark.rake +104 -0
  107. data/lib/tasks/tasks.rake +3 -3
  108. data/rollbar.gemspec +21 -32
  109. data/spec/support/rollbar_api.rb +67 -0
  110. metadata +78 -439
  111. data/.travis.yml +0 -155
  112. data/gemfiles/rails30.gemfile +0 -20
  113. data/gemfiles/rails31.gemfile +0 -16
  114. data/gemfiles/rails32.gemfile +0 -17
  115. data/gemfiles/rails40.gemfile +0 -17
  116. data/gemfiles/rails41.gemfile +0 -15
  117. data/gemfiles/rails42.gemfile +0 -15
  118. data/lib/rollbar/active_job.rb +0 -11
  119. data/lib/rollbar/active_record_extension.rb +0 -14
  120. data/lib/rollbar/core_ext/basic_socket.rb +0 -7
  121. data/lib/rollbar/core_ext/thread.rb +0 -9
  122. data/lib/rollbar/delayed_job.rb +0 -78
  123. data/lib/rollbar/encoding/legacy_encoder.rb +0 -20
  124. data/lib/rollbar/goalie.rb +0 -33
  125. data/lib/rollbar/js/frameworks/rails.rb +0 -29
  126. data/lib/rollbar/js/frameworks.rb +0 -6
  127. data/lib/rollbar/js/middleware.rb +0 -129
  128. data/lib/rollbar/js/version.rb +0 -5
  129. data/lib/rollbar/json/default.rb +0 -11
  130. data/lib/rollbar/json/oj.rb +0 -15
  131. data/lib/rollbar/rack.rb +0 -9
  132. data/lib/rollbar/rails/controller_methods.rb +0 -40
  133. data/lib/rollbar/railtie.rb +0 -46
  134. data/lib/rollbar/rake.rb +0 -38
  135. data/lib/rollbar/sidekiq.rb +0 -40
  136. data/lib/rollbar/tasks/rollbar.cap +0 -45
  137. data/spec/cacert.pem +0 -3988
  138. data/spec/controllers/home_controller_spec.rb +0 -455
  139. data/spec/delay/sidekiq_spec.rb +0 -61
  140. data/spec/delay/sucker_punch_spec.rb +0 -25
  141. data/spec/delayed/backend/test.rb +0 -139
  142. data/spec/delayed/serialization/test.rb +0 -0
  143. data/spec/dummyapp/.gitignore +0 -73
  144. data/spec/dummyapp/Rakefile +0 -7
  145. data/spec/dummyapp/app/assets/javascripts/application.js +0 -3
  146. data/spec/dummyapp/app/assets/stylesheets/application.css.scss +0 -37
  147. data/spec/dummyapp/app/controllers/application_controller.rb +0 -3
  148. data/spec/dummyapp/app/controllers/home_controller.rb +0 -60
  149. data/spec/dummyapp/app/controllers/users_controller.rb +0 -17
  150. data/spec/dummyapp/app/helpers/.gitkeep +0 -0
  151. data/spec/dummyapp/app/mailers/.gitkeep +0 -0
  152. data/spec/dummyapp/app/models/.gitkeep +0 -0
  153. data/spec/dummyapp/app/models/user.rb +0 -7
  154. data/spec/dummyapp/app/views/devise/registrations/edit.html.erb +0 -27
  155. data/spec/dummyapp/app/views/devise/registrations/new.html.erb +0 -20
  156. data/spec/dummyapp/app/views/devise/shared/_links.html.erb +0 -25
  157. data/spec/dummyapp/app/views/home/cause_exception.html.erb +0 -1
  158. data/spec/dummyapp/app/views/home/index.html.erb +0 -4
  159. data/spec/dummyapp/app/views/home/report_exception.html.erb +0 -1
  160. data/spec/dummyapp/app/views/js/test.html.erb +0 -1
  161. data/spec/dummyapp/app/views/layouts/_messages.html.erb +0 -5
  162. data/spec/dummyapp/app/views/layouts/_navigation.html.erb +0 -21
  163. data/spec/dummyapp/app/views/layouts/application.html.erb +0 -25
  164. data/spec/dummyapp/app/views/layouts/simple.html.erb +0 -18
  165. data/spec/dummyapp/app/views/users/index.html.erb +0 -8
  166. data/spec/dummyapp/app/views/users/show.html.erb +0 -3
  167. data/spec/dummyapp/config/application.rb +0 -59
  168. data/spec/dummyapp/config/boot.rb +0 -10
  169. data/spec/dummyapp/config/database.yml +0 -25
  170. data/spec/dummyapp/config/environment.rb +0 -5
  171. data/spec/dummyapp/config/environments/development.rb +0 -37
  172. data/spec/dummyapp/config/environments/production.rb +0 -67
  173. data/spec/dummyapp/config/environments/test.rb +0 -37
  174. data/spec/dummyapp/config/initializers/backtrace_silencers.rb +0 -7
  175. data/spec/dummyapp/config/initializers/inflections.rb +0 -15
  176. data/spec/dummyapp/config/initializers/mime_types.rb +0 -5
  177. data/spec/dummyapp/config/initializers/rollbar.rb +0 -23
  178. data/spec/dummyapp/config/initializers/secret_token.rb +0 -7
  179. data/spec/dummyapp/config/initializers/session_store.rb +0 -8
  180. data/spec/dummyapp/config/initializers/wrap_parameters.rb +0 -16
  181. data/spec/dummyapp/config/locales/devise.en.yml +0 -58
  182. data/spec/dummyapp/config/locales/en.yml +0 -5
  183. data/spec/dummyapp/config/routes.rb +0 -17
  184. data/spec/dummyapp/config.ru +0 -4
  185. data/spec/dummyapp/db/migrate/20121121184652_devise_create_users.rb +0 -46
  186. data/spec/dummyapp/db/migrate/20121121184654_add_name_to_users.rb +0 -5
  187. data/spec/dummyapp/db/schema.rb +0 -35
  188. data/spec/dummyapp/db/seeds.rb +0 -12
  189. data/spec/dummyapp/lib/assets/.gitkeep +0 -0
  190. data/spec/dummyapp/public/404.html +0 -26
  191. data/spec/dummyapp/public/422.html +0 -26
  192. data/spec/dummyapp/public/500.html +0 -25
  193. data/spec/dummyapp/public/favicon.ico +0 -0
  194. data/spec/dummyapp/script/rails +0 -6
  195. data/spec/fixtures/file1 +0 -1
  196. data/spec/fixtures/file2 +0 -1
  197. data/spec/fixtures/payloads/message.json +0 -25
  198. data/spec/fixtures/payloads/sample.trace.json +0 -275
  199. data/spec/fixtures/payloads/sample.trace_chain.json +0 -530
  200. data/spec/generators/rollbar/rollbar_generator_spec.rb +0 -24
  201. data/spec/requests/home_spec.rb +0 -49
  202. data/spec/rollbar/active_job_spec.rb +0 -33
  203. data/spec/rollbar/configuration_spec.rb +0 -24
  204. data/spec/rollbar/delay/girl_friday_spec.rb +0 -41
  205. data/spec/rollbar/delay/resque_spec.rb +0 -37
  206. data/spec/rollbar/delay/thread_spec.rb +0 -27
  207. data/spec/rollbar/delayed_job/job_data.rb +0 -35
  208. data/spec/rollbar/delayed_job_spec.rb +0 -90
  209. data/spec/rollbar/encoding/encoder_spec.rb +0 -63
  210. data/spec/rollbar/js/frameworks/rails_spec.rb +0 -19
  211. data/spec/rollbar/js/middleware_spec.rb +0 -162
  212. data/spec/rollbar/json/oj_spec.rb +0 -18
  213. data/spec/rollbar/json_spec.rb +0 -110
  214. data/spec/rollbar/lazy_store_spec.rb +0 -99
  215. data/spec/rollbar/logger_proxy_spec.rb +0 -34
  216. data/spec/rollbar/middleware/rack/builder_spec.rb +0 -151
  217. data/spec/rollbar/middleware/sinatra_spec.rb +0 -197
  218. data/spec/rollbar/rake_spec.rb +0 -34
  219. data/spec/rollbar/request_data_extractor_spec.rb +0 -82
  220. data/spec/rollbar/scrubbers/url_spec.rb +0 -111
  221. data/spec/rollbar/sidekiq_spec.rb +0 -90
  222. data/spec/rollbar/truncation/frames_strategy_spec.rb +0 -70
  223. data/spec/rollbar/truncation/min_body_strategy_spec.rb +0 -57
  224. data/spec/rollbar/truncation/strings_strategy_spec.rb +0 -89
  225. data/spec/rollbar/truncation_spec.rb +0 -27
  226. data/spec/rollbar/util/hash_spec.rb +0 -22
  227. data/spec/rollbar/util_spec.rb +0 -19
  228. data/spec/rollbar_bc_spec.rb +0 -380
  229. data/spec/rollbar_spec.rb +0 -2067
  230. data/spec/spec_helper.rb +0 -49
  231. data/spec/support/cause_exception.rb +0 -1
  232. data/spec/support/encoding_helpers.rb +0 -8
  233. data/spec/support/encodings/iso_8859_9 +0 -1
  234. data/spec/support/fixture_helpers.rb +0 -10
  235. data/spec/support/get_ip_raising.rb +0 -7
  236. data/spec/support/helpers.rb +0 -5
  237. data/spec/support/notifier_helpers.rb +0 -36
  238. data/spec/support/shared_contexts.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 681f393e2fa4f6c1c4883bbf4e0c9d5783622fd6
4
- data.tar.gz: 4538d40c64e3ec495a439aa85ae06c9af67fd659
2
+ SHA256:
3
+ metadata.gz: 2d1721c6b5e557cff0a0ddc98b068e7ce4026332d59f3de679ac0dddbe0c4199
4
+ data.tar.gz: 5863f686509bc77b0756f268cfc280fabeb00da1eacb8cd4bc9647f7cc57088b
5
5
  SHA512:
6
- metadata.gz: 466ecc982464a853f02cb7e5bf2b13f513022a0563fdfeeadc4cb33d65b8beb226835eeb101cf3cf2d12df0c3a8feeff65220bd0491c1c20a34e6e41b6be3579
7
- data.tar.gz: 8ee1700a380167d7aea6ea3ebd1f6d0785e725f07c72103c3548fbbfbe98216bbfd630181d1c5013b7f3af09ac7dfdc3af1a364e24e0f0710281795458229f67
6
+ metadata.gz: ce2ec0e2f6fbd82f0b6b1a362a9f3c27d5d6b41acd17b716fb7731b2c0e36ef74bed289ad2c266d69c7f24aba78cd818d79ae37d79dad6bf8f7ada53b00f9ef0
7
+ data.tar.gz: 9b32084364e461fc7eb1ca9fd8b31fae0928298ed7da14a2688608d80a4502cf08b13190139275f4d39b0cb8fd2a5dce4ab35ba528d2c0a414ddfb561bf32670
data/.codeclimate.yml ADDED
@@ -0,0 +1,18 @@
1
+ ---
2
+ engines:
3
+ duplication:
4
+ enabled: true
5
+ config:
6
+ languages:
7
+ - ruby
8
+ eslint:
9
+ enabled: false
10
+ fixme:
11
+ enabled: true
12
+ rubocop:
13
+ enabled: true
14
+ ratings:
15
+ paths:
16
+ - "**.rb"
17
+ exclude_paths:
18
+ - spec/
@@ -0,0 +1,34 @@
1
+ ## Description of the change
2
+
3
+ > Please include a summary of the change and which issues are fixed.
4
+ > Please also include relevant motivation and context.
5
+
6
+ ## Type of change
7
+
8
+ - [ ] Bug fix (non-breaking change that fixes an issue)
9
+ - [ ] New feature (non-breaking change that adds functionality)
10
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
11
+ - [ ] Maintenance
12
+ - [ ] New release
13
+
14
+ ## Related issues
15
+
16
+ > Shortcut stories and GitHub issues (delete irrelevant)
17
+
18
+ - Fix [SC-]
19
+ - Fix #1
20
+
21
+ ## Checklists
22
+
23
+ ### Development
24
+
25
+ - [ ] Lint rules pass locally
26
+ - [ ] The code changed/added as part of this pull request has been covered with tests
27
+ - [ ] All tests related to the changed code pass in development
28
+
29
+ ### Code review
30
+
31
+ - [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
32
+ - [ ] "Ready for review" label attached to the PR and reviewers assigned
33
+ - [ ] Issue from task tracker has a link to this pull request
34
+ - [ ] Changes have been reviewed by at least one other engineer
@@ -0,0 +1,67 @@
1
+ name: Rollbar-gem CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-22.04
12
+ strategy:
13
+ matrix:
14
+ ruby-version: [2.5.3, 2.6.0, 2.6.6, 2.7.2]
15
+ gemfile:
16
+ - gemfiles/rails50.gemfile
17
+ - gemfiles/rails51.gemfile
18
+ - gemfiles/rails52.gemfile
19
+ - gemfiles/rails60.gemfile
20
+ - gemfiles/rails61.gemfile
21
+ include:
22
+ - gemfile: gemfiles/rails71.gemfile
23
+ ruby-version: 3.2.2
24
+ - gemfile: gemfiles/rails71.gemfile
25
+ ruby-version: 3.1.1
26
+ - gemfile: gemfiles/rails70.gemfile
27
+ ruby-version: 3.1.1
28
+ - gemfile: gemfiles/rails70.gemfile
29
+ ruby-version: 3.0.3
30
+ - gemfile: gemfiles/rails61.gemfile
31
+ ruby-version: 3.0.3
32
+
33
+ steps:
34
+ - uses: actions/checkout@v2
35
+ with:
36
+ submodules: recursive
37
+
38
+ - name: Start Redis
39
+ uses: supercharge/redis-github-action@1.1.0
40
+ with:
41
+ redis-version: 4
42
+
43
+ - name: Setup Ruby > 2.0
44
+ uses: ruby/setup-ruby@v1
45
+ if: ${{ matrix.ruby-version != '2.0.0' }}
46
+ with:
47
+ ruby-version: ${{ matrix.ruby-version }}
48
+
49
+ - name: Rails 4.2 ensure bundler version
50
+ if: ${{ matrix.gemfile == 'gemfiles/rails42.gemfile' }}
51
+ run: |
52
+ gem uninstall bundler
53
+ gem install bundler -v '< 2.0.0'
54
+
55
+ - name: Bundle Install
56
+ run: |
57
+ export BUNDLE_GEMFILE=${{ matrix.gemfile }}
58
+ bundle config path vendor/bundle
59
+ bundle config gemfile ${{ matrix.gemfile }}
60
+ bundle install --jobs 4 --retry 3
61
+
62
+ - name: Rspec
63
+ run: |
64
+ export BUNDLE_GEMFILE=${{ matrix.gemfile }}
65
+ bundle config path vendor/bundle
66
+ bundle config gemfile ${{ matrix.gemfile }}
67
+ bundle exec rspec
data/.gitignore CHANGED
@@ -23,4 +23,6 @@ tmp
23
23
  .ruby-version
24
24
  .byebug_history
25
25
 
26
- gemfiles/vendor
26
+ gemfiles/vendor
27
+
28
+ vendor
data/.rubocop.yml CHANGED
@@ -1,21 +1,220 @@
1
+ require: rubocop-performance
2
+
1
3
  AllCops:
2
4
  Exclude:
3
5
  - 'vendor/**/*'
4
6
  - 'gemfiles/vendor/**/*'
7
+ - 'spec/dummyapp/**/*'
8
+ - 'spec/tmp/**/*'
9
+ TargetRubyVersion: 2.5 # This is the minimum allowed for current rubocop
5
10
 
6
- Style/HashSyntax:
7
- EnforcedStyle: hash_rockets
8
- SupportedStyles:
9
- - hash_rockets
11
+ Gemspec/RequiredRubyVersion:
12
+ Enabled: false # rubocop compares to gemspec, yet won't allow 1.9 as minimum version
13
+
14
+ Layout/HeredocIndentation:
15
+ # When enabled, forces either squiggly syntax (not available until 2.3),
16
+ # or external packages that we don't want as dependencies.
17
+ Enabled: false
18
+
19
+ Layout/LineLength:
20
+ Max: 90
21
+
22
+ Lint/SendWithMixinArgument:
23
+ # Object#include is still a private method in Ruby 2.0.
24
+ Enabled: false
25
+
26
+ Metrics/BlockLength:
27
+ ExcludedMethods: ['describe', 'context'] # RSpec DSL is expected to have long blocks.
28
+
29
+ Metrics/MethodLength:
30
+ Max: 15 # Relax slightly from the default of 10
10
31
 
11
- Metrics/LineLength:
12
- Max: 1000
32
+ Naming/MethodParameterName:
33
+ # It's possible to configure this cop to allow just about anything, but what's the point.
34
+ # The default min length of a param name is 3, but the the default whitelist includes things
35
+ # like `db` and `io`. So, short names really can be useful.
36
+ Enabled: false
37
+
38
+ Style/CaseEquality:
39
+ # The code uses `===` a lot to compare a regex to a string, but it's not clear that
40
+ # switching to `=~` is always safe, because in some cases the value could be a regex
41
+ # or a string and `str1 =~ str2` isn't valid. Whoever enables this cop should carefully
42
+ # review and test each of these.
43
+ Enabled: false
44
+
45
+ Style/Documentation:
46
+ # We can enabled this if/when we want to start doing consistent class documentation.
47
+ # As is, we currently add :nodoc: if anything at all.
48
+ Enabled: false
13
49
 
14
50
  Style/DoubleNegation:
15
51
  Enabled: false
16
52
 
53
+ Style/EachWithObject:
54
+ Enabled: false
55
+
56
+ Style/Encoding:
57
+ Enabled: false # Ruby 1.9.3 needs these magic comments, e.g. # encoding: UTF-8
58
+
59
+ Style/ExpandPathArguments:
60
+ Enabled: false # syntax requires Ruby >= 2.0
61
+
62
+ Style/FrozenStringLiteralComment:
63
+ # If we do this, it will be in its own PR. It requires adding these magic comments
64
+ # throughout the project, in order to prepare for a future Ruby 3.x.
65
+ Enabled: false
66
+
67
+ Style/HashSyntax:
68
+ EnforcedStyle: no_mixed_keys
69
+ SupportedStyles:
70
+ - no_mixed_keys
71
+
17
72
  Style/Lambda:
18
73
  Enabled: false
19
74
 
20
- Style/EachWithObject:
75
+ Style/PercentLiteralDelimiters:
76
+ PreferredDelimiters:
77
+ # rubocop switched from () to [] at some past version.
78
+ # Make sure we are consistent across all bundles/builds.
79
+ default: '[]'
80
+
81
+ Style/RedundantBegin:
82
+ # Ruby < 2.5 needs begin/end inside blocks when using rescue
21
83
  Enabled: false
84
+
85
+ Style/SafeNavigation:
86
+ # Not available in Ruby < 2.3.
87
+ Enabled: false
88
+
89
+ Style/SymbolArray:
90
+ Enabled: false # %i[] syntax isn't 1.9.x compatible
91
+
92
+ #
93
+ # Performance cops are opt in, and `Enabled: true` is always required.
94
+ # Full list is here: https://github.com/rubocop-hq/rubocop-performance/tree/master/lib/rubocop/cop/performance
95
+ # For travis builds, Codacy will see and use these directives.
96
+ #
97
+ Performance/Caller:
98
+ Enabled: true
99
+ Exclude:
100
+ - spec/**/*
101
+
102
+ Performance/CaseWhenSplat:
103
+ Enabled: true
104
+ Exclude:
105
+ - spec/**/*
106
+
107
+ Performance/Casecmp:
108
+ Enabled: true
109
+ Exclude:
110
+ - spec/**/*
111
+
112
+ Performance/ChainArrayAllocation:
113
+ Enabled: true
114
+ Exclude:
115
+ - spec/**/*
116
+
117
+ Performance/CompareWithBlock:
118
+ Enabled: true
119
+ Exclude:
120
+ - spec/**/*
121
+
122
+ Performance/Count:
123
+ Enabled: true
124
+ Exclude:
125
+ - spec/**/*
126
+
127
+ Performance/Detect:
128
+ Enabled: true
129
+ Exclude:
130
+ - spec/**/*
131
+
132
+ Performance/DoubleStartEndWith:
133
+ Enabled: true
134
+ Exclude:
135
+ - spec/**/*
136
+
137
+ Performance/EndWith:
138
+ Enabled: true
139
+ Exclude:
140
+ - spec/**/*
141
+
142
+ Performance/FixedSize:
143
+ Enabled: true
144
+ Exclude:
145
+ - spec/**/*
146
+
147
+ Performance/FlatMap:
148
+ Enabled: true
149
+ Exclude:
150
+ - spec/**/*
151
+
152
+ Performance/InefficientHashSearch:
153
+ Enabled: true
154
+ Exclude:
155
+ - spec/**/*
156
+
157
+ Performance/OpenStruct:
158
+ Enabled: true
159
+ Exclude:
160
+ - spec/**/*
161
+
162
+ Performance/RangeInclude:
163
+ Enabled: true
164
+ Exclude:
165
+ - spec/**/*
166
+
167
+ Performance/RedundantBlockCall:
168
+ Enabled: true
169
+ Exclude:
170
+ - spec/**/*
171
+
172
+ Performance/RedundantMatch:
173
+ Enabled: true
174
+ Exclude:
175
+ - spec/**/*
176
+
177
+ Performance/RedundantMerge:
178
+ Enabled: true
179
+ Exclude:
180
+ - spec/**/*
181
+
182
+ Performance/RegexpMatch:
183
+ Enabled: true
184
+ Exclude:
185
+ - spec/**/*
186
+
187
+ Performance/ReverseEach:
188
+ Enabled: true
189
+ Exclude:
190
+ - spec/**/*
191
+
192
+ Performance/Size:
193
+ Enabled: true
194
+ Exclude:
195
+ - spec/**/*
196
+
197
+ Performance/StartWith:
198
+ Enabled: true
199
+ Exclude:
200
+ - spec/**/*
201
+
202
+ Performance/StringReplacement:
203
+ Enabled: true
204
+ Exclude:
205
+ - spec/**/*
206
+
207
+ Performance/TimesMap:
208
+ Enabled: true
209
+ Exclude:
210
+ - spec/**/*
211
+
212
+ Performance/UnfreezeString:
213
+ Enabled: true
214
+ Exclude:
215
+ - spec/**/*
216
+
217
+ Performance/UriDefaultParser:
218
+ Enabled: true
219
+ Exclude:
220
+ - spec/**/*
data/Appraisals CHANGED
@@ -1,19 +1,19 @@
1
- appraise "rails30" do
2
- gem "rails", "3.0.20"
1
+ appraise 'rails30' do
2
+ gem 'rails', '3.0.20'
3
3
  end
4
4
 
5
- appraise "rails31" do
6
- gem "rails", "3.1.12"
5
+ appraise 'rails31' do
6
+ gem 'rails', '3.1.12'
7
7
  end
8
8
 
9
- appraise "rails32" do
10
- gem "rails", "3.2.21"
9
+ appraise 'rails32' do
10
+ gem 'rails', '3.2.21'
11
11
  end
12
12
 
13
- appraise "rails40" do
14
- gem "rails", "4.0.13"
13
+ appraise 'rails40' do
14
+ gem 'rails', '4.0.13'
15
15
  end
16
16
 
17
- appraise "rails41" do
18
- gem "rails", "4.1.9"
17
+ appraise 'rails41' do
18
+ gem 'rails', '4.1.9'
19
19
  end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,259 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.16.0 and above
4
+
5
+ For changes in version 2.16 and above, the change log has moved to this repo's [GitHub Releases Page](https://github.com/rollbar/rollbar-gem/releases)
6
+
7
+ ## 2.15.6
8
+ - Update rollbar.js snippet to `v2.3.8` [#680](https://github.com/rollbar/rollbar-gem/issues/680)
9
+ - Update `delayed_job` dependency to `4.1.3` [#672](https://github.com/rollbar/rollbar-gem/issues/672)
10
+ - Add rollbar.js snippet on all responses regardless of status code [#664](https://github.com/rollbar/rollbar-gem/issues/664)
11
+ - Add documentation for `sinatra/namespace` vs `rake` conflict to `README.md` [#663](https://github.com/rollbar/rollbar-gem/issues/663)
12
+ - Add `aws-sdk-sqs` gem dependency [#659](https://github.com/rollbar/rollbar-gem/issues/659)
13
+ - Upgrade `rails` gem dependency to `4.2.7.1` [#656](https://github.com/rollbar/rollbar-gem/issues/656)
14
+ - Add documentation note for usage of `Rollbar.scope!` to `README.md` [#653](https://github.com/rollbar/rollbar-gem/issues/653)
15
+ - Add example of using `Grape` to deal with `500` responses status [#645](https://github.com/rollbar/rollbar-gem/issues/645)
16
+ - Always report errors from `delayed_job` to deal with `dj_threshold > 0` edge case [#615](https://github.com/rollbar/rollbar-gem/issues/615)
17
+ - Fix "Empty message" items for exceptions reported from JRuby [#658]
18
+
19
+ ## 2.15.5
20
+
21
+ - Support proxies [#626](https://github.com/rollbar/rollbar-gem/pull/626)
22
+
23
+ ## 2.15.4
24
+
25
+ - Fix bug related to dup'ing extra passed in data
26
+
27
+ ## 2.15.3
28
+
29
+ - Fix a bug when host is nil when we are trying to extract data about a request
30
+ [#637](https://github.com/rollbar/rollbar-gem/pull/637).
31
+ - Make a copy of extra data passed in so we don't modify frozen objects
32
+ [#638](https://github.com/rollbar/rollbar-gem/pull/638)
33
+
34
+ ## 2.15.2
35
+
36
+ - Fix how person data is injected into javascript
37
+
38
+ ## 2.15.1
39
+
40
+ - Update rollbar.js to v2.2.3 [#630](https://github.com/rollbar/rollbar-gem/pull/630)
41
+ - allow csp opt out [#629](https://github.com/rollbar/rollbar-gem/pull/629)
42
+ - Fix: [#472](https://github.com/rollbar/rollbar-gem/issues/472)
43
+ - Ignore empty ROLLBAR_ENV [#604](https://github.com/rollbar/rollbar-gem/pull/604)
44
+ - Shoryuken gem support [#576](https://github.com/rollbar/rollbar-gem/pull/576)
45
+ - support new sidekiq context structure [#598](https://github.com/rollbar/rollbar-gem/pull/598)
46
+
47
+ ## 2.15.0
48
+
49
+ Features:
50
+
51
+ - Support person data in rollbar.js. See [#602](https://github.com/rollbar/rollbar-gem/pull/602).
52
+ - Update rollbar.js to v2.0.4. See [#600](https://github.com/rollbar/rollbar-gem/pull/600).
53
+ - Add Configuration#use_exception_level_filters option. See [#588](https://github.com/rollbar/rollbar-gem/pull/588).
54
+
55
+ Fixes:
56
+
57
+ - get session from env instead of request. See [#586](https://github.com/rollbar/rollbar-gem/pull/586).
58
+ - If multiple forwarded hosts are present in the headers, use the first. See [#582](https://github.com/rollbar/rollbar-gem/pull/582).
59
+ - Replace present? call with plain ruby alternative. See [#579](https://github.com/rollbar/rollbar-gem/pull/579).
60
+
61
+ Others:
62
+ - Codacy cleanup. See [#599](https://github.com/rollbar/rollbar-gem/pull/599).
63
+ - Remove warning on @root_notifier cause not initialized. See [#562](https://github.com/rollbar/rollbar-gem/pull/562).
64
+ - [Docs] I think you mean this. See [#596](https://github.com/rollbar/rollbar-gem/pull/596).
65
+ - Fix syntax error in code example. See [#581](https://github.com/rollbar/rollbar-gem/pull/581).
66
+
67
+
68
+ ## 2.14.1
69
+
70
+ - Add host as a configuration options. See [#560](https://github.com/rollbar/rollbar-gem/pull/560).
71
+ - Scrub all values based on matched keys set in the configuration rather than only string values.
72
+ See [#567](https://github.com/rollbar/rollbar-gem/pull/567).
73
+ - Allow for a specification of the name of the queue for delayed_job. See
74
+ [#574](https://github.com/rollbar/rollbar-gem/pull/574).
75
+
76
+ ## 2.14.0
77
+
78
+ Features:
79
+
80
+ - Add Rollbar::Middleware::Rack. See [#558](https://github.com/rollbar/rollbar-gem/pull/558).
81
+ - Send request body on DELETE request. See [#555](https://github.com/rollbar/rollbar-gem/pull/555).
82
+
83
+ Fixes:
84
+
85
+ - Fix validations plugin on Rails 5.0 with belong_to.See [#556](https://github.com/rollbar/rollbar-gem/pull/556).
86
+ - Remove few warnings when using minitest with rollbar installed. See [#557](https://github.com/rollbar/rollbar-gem/pull/557).
87
+ - Fix tests 1.9. See [#554](https://github.com/rollbar/rollbar-gem/pull/554).
88
+
89
+ Others:
90
+
91
+ - Updating readme. See [#552](https://github.com/rollbar/rollbar-gem/pull/552).
92
+ - Removed doctoc tag. See [#550](https://github.com/rollbar/rollbar-gem/pull/550).
93
+ - Adding info about Sidekiq and ActiveJob. See [#548](https://github.com/rollbar/rollbar-gem/pull/548).
94
+ - Fix wrong version number in Readme. See [#535](https://github.com/rollbar/rollbar-gem/pull/535).
95
+
96
+ ## 2.13.3
97
+
98
+ - Fix undefined variable name in rollbar.js middleware. See [#537](https://github.com/rollbar/rollbar-gem/pull/537).
99
+
100
+ ## 2.13.2
101
+
102
+ Fixes:
103
+
104
+ - Fix URL scrubbing with spaces in the query. See [#532](https://github.com/rollbar/rollbar-gem/pull/532).
105
+ - Use :use_exception_level_filters in ActiveJob plugin. See [#533](https://github.com/rollbar/rollbar-gem/pull/533).
106
+
107
+ Other:
108
+
109
+ - Add docs for custom scrubbing with transform hook. See [#526](https://github.com/rollbar/rollbar-gem/pull/526).
110
+
111
+ ## 2.13.1
112
+
113
+ Fixes:
114
+
115
+ - Inherit test controller from ActionController::Base
116
+ - Fix test rake task when Rack::MockRequest is not defined
117
+ - Fix docs for Sinatra middleware
118
+ - Fix few basic rubocop offenses
119
+
120
+ ## 2.13.0
121
+
122
+ Features:
123
+ - Allow to override config. See [#519](https://github.com/rollbar/rollbar-gem/pull/519).
124
+ - Send code and context frame data. See [#523](https://github.com/rollbar/rollbar-gem/pull/523).
125
+ - Send GET, POST and raw body in their correct place. See [#522](https://github.com/rollbar/rollbar-gem/pull/522).
126
+ - Increase max payload from 128kb to 512kb. See [#521](https://github.com/rollbar/rollbar-gem/pull/521).
127
+ - Add resque-rollbar functionality to the gem. See [#516](https://github.com/rollbar/rollbar-gem/pull/516).
128
+ - Send custom.orig_host and custom.orig_uuid on too large payloads. See [#518](https://github.com/rollbar/rollbar-gem/pull/518).
129
+ - Add Content-Length and Content-Type headers to the reports. See [#513](https://github.com/rollbar/rollbar-gem/pull/513).
130
+
131
+ Bug fixes:
132
+ - SecureHeaders fixes. See [#478](https://github.com/rollbar/rollbar-gem/pull/478).
133
+ - Include validations plugin in activerecord base. See [#503](https://github.com/rollbar/rollbar-gem/pull/503).
134
+ - Require tempfile and use ::Tempfile. See [#514](https://github.com/rollbar/rollbar-gem/pull/514).
135
+ - Extract correct client IP from X-Forwarded-For header. See [#515](https://github.com/rollbar/rollbar-gem/pull/515).
136
+ - Delayed job fix on job serialization. See [#512](https://github.com/rollbar/rollbar-gem/pull/512).
137
+
138
+ Others:
139
+ - Fix tests on rails40 and ruby 1.8.7. See [#485](https://github.com/rollbar/rollbar-gem/pull/485).
140
+ - Move log methods to public section. See [#498](https://github.com/rollbar/rollbar-gem/pull/498).
141
+ - Change rails50.gemfile to use Rails 5.0.0. See [#495](https://github.com/rollbar/rollbar-gem/pull/495).
142
+ - Update CHANGELOG.md to fix incorrect links. See [#502](https://github.com/rollbar/rollbar-gem/pull/502).
143
+ - Improve Rake support to avoid conflicts with other services. See [#517](https://github.com/rollbar/rollbar-gem/pull/517).
144
+ - Make Codeclimate happier with Rollbar::Middlware::Js. See [#520](https://github.com/rollbar/rollbar-gem/pull/520).
145
+
146
+
147
+ ## 2.12.0
148
+
149
+ Features:
150
+
151
+ - Scrub sidekiq params if needed
152
+ - Prepare rake task for non Rails frameworks
153
+
154
+ Others:
155
+ - Typo on README.md
156
+ - Add documentation for plugins architecture in docs/plugins.md
157
+
158
+ ## 2.11.5
159
+
160
+ Bugf ixes:
161
+
162
+ - Use require_dependency for rake and sidekiq plugins. See [#485](https://github.com/rollbar/rollbar-gem/pull/485).
163
+ - Add immediate ActiveModel::Validations monkey patch. See [#484](https://github.com/rollbar/rollbar-gem/pull/484).
164
+ - Pass correct options to Item.build_with. See [#480](https://github.com/rollbar/rollbar-gem/pull/480).
165
+
166
+ Documentation:
167
+
168
+ - Update exception filter heading and TOC. See [#481](https://github.com/rollbar/rollbar-gem/pull/481).
169
+ - Add advanced usage of exception filters in readme. See [#477](https://github.com/rollbar/rollbar-gem/pull/477).
170
+
171
+
172
+ ## 2.11.4
173
+
174
+ Change:
175
+
176
+ - Update rollbar.js snippet
177
+
178
+ ## 2.11.3
179
+
180
+ Fix:
181
+
182
+ - Don't rely on #as_json for delayed_job payload_object. See [#463](https://github.com/rollbar/rollbar-gem/pull/463).
183
+
184
+ ## 2.11.2
185
+
186
+ Fix:
187
+
188
+ - Fix active_model require in validations plugin. See [#461](https://github.com/rollbar/rollbar-gem/pull/461).
189
+
190
+ ## 2.11.1
191
+
192
+ Bug fixes:
193
+
194
+ - Don't return inside a Proc object in rollbar.js plugin. See [#458](https://github.com/rollbar/rollbar-gem/pull/458).
195
+
196
+ ## 2.11.0
197
+
198
+ New features:
199
+
200
+ - Rollbar.js support with SecureHeaders 2.0. See [#448](https://github.com/rollbar/rollbar-gem/pull/448).
201
+ - Inject extensions in ActiveModel::Validations instead of ActiveRecord::Base. See [#445](https://github.com/rollbar/rollbar-gem/pull/445).
202
+
203
+ Bug fixes:
204
+
205
+ - Fix URL scrubbing and change to a functional object. See [#454](https://github.com/rollbar/rollbar-gem/pull/454).
206
+ - Allow any argument for BasicSocket#as_json. See [#455](https://github.com/rollbar/rollbar-gem/pull/455).
207
+ - Retry request on network timeouts. See [#453](https://github.com/rollbar/rollbar-gem/pull/453).
208
+
209
+ Refactors and others:
210
+
211
+ - Refactor Item payload building. See [#452](https://github.com/rollbar/rollbar-gem/pull/452).
212
+ - Mock the requests to Rollbar API. See [#450](https://github.com/rollbar/rollbar-gem/pull/450).
213
+ - Add plugins architecture. See [#438](https://github.com/rollbar/rollbar-gem/pull/438).
214
+ - Add TOC for README.md. See [#444](https://github.com/rollbar/rollbar-gem/pull/444).
215
+
216
+ ## 2.10.0
217
+
218
+ New features:
219
+
220
+ - Set the Sidekiq error context to the worker class name. See [#440](https://github.com/rollbar/rollbar-gem/pull/440).
221
+ - Secure headers support for rollbar.js integration. See [#437](https://github.com/rollbar/rollbar-gem/pull/437).
222
+ - Rails 5 support. See [#433](https://github.com/rollbar/rollbar-gem/pull/433).
223
+ - Add scrub all parameters option. See [#431](https://github.com/rollbar/rollbar-gem/pull/431).
224
+ - Add delayed_job async handler. See [#430](https://github.com/rollbar/rollbar-gem/pull/430).
225
+ - Disable logging if Rollbar is disabled. See [#425](https://github.com/rollbar/rollbar-gem/pull/425).
226
+
227
+ Bug fixes:
228
+
229
+ - Add nil check for rake.patch! for future robustness. See [#434](https://github.com/rollbar/rollbar-gem/pull/434).
230
+ - Fix two doc bugs. See [#401](https://github.com/rollbar/rollbar-gem/pull/401).
231
+
232
+ ## 2.9.1
233
+
234
+ Bug fixes:
235
+
236
+ - Fix Sidekiq support for version > 3.x. Thanks @phlipper. See [#423](https://github.com/rollbar/rollbar-gem/pull/423).
237
+
238
+ ## 2.9.0
239
+
240
+ Bug fixes:
241
+
242
+ - Clean scope before every Sidekiq job execution. See [#421](https://github.com/rollbar/rollbar-gem/pull/421).
243
+ - Threads reaper. See [#418](https://github.com/rollbar/rollbar-gem/pull/418).
244
+
245
+ New features:
246
+ - Rollbar logger. See [#417](https://github.com/rollbar/rollbar-gem/pull/417).
247
+
248
+ Others:
249
+ - Fix dependencies. See [#402](https://github.com/rollbar/rollbar-gem/pull/402).
250
+ - Use mime-types < 3.0 for RUBY < 2.0. See [#420](https://github.com/rollbar/rollbar-gem/pull/420).
251
+ - Add .codeclimate.yml. See [#409](https://github.com/rollbar/rollbar-gem/pull/409).
252
+ - Use SimpleCov with CodeClimate formatter. See [#408](https://github.com/rollbar/rollbar-gem/pull/408).
253
+ - Setup CodeClimate coverage. See [#407](https://github.com/rollbar/rollbar-gem/pull/407).
254
+ - Typo in the transform hook documentation. See [#406](https://github.com/rollbar/rollbar-gem/pull/406).
255
+
256
+
3
257
  ## 2.8.3
4
258
 
5
259
  Bug fixes:
@@ -89,8 +343,8 @@ Features
89
343
 
90
344
  Bug fixes:
91
345
 
92
- - Use ACCEPT header to check json requests. See [#328](https://github.com/rollbar/rollbar-gem/pull/333)
93
- - Fix URL scrubbing when using a malformed URL. See [#328](https://github.com/rollbar/rollbar-gem/pull/332)
346
+ - Use ACCEPT header to check json requests. See [#333](https://github.com/rollbar/rollbar-gem/pull/333)
347
+ - Fix URL scrubbing when using a malformed URL. See [#332](https://github.com/rollbar/rollbar-gem/pull/332)
94
348
 
95
349
  ## 2.5.1
96
350
 
@@ -127,7 +381,7 @@ Documentation:
127
381
 
128
382
  Bug fixes:
129
383
 
130
- - Remove better errors hook. This was causing to report twice the errors. See [#313](https://github.com/rollbar/rollbar-gem/pull/300)
384
+ - Remove better errors hook. This was causing to report twice the errors. See [#313](https://github.com/rollbar/rollbar-gem/pull/313)
131
385
 
132
386
 
133
387
  ## 2.3.0