rollbar 2.23.2 → 3.3.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.
- checksums.yaml +4 -4
- data/.github/pull_request_template.md +25 -0
- data/.github/workflows/ci.yml +118 -0
- data/.rubocop.yml +85 -34
- data/Gemfile +22 -22
- data/README.md +11 -9
- data/data/rollbar.snippet.js +1 -1
- data/docs/configuration.md +8 -0
- data/gemfiles/rails30.gemfile +18 -35
- data/gemfiles/rails31.gemfile +21 -37
- data/gemfiles/rails32.gemfile +14 -31
- data/gemfiles/rails40.gemfile +13 -32
- data/gemfiles/rails41.gemfile +12 -31
- data/gemfiles/rails42.gemfile +12 -35
- data/gemfiles/rails50.gemfile +17 -29
- data/gemfiles/rails51.gemfile +17 -29
- data/gemfiles/rails52.gemfile +7 -14
- data/gemfiles/rails60.gemfile +7 -20
- data/gemfiles/rails61.gemfile +54 -0
- data/lib/generators/rollbar/rollbar_generator.rb +18 -14
- data/lib/generators/rollbar/templates/{initializer.rb → initializer.erb} +0 -0
- data/lib/rails/rollbar_runner.rb +15 -6
- data/lib/rollbar/capistrano.rb +17 -9
- data/lib/rollbar/capistrano3.rb +8 -2
- data/lib/rollbar/capistrano_tasks.rb +44 -8
- data/lib/rollbar/configuration.rb +128 -84
- data/lib/rollbar/delay/shoryuken.rb +4 -3
- data/lib/rollbar/delay/sidekiq.rb +3 -1
- data/lib/rollbar/delay/sucker_punch.rb +1 -2
- data/lib/rollbar/delay/thread.rb +3 -2
- data/lib/rollbar/deploy.rb +8 -7
- data/lib/rollbar/encoding/encoder.rb +10 -3
- data/lib/rollbar/exception_reporter.rb +17 -8
- data/lib/rollbar/item/backtrace.rb +11 -9
- data/lib/rollbar/item/frame.rb +6 -5
- data/lib/rollbar/item/locals.rb +3 -2
- data/lib/rollbar/item.rb +68 -40
- data/lib/rollbar/json.rb +2 -1
- data/lib/rollbar/language_support.rb +0 -6
- data/lib/rollbar/lazy_store.rb +3 -7
- data/lib/rollbar/logger.rb +2 -0
- data/lib/rollbar/logger_proxy.rb +3 -1
- data/lib/rollbar/middleware/js.rb +64 -37
- data/lib/rollbar/middleware/rack/builder.rb +3 -3
- data/lib/rollbar/middleware/rack/test_session.rb +3 -3
- data/lib/rollbar/middleware/rack.rb +4 -4
- data/lib/rollbar/middleware/rails/rollbar.rb +9 -6
- data/lib/rollbar/middleware/rails/show_exceptions.rb +8 -4
- data/lib/rollbar/notifier/trace_with_bindings.rb +4 -2
- data/lib/rollbar/notifier.rb +272 -159
- data/lib/rollbar/plugin.rb +8 -8
- data/lib/rollbar/plugins/active_job.rb +11 -2
- data/lib/rollbar/plugins/delayed_job/plugin.rb +19 -2
- data/lib/rollbar/plugins/goalie.rb +27 -16
- data/lib/rollbar/plugins/rails/controller_methods.rb +18 -14
- data/lib/rollbar/plugins/rails/railtie30.rb +2 -1
- data/lib/rollbar/plugins/rails/railtie32.rb +2 -1
- data/lib/rollbar/plugins/rails/railtie_mixin.rb +2 -2
- data/lib/rollbar/plugins/rails.rb +5 -2
- data/lib/rollbar/plugins/rake.rb +2 -1
- data/lib/rollbar/plugins/sidekiq/plugin.rb +37 -20
- data/lib/rollbar/plugins/sidekiq.rb +1 -1
- data/lib/rollbar/plugins/thread.rb +8 -7
- data/lib/rollbar/plugins/validations.rb +3 -1
- data/lib/rollbar/rake_tasks.rb +1 -2
- data/lib/rollbar/request_data_extractor.rb +43 -16
- data/lib/rollbar/rollbar_test.rb +9 -118
- data/lib/rollbar/scrubbers/params.rb +13 -7
- data/lib/rollbar/scrubbers/url.rb +56 -17
- data/lib/rollbar/scrubbers.rb +1 -1
- data/lib/rollbar/truncation/remove_any_key_strategy.rb +4 -1
- data/lib/rollbar/truncation/remove_extra_strategy.rb +3 -1
- data/lib/rollbar/util/hash.rb +14 -7
- data/lib/rollbar/util/ip_anonymizer.rb +1 -1
- data/lib/rollbar/util.rb +19 -13
- data/lib/rollbar/version.rb +1 -1
- data/lib/rollbar.rb +12 -7
- data/lib/tasks/benchmark.rake +2 -1
- data/rollbar.gemspec +5 -2
- data/spec/support/rollbar_api.rb +67 -0
- metadata +9 -6
- data/.travis.yml +0 -284
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c88b1bd8659724cc0d0351d4efb1a458ec8af8e466ddaf6a453e6acaa6da6bd9
|
4
|
+
data.tar.gz: 7961e62c55a4f147644cd203ca279b188a7ec3061f15b7ce88943591ccf87e07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fce360ce571930f495008f786bbc41ed649a7ee9d0e1e23e81a5e050b9310dbf4fc50952f62236d23d5a27f8057efc4c030a321207357423526cffa38d07355c
|
7
|
+
data.tar.gz: 759e0e90848534ea09cbfd6ffe866f2d75e314fc56e2bdd7dbd6a48a428691ae5c42d2ec5a158638ba74148456674b01d5450f5cea1198e3148bc6dd69ce545a
|
@@ -0,0 +1,25 @@
|
|
1
|
+
## Description of the change
|
2
|
+
|
3
|
+
> Description here
|
4
|
+
## Type of change
|
5
|
+
- [ ] Bug fix (non-breaking change that fixes an issue)
|
6
|
+
- [ ] New feature (non-breaking change that adds functionality)
|
7
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
8
|
+
|
9
|
+
## Related issues
|
10
|
+
|
11
|
+
> Fix [#1]()
|
12
|
+
## Checklists
|
13
|
+
|
14
|
+
### Development
|
15
|
+
|
16
|
+
- [ ] Lint rules pass locally
|
17
|
+
- [ ] The code changed/added as part of this pull request has been covered with tests
|
18
|
+
- [ ] All tests related to the changed code pass in development
|
19
|
+
|
20
|
+
### Code review
|
21
|
+
|
22
|
+
- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
|
23
|
+
- [ ] "Ready for review" label attached to the PR and reviewers mentioned in a comment
|
24
|
+
- [ ] Changes have been reviewed by at least one other engineer
|
25
|
+
- [ ] Issue from task tracker has a link to this pull request
|
@@ -0,0 +1,118 @@
|
|
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-18.04
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: [2.2.10, 2.3.0, 2.3.8, 2.4.5, 2.5.3, 2.6.0, 2.6.6, 2.7.2]
|
15
|
+
gemfile:
|
16
|
+
- gemfiles/rails42.gemfile
|
17
|
+
- gemfiles/rails50.gemfile
|
18
|
+
- gemfiles/rails51.gemfile
|
19
|
+
- gemfiles/rails52.gemfile
|
20
|
+
- gemfiles/rails60.gemfile
|
21
|
+
- 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
|
+
include:
|
50
|
+
- gemfile: gemfiles/rails41.gemfile
|
51
|
+
ruby-version: 2.3.0
|
52
|
+
- gemfile: gemfiles/rails41.gemfile
|
53
|
+
ruby-version: 2.2.10
|
54
|
+
- gemfile: gemfiles/rails41.gemfile
|
55
|
+
ruby-version: 2.1.9
|
56
|
+
- gemfile: gemfiles/rails40.gemfile
|
57
|
+
ruby-version: 2.3.0
|
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
|
70
|
+
- gemfile: gemfiles/rails61.gemfile
|
71
|
+
ruby-version: 3.0.0
|
72
|
+
|
73
|
+
steps:
|
74
|
+
- uses: actions/checkout@v2
|
75
|
+
with:
|
76
|
+
submodules: recursive
|
77
|
+
|
78
|
+
- name: Start Redis
|
79
|
+
uses: supercharge/redis-github-action@1.1.0
|
80
|
+
with:
|
81
|
+
redis-version: 4
|
82
|
+
|
83
|
+
- name: Setup Ruby > 2.0
|
84
|
+
uses: ruby/setup-ruby@v1
|
85
|
+
if: ${{ matrix.ruby-version != '2.0.0' }}
|
86
|
+
with:
|
87
|
+
ruby-version: ${{ matrix.ruby-version }}
|
88
|
+
|
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
|
+
- name: Rails 4.2 ensure bundler version
|
105
|
+
if: ${{ matrix.gemfile == 'gemfiles/rails42.gemfile' }}
|
106
|
+
run: |
|
107
|
+
gem uninstall bundler
|
108
|
+
gem install bundler -v '< 2.0.0'
|
109
|
+
|
110
|
+
- name: Bundle Install
|
111
|
+
run: |
|
112
|
+
export BUNDLE_GEMFILE=${{ matrix.gemfile }}
|
113
|
+
bundle config path vendor/bundle
|
114
|
+
bundle config gemfile ${{ matrix.gemfile }}
|
115
|
+
bundle install --jobs 4 --retry 3
|
116
|
+
|
117
|
+
- name: Rspec
|
118
|
+
run: bundle exec rspec
|
data/.rubocop.yml
CHANGED
@@ -4,41 +4,104 @@ AllCops:
|
|
4
4
|
Exclude:
|
5
5
|
- 'vendor/**/*'
|
6
6
|
- 'gemfiles/vendor/**/*'
|
7
|
+
- 'spec/dummyapp/**/*'
|
8
|
+
- 'spec/tmp/**/*'
|
9
|
+
TargetRubyVersion: 2.5 # This is the minimum allowed for current rubocop
|
7
10
|
|
8
|
-
|
9
|
-
|
10
|
-
SupportedStyles:
|
11
|
-
- hash_rockets
|
11
|
+
Gemspec/RequiredRubyVersion:
|
12
|
+
Enabled: false # rubocop compares to gemspec, yet won't allow 1.9 as minimum version
|
12
13
|
|
13
|
-
|
14
|
-
|
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
|
15
21
|
|
16
|
-
|
17
|
-
|
22
|
+
Lint/ConstantDefinitionInBlock:
|
23
|
+
# We routinely update existing class definitions in conditional blocks.
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Lint/SendWithMixinArgument:
|
27
|
+
# Object#include is still a private method in Ruby 2.0.
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Metrics/BlockLength:
|
31
|
+
# RSpec DSL is expected to have long blocks.
|
32
|
+
IgnoredMethods: ['describe', 'context', 'it', 'shared_examples']
|
18
33
|
|
19
34
|
Metrics/MethodLength:
|
20
35
|
Max: 15 # Relax slightly from the default of 10
|
21
36
|
|
22
|
-
|
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.
|
23
41
|
Enabled: false
|
24
42
|
|
25
|
-
|
43
|
+
Naming/MethodParameterName:
|
44
|
+
# It's possible to configure this cop to allow just about anything, but what's the point.
|
45
|
+
# The default min length of a param name is 3, but the the default whitelist includes things
|
46
|
+
# like `db` and `io`. So, short names really can be useful.
|
47
|
+
Enabled: false
|
48
|
+
|
49
|
+
Style/CaseEquality:
|
50
|
+
# The code uses `===` a lot to compare a regex to a string, but it's not clear that
|
51
|
+
# switching to `=~` is always safe, because in some cases the value could be a regex
|
52
|
+
# or a string and `str1 =~ str2` isn't valid. Whoever enables this cop should carefully
|
53
|
+
# review and test each of these.
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
Style/Documentation:
|
57
|
+
# We can enabled this if/when we want to start doing consistent class documentation.
|
58
|
+
# As is, we currently add :nodoc: if anything at all.
|
59
|
+
Enabled: false
|
60
|
+
|
61
|
+
Style/DoubleNegation:
|
26
62
|
Enabled: false
|
27
63
|
|
28
64
|
Style/EachWithObject:
|
29
65
|
Enabled: false
|
30
66
|
|
31
|
-
|
32
|
-
|
67
|
+
Style/Encoding:
|
68
|
+
Enabled: false # Ruby 1.9.3 needs these magic comments, e.g. # encoding: UTF-8
|
33
69
|
|
34
70
|
Style/ExpandPathArguments:
|
35
71
|
Enabled: false # syntax requires Ruby >= 2.0
|
36
72
|
|
37
|
-
|
38
|
-
|
73
|
+
Style/FrozenStringLiteralComment:
|
74
|
+
# If we do this, it will be in its own PR. It requires adding these magic comments
|
75
|
+
# throughout the project, in order to prepare for a future Ruby 3.x.
|
76
|
+
Enabled: false
|
39
77
|
|
40
|
-
Style/
|
41
|
-
|
78
|
+
Style/HashSyntax:
|
79
|
+
EnforcedStyle: hash_rockets
|
80
|
+
SupportedStyles:
|
81
|
+
- hash_rockets
|
82
|
+
|
83
|
+
Style/HashTransformKeys:
|
84
|
+
# Hash#transform_keys isn't available until Ruby 2.5
|
85
|
+
Enabled: false
|
86
|
+
|
87
|
+
Style/Lambda:
|
88
|
+
Enabled: false
|
89
|
+
|
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
|
42
105
|
|
43
106
|
Style/PercentLiteralDelimiters:
|
44
107
|
PreferredDelimiters:
|
@@ -46,28 +109,16 @@ Style/PercentLiteralDelimiters:
|
|
46
109
|
# Make sure we are consistent across all bundles/builds.
|
47
110
|
default: '[]'
|
48
111
|
|
49
|
-
Style/
|
50
|
-
#
|
51
|
-
# As is, we currently add :nodoc: if anything at all.
|
112
|
+
Style/RedundantBegin:
|
113
|
+
# Ruby < 2.5 needs begin/end inside blocks when using rescue
|
52
114
|
Enabled: false
|
53
115
|
|
54
|
-
|
55
|
-
#
|
56
|
-
# The default min length of a param name is 3, but the the default whitelist includes things
|
57
|
-
# like `db` and `io`. So, short names really can be useful.
|
116
|
+
Style/SafeNavigation:
|
117
|
+
# Not available in Ruby < 2.3.
|
58
118
|
Enabled: false
|
59
119
|
|
60
|
-
Style/
|
61
|
-
|
62
|
-
# switching to `=~` is always safe, because in some cases the value could be a regex
|
63
|
-
# or a string and `str1 =~ str2` isn't valid. Whoever enables this cop should carefully
|
64
|
-
# review and test each of these.
|
65
|
-
Enabled: false
|
66
|
-
|
67
|
-
Style/FrozenStringLiteralComment:
|
68
|
-
# If we do this, it will be in its own PR. It requires adding these magic comments
|
69
|
-
# throughout the project, in order to prepare for a future Ruby 3.x.
|
70
|
-
Enabled: false
|
120
|
+
Style/SymbolArray:
|
121
|
+
Enabled: false # %i[] syntax isn't 1.9.x compatible
|
71
122
|
|
72
123
|
#
|
73
124
|
# Performance cops are opt in, and `Enabled: true` is always required.
|
data/Gemfile
CHANGED
@@ -11,8 +11,7 @@ ENV['CURRENT_GEMFILE'] ||= __FILE__
|
|
11
11
|
|
12
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
|
13
13
|
|
14
|
-
GEMFILE_RAILS_VERSION = '
|
15
|
-
|
14
|
+
GEMFILE_RAILS_VERSION = '~> 6.1.3'.freeze
|
16
15
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
17
16
|
gem 'appraisal'
|
18
17
|
gem 'jruby-openssl', :platform => :jruby
|
@@ -21,41 +20,33 @@ gem 'rake'
|
|
21
20
|
if GEMFILE_RAILS_VERSION < '6.0'
|
22
21
|
gem 'rspec-rails', '~> 3.4'
|
23
22
|
else
|
24
|
-
|
25
|
-
gem 'rspec-rails', :git => 'https://github.com/rspec/rspec-rails', :ref => 'v4.0.0.beta2' # rubocop:disable Bundler/DuplicatedGem
|
23
|
+
gem 'rspec-rails', '~> 4.0.2'
|
26
24
|
end
|
27
25
|
|
28
26
|
if GEMFILE_RAILS_VERSION < '6.0'
|
29
27
|
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
30
28
|
else
|
31
|
-
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
|
29
|
+
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
|
32
30
|
end
|
33
31
|
|
34
32
|
if RUBY_VERSION < '2.2.2'
|
35
33
|
gem 'sidekiq', '~> 2.13.0'
|
36
34
|
else
|
37
|
-
gem 'sidekiq', '>= 2.13.0'
|
35
|
+
gem 'sidekiq', '>= 2.13.0'
|
38
36
|
end
|
39
37
|
|
40
38
|
platforms :rbx do
|
41
39
|
gem 'minitest'
|
42
40
|
gem 'racc'
|
43
41
|
gem 'rubinius-developer_tools'
|
44
|
-
gem 'rubysl', '~> 2.0'
|
42
|
+
gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2')
|
45
43
|
end
|
46
44
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
elsif RUBY_VERSION.start_with?('2')
|
53
|
-
gem 'capistrano', :require => false # rubocop:disable Bundler/DuplicatedGem
|
54
|
-
gem 'codacy-coverage'
|
55
|
-
gem 'shoryuken' # rubocop:disable Bundler/DuplicatedGem
|
56
|
-
gem 'simplecov'
|
57
|
-
gem 'sucker_punch', '~> 2.0' # rubocop:disable Bundler/DuplicatedGem
|
58
|
-
end
|
45
|
+
gem 'capistrano', :require => false
|
46
|
+
gem 'codacy-coverage'
|
47
|
+
gem 'shoryuken'
|
48
|
+
gem 'simplecov'
|
49
|
+
gem 'sucker_punch', '~> 2.0'
|
59
50
|
|
60
51
|
unless is_jruby
|
61
52
|
# JRuby doesn't support fork, which is required for this test helper.
|
@@ -63,18 +54,27 @@ unless is_jruby
|
|
63
54
|
end
|
64
55
|
|
65
56
|
gem 'aws-sdk-sqs'
|
66
|
-
|
57
|
+
|
58
|
+
if GEMFILE_RAILS_VERSION >= '5.2'
|
59
|
+
gem 'database_cleaner'
|
60
|
+
elsif GEMFILE_RAILS_VERSION.between?('5.0', '5.2')
|
61
|
+
gem 'database_cleaner', '~> 1.8.4'
|
62
|
+
elsif GEMFILE_RAILS_VERSION < '5.0'
|
63
|
+
gem 'database_cleaner', '~> 1.0.0'
|
64
|
+
end
|
65
|
+
|
67
66
|
if GEMFILE_RAILS_VERSION < '6.0'
|
68
67
|
gem 'delayed_job', :require => false
|
69
68
|
else
|
70
|
-
gem 'delayed_job', '~> 4.1', :require => false
|
69
|
+
gem 'delayed_job', '~> 4.1', :require => false
|
71
70
|
end
|
72
71
|
gem 'generator_spec'
|
73
72
|
gem 'girl_friday', '>= 0.11.1'
|
74
73
|
gem 'redis'
|
75
74
|
gem 'resque', '< 2.0.0'
|
76
|
-
gem 'rubocop', :require => false
|
75
|
+
gem 'rubocop', '1.15.0', :require => false # pin specific version, update manually
|
77
76
|
gem 'rubocop-performance', :require => false
|
77
|
+
gem 'secure_headers', '~> 6.3.2', :require => false
|
78
78
|
gem 'sinatra'
|
79
79
|
gem 'webmock', :require => false
|
80
80
|
gemspec
|
data/README.md
CHANGED
@@ -1,17 +1,9 @@
|
|
1
1
|
# Rollbar-gem
|
2
|
-
|
2
|
+

|
3
3
|
[](http://badge.fury.io/rb/rollbar)
|
4
4
|
[](https://dependabot.com/compatibility-score.html?dependency-name=rollbar&package-manager=bundler&version-scheme=semver&new-version=latest)
|
5
5
|
|
6
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
|
-
|
14
|
-
|
15
7
|
[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.
|
16
8
|
|
17
9
|
Rollbar-gem is the SDK for Ruby apps and includes support for apps using Rails, Sinatra, Rack, plain Ruby, and other frameworks.
|
@@ -27,10 +19,20 @@ For complete usage instructions and configuration reference, see our [Ruby SDK d
|
|
27
19
|
|
28
20
|
## Compatibility
|
29
21
|
|
22
|
+
Version >= 3.0.0 is compatible with Ruby >= 2.0.0.
|
23
|
+
|
30
24
|
Version >= 2.19.0 is compatible with Ruby >= 1.9.3.
|
31
25
|
|
32
26
|
Version < 2.19.0 is compatible with Ruby >= 1.8.7.
|
33
27
|
|
28
|
+
### Ruby 2.6.0
|
29
|
+
|
30
|
+
> WARNING: Ruby 2.6.0 introduced a new bug bug ([#15472 -
|
31
|
+
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
|
+
|
33
|
+
> UPDATE: This bug is fixed in Ruby 2.6.1, and rollbar-gem has a safe workaround in version >= 2.19.0.
|
34
|
+
If you need to stay on Ruby 2.6.0 for any reason, make sure you have the latest rollbar-gem.
|
35
|
+
|
34
36
|
## Release History & Changelog
|
35
37
|
|
36
38
|
See our [Releases](https://github.com/rollbar/rollbar-gem/releases) page for a list of all releases, including changes.
|
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){var n=o(1),t=o(
|
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.22.0/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||"object"==typeof a&&a.network)&&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
@@ -108,6 +108,13 @@ Rollbar notifier.
|
|
108
108
|
|
109
109
|
The number of job failures before reporting the failure to Rollbar.
|
110
110
|
|
111
|
+
### async_skip_report_handler
|
112
|
+
|
113
|
+
**Default** `nil`
|
114
|
+
**Example** `-> (job) { job.cron? }`
|
115
|
+
|
116
|
+
A handler, should respond to `#call`, receives the job and returns a boolean. If true, reporting errors will be skipped. If provided, dj_threshold isn't checked.
|
117
|
+
|
111
118
|
### enabled
|
112
119
|
|
113
120
|
**Default** `true`
|
@@ -129,6 +136,7 @@ An array of backup handlers if the async handlers fails. Each should respond to
|
|
129
136
|
|
130
137
|
For use with `write_to_file`. Indicates location of the rollbar log file being
|
131
138
|
tracked by [rollbar-agent](https://github.com/rollbar/rollbar-agent).
|
139
|
+
Enable `files_with_pid_name_enabled` if you want to have different files for each process(only works if extension `rollbar`)
|
132
140
|
|
133
141
|
### framework
|
134
142
|
|
data/gemfiles/rails30.gemfile
CHANGED
@@ -2,23 +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
|
-
|
12
|
-
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
13
|
-
|
14
|
-
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
15
|
-
gem 'jruby-openssl', :platform => :jruby
|
16
5
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
17
|
-
gem 'appraisal', '= 1.0.2'
|
18
|
-
gem 'rails', '3.0.20'
|
19
6
|
gem 'hitimes', '< 1.2.2'
|
7
|
+
gem 'jruby-openssl', :platform => :jruby
|
8
|
+
gem 'mixlib-shellout', '<= 2.0.0'
|
9
|
+
gem 'net-ssh', '<= 3.1.1'
|
10
|
+
gem 'public_suffix', '<= 2.0.5'
|
11
|
+
gem 'rails', '~> 3.0.20'
|
20
12
|
gem 'rake', '< 11'
|
21
13
|
gem 'rspec-rails', '>= 2.14.0'
|
14
|
+
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
22
15
|
|
23
16
|
if RUBY_VERSION < '2.2.2'
|
24
17
|
gem 'sidekiq', '~> 2.13.0'
|
@@ -34,35 +27,25 @@ platforms :rbx do
|
|
34
27
|
gem 'rubysl-test-unit'
|
35
28
|
end
|
36
29
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
gem 'sucker_punch', '~> 2.0'
|
44
|
-
gem 'shoryuken'
|
45
|
-
gem 'codacy-coverage'
|
46
|
-
gem 'simplecov'
|
47
|
-
end
|
30
|
+
gem 'capistrano', :require => false
|
31
|
+
gem 'codacy-coverage'
|
32
|
+
gem 'rexml', '<= 3.2.4'
|
33
|
+
gem 'shoryuken'
|
34
|
+
gem 'simplecov', '<= 0.17.1'
|
35
|
+
gem 'sucker_punch', '~> 2.0'
|
48
36
|
|
49
|
-
gem 'sinatra'
|
50
|
-
gem 'delayed_job', :require => false
|
51
|
-
gem 'redis'
|
52
37
|
gem 'database_cleaner', '~> 1.0.0'
|
38
|
+
gem 'delayed_job', :require => false
|
53
39
|
gem 'genspec', '>= 0.2.8'
|
54
40
|
gem 'girl_friday', '>= 0.11.1'
|
41
|
+
gem 'redis', '<= 3.3.5'
|
42
|
+
gem 'redis-namespace', '<= 1.5.0'
|
55
43
|
gem 'rspec-command'
|
44
|
+
gem 'sinatra'
|
56
45
|
|
57
|
-
|
58
|
-
gem 'public_suffix', '< 1.5'
|
59
|
-
gem 'mime-types', '< 3.0'
|
60
|
-
gem 'webmock', '< 2.3.0', :require => false
|
61
|
-
else
|
62
|
-
gem 'webmock', :require => false
|
63
|
-
end
|
46
|
+
gem 'webmock', :require => false
|
64
47
|
|
65
|
-
gem 'resque', '< 2.0.0'
|
66
48
|
gem 'aws-sdk-sqs'
|
49
|
+
gem 'resque', '< 2.0.0'
|
67
50
|
|
68
51
|
gemspec :path => '../'
|