rollbar 3.3.0 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +15 -6
- data/.github/workflows/ci.yml +16 -67
- data/.rubocop.yml +1 -32
- data/Gemfile +9 -11
- data/README.md +24 -2
- data/data/rollbar.snippet.js +1 -1
- data/docs/configuration.md +2 -2
- data/gemfiles/rails50.gemfile +0 -2
- data/gemfiles/rails51.gemfile +0 -2
- data/gemfiles/rails52.gemfile +4 -6
- data/gemfiles/rails60.gemfile +4 -6
- data/gemfiles/rails61.gemfile +5 -7
- data/gemfiles/rails70.gemfile +52 -0
- data/gemfiles/rails71.gemfile +52 -0
- data/lib/rails/rollbar_runner.rb +1 -19
- data/lib/rollbar/configuration.rb +1 -1
- data/lib/rollbar/encoding.rb +2 -7
- data/lib/rollbar/item/locals.rb +2 -0
- data/lib/rollbar/middleware/js/json_value.rb +15 -5
- data/lib/rollbar/middleware/js.rb +4 -4
- data/lib/rollbar/middleware/rails/show_exceptions.rb +7 -2
- data/lib/rollbar/notifier/trace_with_bindings.rb +9 -1
- data/lib/rollbar/plugins/active_job.rb +4 -0
- data/lib/rollbar/plugins/sidekiq/plugin.rb +2 -1
- data/lib/rollbar/plugins/sidekiq.rb +1 -1
- data/lib/rollbar/request_data_extractor.rb +10 -3
- data/lib/rollbar/version.rb +1 -1
- data/rollbar.gemspec +1 -1
- metadata +13 -14
- data/gemfiles/rails30.gemfile +0 -51
- data/gemfiles/rails31.gemfile +0 -51
- data/gemfiles/rails32.gemfile +0 -53
- data/gemfiles/rails40.gemfile +0 -53
- data/gemfiles/rails41.gemfile +0 -49
- data/gemfiles/rails42.gemfile +0 -50
- data/lib/rollbar/encoding/legacy_encoder.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fccee4d8f496c152bca4e1bd0cd3c71831dedda32230fbd5815091d498bf60c
|
4
|
+
data.tar.gz: 7a46b0396b809d8837a0891821f3b0dfd348daad1b6d39a2691afd519901e380
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dac247751b7b78289210aa82bc4508fe31483e758d47f345b9db01811553a745b6a508bbd93a11e10a5349dd8441c7b118d884b421ccb5985b99edd5f2814805
|
7
|
+
data.tar.gz: aa7197048fa8a4eae1080fa6ac794cb8ab301862893488636012113f119b59023c38bf395d1f2d45abacfee3d7ff81e96f7be2896614a8f4835340f60594a456
|
@@ -1,14 +1,23 @@
|
|
1
1
|
## Description of the change
|
2
2
|
|
3
|
-
>
|
3
|
+
> Please include a summary of the change and which issues are fixed.
|
4
|
+
> Please also include relevant motivation and context.
|
5
|
+
|
4
6
|
## Type of change
|
7
|
+
|
5
8
|
- [ ] Bug fix (non-breaking change that fixes an issue)
|
6
9
|
- [ ] New feature (non-breaking change that adds functionality)
|
7
10
|
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
11
|
+
- [ ] Maintenance
|
12
|
+
- [ ] New release
|
8
13
|
|
9
14
|
## Related issues
|
10
15
|
|
11
|
-
>
|
16
|
+
> Shortcut stories and GitHub issues (delete irrelevant)
|
17
|
+
|
18
|
+
- Fix [SC-]
|
19
|
+
- Fix #1
|
20
|
+
|
12
21
|
## Checklists
|
13
22
|
|
14
23
|
### Development
|
@@ -17,9 +26,9 @@
|
|
17
26
|
- [ ] The code changed/added as part of this pull request has been covered with tests
|
18
27
|
- [ ] All tests related to the changed code pass in development
|
19
28
|
|
20
|
-
### Code review
|
29
|
+
### Code review
|
21
30
|
|
22
|
-
- [ ]
|
23
|
-
- [ ] "Ready for review" label attached to the PR and reviewers
|
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
|
24
34
|
- [ ] Changes have been reviewed by at least one other engineer
|
25
|
-
- [ ] Issue from task tracker has a link to this pull request
|
data/.github/workflows/ci.yml
CHANGED
@@ -8,67 +8,27 @@ on:
|
|
8
8
|
|
9
9
|
jobs:
|
10
10
|
build:
|
11
|
-
runs-on: ubuntu-
|
11
|
+
runs-on: ubuntu-22.04
|
12
12
|
strategy:
|
13
13
|
matrix:
|
14
|
-
ruby-version: [2.
|
14
|
+
ruby-version: [2.5.3, 2.6.0, 2.6.6, 2.7.2]
|
15
15
|
gemfile:
|
16
|
-
- gemfiles/rails42.gemfile
|
17
16
|
- gemfiles/rails50.gemfile
|
18
17
|
- gemfiles/rails51.gemfile
|
19
18
|
- gemfiles/rails52.gemfile
|
20
19
|
- gemfiles/rails60.gemfile
|
21
20
|
- gemfiles/rails61.gemfile
|
22
|
-
exclude:
|
23
|
-
- gemfile: gemfiles/rails42.gemfile
|
24
|
-
ruby-version: 2.7.2
|
25
|
-
- gemfile: gemfiles/rails42.gemfile
|
26
|
-
ruby-version: 2.6.0
|
27
|
-
- gemfile: gemfiles/rails42.gemfile
|
28
|
-
ruby-version: 2.6.6
|
29
|
-
- gemfile: gemfiles/rails42.gemfile
|
30
|
-
ruby-version: 2.7.2
|
31
|
-
- gemfile: gemfiles/rails52.gemfile
|
32
|
-
ruby-version: 2.2.10
|
33
|
-
- gemfile: gemfiles/rails60.gemfile
|
34
|
-
ruby-version: 2.2.10
|
35
|
-
- gemfile: gemfiles/rails60.gemfile
|
36
|
-
ruby-version: 2.3.0
|
37
|
-
- gemfile: gemfiles/rails60.gemfile
|
38
|
-
ruby-version: 2.3.8
|
39
|
-
- gemfile: gemfiles/rails60.gemfile
|
40
|
-
ruby-version: 2.4.5
|
41
|
-
- gemfile: gemfiles/rails61.gemfile
|
42
|
-
ruby-version: 2.2.10
|
43
|
-
- gemfile: gemfiles/rails61.gemfile
|
44
|
-
ruby-version: 2.3.0
|
45
|
-
- gemfile: gemfiles/rails61.gemfile
|
46
|
-
ruby-version: 2.3.8
|
47
|
-
- gemfile: gemfiles/rails61.gemfile
|
48
|
-
ruby-version: 2.4.5
|
49
21
|
include:
|
50
|
-
- gemfile: gemfiles/
|
51
|
-
ruby-version: 2.
|
52
|
-
- gemfile: gemfiles/
|
53
|
-
ruby-version:
|
54
|
-
- gemfile: gemfiles/
|
55
|
-
ruby-version:
|
56
|
-
- gemfile: gemfiles/
|
57
|
-
ruby-version:
|
58
|
-
- gemfile: gemfiles/rails40.gemfile
|
59
|
-
ruby-version: 2.2.10
|
60
|
-
- gemfile: gemfiles/rails40.gemfile
|
61
|
-
ruby-version: 2.1.9
|
62
|
-
- gemfile: gemfiles/rails32.gemfile
|
63
|
-
ruby-version: 2.2.10
|
64
|
-
- gemfile: gemfiles/rails32.gemfile
|
65
|
-
ruby-version: 2.1.9
|
66
|
-
- gemfile: gemfiles/rails31.gemfile
|
67
|
-
ruby-version: 2.0.0
|
68
|
-
- gemfile: gemfiles/rails30.gemfile
|
69
|
-
ruby-version: 2.0.0
|
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
|
70
30
|
- gemfile: gemfiles/rails61.gemfile
|
71
|
-
ruby-version: 3.0.
|
31
|
+
ruby-version: 3.0.3
|
72
32
|
|
73
33
|
steps:
|
74
34
|
- uses: actions/checkout@v2
|
@@ -86,21 +46,6 @@ jobs:
|
|
86
46
|
with:
|
87
47
|
ruby-version: ${{ matrix.ruby-version }}
|
88
48
|
|
89
|
-
- name: Setup Ruby 2.0.0
|
90
|
-
if: ${{ matrix.ruby-version == '2.0.0' }}
|
91
|
-
timeout-minutes: 15
|
92
|
-
run: |
|
93
|
-
sudo apt-get update -y
|
94
|
-
sudo apt-get install -y libssl1.0-dev
|
95
|
-
wget http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p648.tar.gz
|
96
|
-
tar xvfz ruby-2.0.0-p648.tar.gz
|
97
|
-
cd ruby-2.0.0-p648
|
98
|
-
./configure && make && sudo make install-nodoc
|
99
|
-
|
100
|
-
- name: Ruby 2.0.0, install bundler
|
101
|
-
if: ${{ matrix.ruby-version == '2.0.0' }}
|
102
|
-
run: sudo gem install bundler -v 1.17.3
|
103
|
-
|
104
49
|
- name: Rails 4.2 ensure bundler version
|
105
50
|
if: ${{ matrix.gemfile == 'gemfiles/rails42.gemfile' }}
|
106
51
|
run: |
|
@@ -115,4 +60,8 @@ jobs:
|
|
115
60
|
bundle install --jobs 4 --retry 3
|
116
61
|
|
117
62
|
- name: Rspec
|
118
|
-
run:
|
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/.rubocop.yml
CHANGED
@@ -19,27 +19,16 @@ Layout/HeredocIndentation:
|
|
19
19
|
Layout/LineLength:
|
20
20
|
Max: 90
|
21
21
|
|
22
|
-
Lint/ConstantDefinitionInBlock:
|
23
|
-
# We routinely update existing class definitions in conditional blocks.
|
24
|
-
Enabled: false
|
25
|
-
|
26
22
|
Lint/SendWithMixinArgument:
|
27
23
|
# Object#include is still a private method in Ruby 2.0.
|
28
24
|
Enabled: false
|
29
25
|
|
30
26
|
Metrics/BlockLength:
|
31
|
-
# RSpec DSL is expected to have long blocks.
|
32
|
-
IgnoredMethods: ['describe', 'context', 'it', 'shared_examples']
|
27
|
+
ExcludedMethods: ['describe', 'context'] # RSpec DSL is expected to have long blocks.
|
33
28
|
|
34
29
|
Metrics/MethodLength:
|
35
30
|
Max: 15 # Relax slightly from the default of 10
|
36
31
|
|
37
|
-
Metrics/ParameterLists:
|
38
|
-
# We currently don't have limits on the number of method arguments, except as
|
39
|
-
# they contribute to the complexity metric. If method complexity is in bounds,
|
40
|
-
# we allow any number of arguments.
|
41
|
-
Enabled: false
|
42
|
-
|
43
32
|
Naming/MethodParameterName:
|
44
33
|
# It's possible to configure this cop to allow just about anything, but what's the point.
|
45
34
|
# The default min length of a param name is 3, but the the default whitelist includes things
|
@@ -80,29 +69,9 @@ Style/HashSyntax:
|
|
80
69
|
SupportedStyles:
|
81
70
|
- hash_rockets
|
82
71
|
|
83
|
-
Style/HashTransformKeys:
|
84
|
-
# Hash#transform_keys isn't available until Ruby 2.5
|
85
|
-
Enabled: false
|
86
|
-
|
87
72
|
Style/Lambda:
|
88
73
|
Enabled: false
|
89
74
|
|
90
|
-
Style/NumericPredicate:
|
91
|
-
# Numbers used in comparison expressions are often more readable and consistent
|
92
|
-
# than using predicate methods. e.g.
|
93
|
-
# major > 0 && minor > 8
|
94
|
-
# is more readable than
|
95
|
-
# major.positive? && minor > 8
|
96
|
-
Enabled: false
|
97
|
-
|
98
|
-
Style/OptionalBooleanParameter:
|
99
|
-
# We don't yet generally use keyword arguments. Ruby < 2.1 doesn't support
|
100
|
-
# required kayword arguments. And satifying this rule would change the calling
|
101
|
-
# convention only for these specific optional boolean arguments.
|
102
|
-
# This rule should be enabled when the project is updated to use keyword
|
103
|
-
# arguments in general.
|
104
|
-
Enabled: false
|
105
|
-
|
106
75
|
Style/PercentLiteralDelimiters:
|
107
76
|
PreferredDelimiters:
|
108
77
|
# rubocop switched from () to [] at some past version.
|
data/Gemfile
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
# This
|
1
|
+
# This Gemfile is compatible with Ruby 2.5.0 or greater. To test with
|
2
|
+
# earlier Rubies, use the appropriate Gemfile from the ./gemfiles/ dir.
|
3
|
+
ruby '3.2.2'
|
2
4
|
|
3
5
|
source 'https://rubygems.org'
|
4
6
|
|
@@ -11,7 +13,7 @@ ENV['CURRENT_GEMFILE'] ||= __FILE__
|
|
11
13
|
|
12
14
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
|
13
15
|
|
14
|
-
GEMFILE_RAILS_VERSION = '~>
|
16
|
+
GEMFILE_RAILS_VERSION = '~> 7.1.0'.freeze
|
15
17
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
16
18
|
gem 'appraisal'
|
17
19
|
gem 'jruby-openssl', :platform => :jruby
|
@@ -19,8 +21,10 @@ gem 'rails', GEMFILE_RAILS_VERSION
|
|
19
21
|
gem 'rake'
|
20
22
|
if GEMFILE_RAILS_VERSION < '6.0'
|
21
23
|
gem 'rspec-rails', '~> 3.4'
|
22
|
-
|
24
|
+
elsif GEMFILE_RAILS_VERSION < '7.0'
|
23
25
|
gem 'rspec-rails', '~> 4.0.2'
|
26
|
+
else
|
27
|
+
gem 'rspec-rails', '~> 6.0.3'
|
24
28
|
end
|
25
29
|
|
26
30
|
if GEMFILE_RAILS_VERSION < '6.0'
|
@@ -29,11 +33,7 @@ else
|
|
29
33
|
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
|
30
34
|
end
|
31
35
|
|
32
|
-
|
33
|
-
gem 'sidekiq', '~> 2.13.0'
|
34
|
-
else
|
35
|
-
gem 'sidekiq', '>= 2.13.0'
|
36
|
-
end
|
36
|
+
gem 'sidekiq', '>= 6.4.0'
|
37
37
|
|
38
38
|
platforms :rbx do
|
39
39
|
gem 'minitest'
|
@@ -43,7 +43,6 @@ platforms :rbx do
|
|
43
43
|
end
|
44
44
|
|
45
45
|
gem 'capistrano', :require => false
|
46
|
-
gem 'codacy-coverage'
|
47
46
|
gem 'shoryuken'
|
48
47
|
gem 'simplecov'
|
49
48
|
gem 'sucker_punch', '~> 2.0'
|
@@ -69,8 +68,7 @@ else
|
|
69
68
|
gem 'delayed_job', '~> 4.1', :require => false
|
70
69
|
end
|
71
70
|
gem 'generator_spec'
|
72
|
-
gem '
|
73
|
-
gem 'redis'
|
71
|
+
gem 'redis', '<= 4.8.0'
|
74
72
|
gem 'resque', '< 2.0.0'
|
75
73
|
gem 'rubocop', '1.15.0', :require => false # pin specific version, update manually
|
76
74
|
gem 'rubocop-performance', :require => false
|
data/README.md
CHANGED
@@ -1,13 +1,35 @@
|
|
1
|
-
|
1
|
+
<p align="center">
|
2
|
+
<img alt="rollbar-logo" src="https://user-images.githubusercontent.com/3300063/207964480-54eda665-d6fe-4527-ba51-b0ab3f41f10b.png" />
|
3
|
+
</p>
|
4
|
+
|
5
|
+
<h1 align="center">Rollbar Ruby Gem</h1>
|
6
|
+
|
7
|
+
<p align="center">
|
8
|
+
<strong>Proactively discover, predict, and resolve errors in real-time with <a href="https://rollbar.com">Rollbar’s</a> error monitoring platform. <a href="https://rollbar.com/signup/">Start tracking errors today</a>!</strong>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
|
2
12
|
![Build Status](https://github.com/rollbar/rollbar-gem/workflows/Rollbar-gem%20CI/badge.svg?tag=latest)
|
3
13
|
[![Gem Version](https://badge.fury.io/rb/rollbar.svg)](http://badge.fury.io/rb/rollbar)
|
4
14
|
[![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
15
|
|
6
16
|
|
17
|
+
---
|
18
|
+
|
7
19
|
[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.
|
8
20
|
|
9
21
|
Rollbar-gem is the SDK for Ruby apps and includes support for apps using Rails, Sinatra, Rack, plain Ruby, and other frameworks.
|
10
22
|
|
23
|
+
|
24
|
+
## Key benefits of using Rollbar Ruby Gem are:
|
25
|
+
|
26
|
+
- **Frameworks:** Rollbar Ruby Gem supports popular Ruby frameworks such as <a href="https://docs.rollbar.com/docs/rails">Rails</a>, <a href="https://docs.rollbar.com/docs/sinatra">Sinatra</a>, <a href="https://docs.rollbar.com/docs/grape">Grape</a> and more.
|
27
|
+
- **Integrations:** Rollbar Ruby has integrations for <a href="https://docs.rollbar.com/docs/resque-integration">Resque</a>, <a href="https://docs.rollbar.com/docs/activejob-integration">ActiveJob</a>, <a href="https://docs.rollbar.com/docs/using-with-rollbar-agent">rollbar-agent</a>, <a href="https://docs.rollbar.com/docs/sidekiq-integration">Sidekiq</a> and more!
|
28
|
+
- **Automatic error grouping:** Rollbar aggregates Occurrences caused by the same error into Items that represent application issues. <a href="https://docs.rollbar.com/docs/grouping-occurrences">Learn more about reducing log noise</a>.
|
29
|
+
- **Advanced search:** Filter items by many different properties. <a href="https://docs.rollbar.com/docs/search-items">Learn more about search</a>.
|
30
|
+
- **Customizable notifications:** Rollbar supports several messaging and incident management tools where your team can get notified about errors and important events by real-time alerts. <a href="https://docs.rollbar.com/docs/notifications">Learn more about Rollbar notifications</a>.
|
31
|
+
|
32
|
+
|
11
33
|
## Setup Instructions
|
12
34
|
|
13
35
|
1. [Sign up for a Rollbar account](https://rollbar.com/signup)
|
@@ -27,7 +49,7 @@ Version < 2.19.0 is compatible with Ruby >= 1.8.7.
|
|
27
49
|
|
28
50
|
### Ruby 2.6.0
|
29
51
|
|
30
|
-
> WARNING: Ruby 2.6.0 introduced a new bug
|
52
|
+
> WARNING: Ruby 2.6.0 introduced a new bug ([#15472 -
|
31
53
|
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)).
|
32
54
|
|
33
55
|
> UPDATE: This bug is fixed in Ruby 2.6.1, and rollbar-gem has a safe workaround in version >= 2.19.0.
|
data/data/rollbar.snippet.js
CHANGED
@@ -1 +1 @@
|
|
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){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.
|
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){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.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){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((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)}))}i.prototype.loadFull=function(r,e,o,n,t){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=a((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,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i<a.length;++i)if("function"==typeof(l=a[i])){l(e);break}}"function"==typeof t&&t(e)}()}})),d.insertBefore(i,s)},i.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(","),f=0;f<p.length;++f)i.prototype[p[f]]=u(p[f]);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 l=new c(e);return a((function(){e.captureUncaught&&(l._rollbarOldOnError=r.onerror,n.captureUncaughtExceptions(r,l,!0),e.wrapGlobalEventHandlers&&t(r,l,!0)),e.captureUnhandledRejections&&n.captureUnhandledRejections(r,l,!0);var a=e.autoInstrument;return!1!==e.enabled&&(void 0===a||!0===a||function(r){return!("object"!=typeof r||void 0!==r.page&&!r.page)}(a))&&r.addEventListener&&(r.addEventListener("load",l.captureLoad.bind(l)),r.addEventListener("DOMContentLoaded",l.captureDomContentLoaded.bind(l))),r[o]=l,l}))()}},Rollbar:c}},function(r,e,o){"use strict";function n(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.exports={captureUncaughtExceptions:function(r,e,o){if(r){var t;if("function"==typeof e._rollbarOldOnError)t=e._rollbarOldOnError;else if(r.onerror){for(t=r.onerror;t._rollbarOldOnError;)t=t._rollbarOldOnError;e._rollbarOldOnError=t}e.handleAnonymousErrors();var a=function(){var o=Array.prototype.slice.call(arguments,0);n(r,e,t,o)};o&&(a._rollbarOldOnError=t),r.onerror=a}},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)}}}},function(r,e,o){"use strict";function n(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=function(r,e,o){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&&n(e,r[a].prototype,o)}}},function(r,e,o){"use strict";function n(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])}(n.prototype)}n.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=n},function(r,e,o){"use strict";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}}}}]);
|
data/docs/configuration.md
CHANGED
@@ -59,10 +59,10 @@ end
|
|
59
59
|
|
60
60
|
### default_logger
|
61
61
|
|
62
|
-
**Default** `Logger.new(STDERR)`
|
62
|
+
**Default** `lambda { Logger.new(STDERR) }`
|
63
63
|
|
64
64
|
What logger to use for printing debugging and informational messages during
|
65
|
-
operation.
|
65
|
+
operation. Expects a callable object that returns a logger interface.
|
66
66
|
|
67
67
|
### logger_level
|
68
68
|
|
data/gemfiles/rails50.gemfile
CHANGED
@@ -29,7 +29,6 @@ platforms :rbx do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
gem 'capistrano', :require => false
|
32
|
-
gem 'codacy-coverage'
|
33
32
|
gem 'simplecov', '<= 0.17.1'
|
34
33
|
gem 'sucker_punch', '~> 2.0'
|
35
34
|
|
@@ -39,7 +38,6 @@ gem 'rack', '2.1.2' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3')
|
|
39
38
|
gem 'database_cleaner', '~> 1.8.4'
|
40
39
|
gem 'delayed_job', :require => false
|
41
40
|
gem 'generator_spec'
|
42
|
-
gem 'girl_friday', '>= 0.11.1'
|
43
41
|
gem 'redis', '<= 3.3.5'
|
44
42
|
gem 'resque'
|
45
43
|
gem 'secure_headers', '~> 6.3.2', :require => false
|
data/gemfiles/rails51.gemfile
CHANGED
@@ -29,7 +29,6 @@ platforms :rbx do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
gem 'capistrano', :require => false
|
32
|
-
gem 'codacy-coverage'
|
33
32
|
gem 'simplecov', '<= 0.17.1'
|
34
33
|
gem 'sucker_punch', '~> 2.0'
|
35
34
|
|
@@ -41,7 +40,6 @@ gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag => 'v2.0.8'
|
|
41
40
|
gem 'database_cleaner', '~> 1.8.4'
|
42
41
|
gem 'delayed_job', :require => false
|
43
42
|
gem 'generator_spec'
|
44
|
-
gem 'girl_friday', '>= 0.11.1'
|
45
43
|
gem 'redis', '<= 3.3.5'
|
46
44
|
gem 'resque'
|
47
45
|
gem 'secure_headers', '~> 6.3.2', :require => false
|
data/gemfiles/rails52.gemfile
CHANGED
@@ -17,7 +17,7 @@ gem 'rspec-support', '~> 3.8.0'
|
|
17
17
|
|
18
18
|
gem 'rake'
|
19
19
|
|
20
|
-
gem 'sidekiq', '>=
|
20
|
+
gem 'sidekiq', '>= 6.4.0'
|
21
21
|
|
22
22
|
platforms :rbx do
|
23
23
|
gem 'minitest'
|
@@ -28,15 +28,13 @@ end
|
|
28
28
|
|
29
29
|
gem 'sucker_punch', '~> 2.0'
|
30
30
|
|
31
|
-
# We need last sinatra that uses rack 2.x
|
32
|
-
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra'
|
31
|
+
# We need last sinatra that uses rack 2.x and ruby 2.5.x
|
32
|
+
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag =>'v2.1.0'
|
33
33
|
|
34
|
-
gem 'codacy-coverage'
|
35
34
|
gem 'database_cleaner'
|
36
35
|
gem 'delayed_job', :require => false
|
37
36
|
gem 'generator_spec'
|
38
|
-
gem '
|
39
|
-
gem 'redis'
|
37
|
+
gem 'redis', '<= 4.8.0'
|
40
38
|
gem 'resque'
|
41
39
|
gem 'secure_headers', '~> 6.3.2', :require => false
|
42
40
|
gem 'simplecov', '<= 0.17.1'
|
data/gemfiles/rails60.gemfile
CHANGED
@@ -13,7 +13,7 @@ gem 'rspec-rails', '~> 4.0.2'
|
|
13
13
|
|
14
14
|
gem 'rake'
|
15
15
|
|
16
|
-
gem 'sidekiq', '>=
|
16
|
+
gem 'sidekiq', '>= 6.4.0'
|
17
17
|
|
18
18
|
platforms :rbx do
|
19
19
|
gem 'minitest'
|
@@ -24,15 +24,13 @@ end
|
|
24
24
|
|
25
25
|
gem 'sucker_punch', '~> 2.0'
|
26
26
|
|
27
|
-
# We need last sinatra that uses rack 2.x
|
28
|
-
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra'
|
27
|
+
# We need last sinatra that uses rack 2.x and ruby 2.5.x
|
28
|
+
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag =>'v2.1.0'
|
29
29
|
|
30
|
-
gem 'codacy-coverage'
|
31
30
|
gem 'database_cleaner'
|
32
31
|
gem 'delayed_job', '4.1.9', :require => false
|
33
32
|
gem 'generator_spec'
|
34
|
-
gem '
|
35
|
-
gem 'redis'
|
33
|
+
gem 'redis', '<= 4.8.0'
|
36
34
|
gem 'resque'
|
37
35
|
gem 'secure_headers', '~> 6.3.2', :require => false
|
38
36
|
gem 'simplecov'
|
data/gemfiles/rails61.gemfile
CHANGED
@@ -6,14 +6,14 @@ is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == '
|
|
6
6
|
|
7
7
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
8
8
|
gem 'jruby-openssl', :platform => :jruby
|
9
|
-
gem 'rails', '~> 6.1.
|
9
|
+
gem 'rails', '~> 6.1.5'
|
10
10
|
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
|
11
11
|
|
12
12
|
gem 'rspec-rails', '~> 4.0.2'
|
13
13
|
|
14
14
|
gem 'rake'
|
15
15
|
|
16
|
-
gem 'sidekiq', '>=
|
16
|
+
gem 'sidekiq', '>= 6.4.0'
|
17
17
|
|
18
18
|
platforms :rbx do
|
19
19
|
gem 'minitest'
|
@@ -24,15 +24,13 @@ end
|
|
24
24
|
|
25
25
|
gem 'sucker_punch', '~> 2.0'
|
26
26
|
|
27
|
-
# We need last sinatra that uses rack 2.x
|
28
|
-
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra'
|
27
|
+
# We need last sinatra that uses rack 2.x and ruby 2.5.x
|
28
|
+
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag =>'v2.1.0'
|
29
29
|
|
30
|
-
gem 'codacy-coverage'
|
31
30
|
gem 'database_cleaner'
|
32
31
|
gem 'delayed_job', '4.1.9', :require => false
|
33
32
|
gem 'generator_spec'
|
34
|
-
gem '
|
35
|
-
gem 'redis'
|
33
|
+
gem 'redis', '<= 4.8.0'
|
36
34
|
gem 'resque'
|
37
35
|
gem 'secure_headers', '~> 6.3.2', :require => false
|
38
36
|
gem 'simplecov'
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'rubygems/version'
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
|
6
|
+
|
7
|
+
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
8
|
+
gem 'jruby-openssl', :platform => :jruby
|
9
|
+
gem 'rails', '~> 7.0.8'
|
10
|
+
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
|
11
|
+
|
12
|
+
gem 'rspec-rails', '~> 6.0.3'
|
13
|
+
|
14
|
+
gem 'rake'
|
15
|
+
|
16
|
+
gem 'sidekiq', '>= 6.4.0'
|
17
|
+
|
18
|
+
platforms :rbx do
|
19
|
+
gem 'minitest'
|
20
|
+
gem 'racc'
|
21
|
+
gem 'rubinius-developer_tools'
|
22
|
+
gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2')
|
23
|
+
end
|
24
|
+
|
25
|
+
gem 'sucker_punch', '~> 2.0'
|
26
|
+
|
27
|
+
# We need last sinatra that uses rack 2.x and ruby 2.5.x
|
28
|
+
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag =>'v2.1.0'
|
29
|
+
|
30
|
+
gem 'database_cleaner'
|
31
|
+
gem 'delayed_job', '4.1.10', :require => false
|
32
|
+
gem 'generator_spec'
|
33
|
+
gem 'redis', '<= 4.8.0'
|
34
|
+
gem 'resque'
|
35
|
+
gem 'secure_headers', '~> 6.3.2', :require => false
|
36
|
+
gem 'simplecov'
|
37
|
+
|
38
|
+
unless is_jruby
|
39
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
40
|
+
gem 'rspec-command'
|
41
|
+
end
|
42
|
+
|
43
|
+
gem 'mime-types'
|
44
|
+
|
45
|
+
gem 'webmock', :require => false
|
46
|
+
|
47
|
+
gem 'aws-sdk-sqs'
|
48
|
+
gem 'shoryuken'
|
49
|
+
|
50
|
+
gem 'capistrano', :require => false
|
51
|
+
|
52
|
+
gemspec :path => '../'
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'rubygems/version'
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
|
6
|
+
|
7
|
+
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
8
|
+
gem 'jruby-openssl', :platform => :jruby
|
9
|
+
gem 'rails', '~> 7.1.0'
|
10
|
+
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
|
11
|
+
|
12
|
+
gem 'rspec-rails', '~> 6.0.3'
|
13
|
+
|
14
|
+
gem 'rake'
|
15
|
+
|
16
|
+
gem 'sidekiq', '>= 6.4.0'
|
17
|
+
|
18
|
+
platforms :rbx do
|
19
|
+
gem 'minitest'
|
20
|
+
gem 'racc'
|
21
|
+
gem 'rubinius-developer_tools'
|
22
|
+
gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2')
|
23
|
+
end
|
24
|
+
|
25
|
+
gem 'sucker_punch', '~> 2.0'
|
26
|
+
|
27
|
+
# We need last sinatra that uses rack 2.x and ruby 2.5.x
|
28
|
+
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag =>'v2.1.0'
|
29
|
+
|
30
|
+
gem 'database_cleaner'
|
31
|
+
gem 'delayed_job', '4.1.10', :require => false
|
32
|
+
gem 'generator_spec'
|
33
|
+
gem 'redis', '<= 4.8.0'
|
34
|
+
gem 'resque'
|
35
|
+
gem 'secure_headers', '~> 6.3.2', :require => false
|
36
|
+
gem 'simplecov'
|
37
|
+
|
38
|
+
unless is_jruby
|
39
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
40
|
+
gem 'rspec-command'
|
41
|
+
end
|
42
|
+
|
43
|
+
gem 'mime-types'
|
44
|
+
|
45
|
+
gem 'webmock', :require => false
|
46
|
+
|
47
|
+
gem 'aws-sdk-sqs'
|
48
|
+
gem 'shoryuken'
|
49
|
+
|
50
|
+
gem 'capistrano', :require => false
|
51
|
+
|
52
|
+
gemspec :path => '../'
|
data/lib/rails/rollbar_runner.rb
CHANGED
@@ -11,19 +11,6 @@ APP_PATH = File.expand_path(
|
|
11
11
|
|
12
12
|
module Rails
|
13
13
|
class RollbarRunner
|
14
|
-
class GemResolver
|
15
|
-
def railties_gem
|
16
|
-
Gem::Specification.find_by_name('railties')
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class LegacyGemResolver
|
21
|
-
def railties_gem
|
22
|
-
searcher = Gem::GemPathSearcher.new
|
23
|
-
searcher.find('rails')
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
14
|
attr_reader :command
|
28
15
|
|
29
16
|
def initialize
|
@@ -75,12 +62,7 @@ module Rails
|
|
75
62
|
end
|
76
63
|
|
77
64
|
def railties_gem
|
78
|
-
|
79
|
-
GemResolver
|
80
|
-
else
|
81
|
-
LegacyGemResolver
|
82
|
-
end
|
83
|
-
gem = resolver_class.new.railties_gem
|
65
|
+
gem = Gem::Specification.find_by_name('railties')
|
84
66
|
|
85
67
|
abort 'railties gem not found' unless gem
|
86
68
|
|
@@ -324,7 +324,7 @@ module Rollbar
|
|
324
324
|
def send_extra_frame_data=(value)
|
325
325
|
unless SEND_EXTRA_FRAME_DATA_OPTIONS.include?(value)
|
326
326
|
logger.warning(
|
327
|
-
"Wrong 'send_extra_frame_data' value, :none, :app or :
|
327
|
+
"Wrong 'send_extra_frame_data' value, :none, :app or :all is expected"
|
328
328
|
)
|
329
329
|
|
330
330
|
return
|