rollbar 2.26.0 → 3.4.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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/.github/pull_request_template.md +34 -0
  3. data/.github/workflows/ci.yml +104 -0
  4. data/.rubocop.yml +52 -36
  5. data/Gemfile +25 -29
  6. data/README.md +32 -8
  7. data/data/rollbar.snippet.js +1 -1
  8. data/docs/configuration.md +7 -0
  9. data/gemfiles/rails30.gemfile +17 -35
  10. data/gemfiles/rails31.gemfile +20 -37
  11. data/gemfiles/rails32.gemfile +13 -31
  12. data/gemfiles/rails40.gemfile +12 -32
  13. data/gemfiles/rails41.gemfile +11 -31
  14. data/gemfiles/rails42.gemfile +11 -35
  15. data/gemfiles/rails50.gemfile +14 -32
  16. data/gemfiles/rails51.gemfile +13 -31
  17. data/gemfiles/rails52.gemfile +10 -19
  18. data/gemfiles/rails60.gemfile +10 -25
  19. data/gemfiles/rails61.gemfile +52 -0
  20. data/gemfiles/rails70.gemfile +52 -0
  21. data/lib/generators/rollbar/rollbar_generator.rb +18 -14
  22. data/lib/rails/rollbar_runner.rb +8 -19
  23. data/lib/rollbar/capistrano.rb +17 -9
  24. data/lib/rollbar/capistrano3.rb +8 -2
  25. data/lib/rollbar/capistrano_tasks.rb +44 -8
  26. data/lib/rollbar/configuration.rb +122 -88
  27. data/lib/rollbar/delay/shoryuken.rb +4 -3
  28. data/lib/rollbar/delay/sidekiq.rb +3 -1
  29. data/lib/rollbar/delay/sucker_punch.rb +1 -2
  30. data/lib/rollbar/delay/thread.rb +3 -2
  31. data/lib/rollbar/deploy.rb +6 -7
  32. data/lib/rollbar/encoding/encoder.rb +7 -3
  33. data/lib/rollbar/encoding.rb +2 -7
  34. data/lib/rollbar/exception_reporter.rb +17 -8
  35. data/lib/rollbar/item/backtrace.rb +10 -8
  36. data/lib/rollbar/item/frame.rb +6 -5
  37. data/lib/rollbar/item/locals.rb +5 -2
  38. data/lib/rollbar/item.rb +60 -38
  39. data/lib/rollbar/json.rb +1 -1
  40. data/lib/rollbar/language_support.rb +0 -6
  41. data/lib/rollbar/lazy_store.rb +3 -7
  42. data/lib/rollbar/logger.rb +2 -0
  43. data/lib/rollbar/logger_proxy.rb +3 -1
  44. data/lib/rollbar/middleware/js/json_value.rb +15 -5
  45. data/lib/rollbar/middleware/js.rb +59 -37
  46. data/lib/rollbar/middleware/rack/builder.rb +3 -3
  47. data/lib/rollbar/middleware/rack/test_session.rb +3 -3
  48. data/lib/rollbar/middleware/rack.rb +4 -4
  49. data/lib/rollbar/middleware/rails/rollbar.rb +9 -6
  50. data/lib/rollbar/middleware/rails/show_exceptions.rb +8 -4
  51. data/lib/rollbar/notifier/trace_with_bindings.rb +13 -3
  52. data/lib/rollbar/notifier.rb +180 -136
  53. data/lib/rollbar/plugin.rb +8 -8
  54. data/lib/rollbar/plugins/active_job.rb +15 -2
  55. data/lib/rollbar/plugins/delayed_job/plugin.rb +14 -3
  56. data/lib/rollbar/plugins/goalie.rb +27 -16
  57. data/lib/rollbar/plugins/rails/controller_methods.rb +18 -14
  58. data/lib/rollbar/plugins/rails/railtie30.rb +2 -1
  59. data/lib/rollbar/plugins/rails/railtie32.rb +2 -1
  60. data/lib/rollbar/plugins/rails/railtie_mixin.rb +2 -2
  61. data/lib/rollbar/plugins/rails.rb +5 -2
  62. data/lib/rollbar/plugins/rake.rb +2 -1
  63. data/lib/rollbar/plugins/sidekiq/plugin.rb +39 -21
  64. data/lib/rollbar/plugins/sidekiq.rb +1 -1
  65. data/lib/rollbar/plugins/thread.rb +8 -7
  66. data/lib/rollbar/plugins/validations.rb +3 -1
  67. data/lib/rollbar/rake_tasks.rb +1 -2
  68. data/lib/rollbar/request_data_extractor.rb +48 -19
  69. data/lib/rollbar/rollbar_test.rb +9 -118
  70. data/lib/rollbar/scrubbers/params.rb +13 -7
  71. data/lib/rollbar/scrubbers/url.rb +56 -17
  72. data/lib/rollbar/scrubbers.rb +1 -1
  73. data/lib/rollbar/truncation/remove_any_key_strategy.rb +4 -1
  74. data/lib/rollbar/truncation/remove_extra_strategy.rb +3 -1
  75. data/lib/rollbar/util/hash.rb +14 -7
  76. data/lib/rollbar/util/ip_anonymizer.rb +1 -1
  77. data/lib/rollbar/util.rb +19 -13
  78. data/lib/rollbar/version.rb +1 -1
  79. data/lib/rollbar.rb +12 -7
  80. data/lib/tasks/benchmark.rake +2 -1
  81. data/rollbar.gemspec +5 -3
  82. metadata +17 -12
  83. data/.travis.yml +0 -284
  84. data/lib/rollbar/encoding/legacy_encoder.rb +0 -20
  85. /data/lib/generators/rollbar/templates/{initializer.rb → initializer.erb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69307fc6496e1b12a3ebbe3e40b7341f725a7f4efadd6a1a5e76d7246bc86928
4
- data.tar.gz: 117fb5d03ab1f140f9469558c6560963180806935d3d56eeeb35da9cf450edc6
3
+ metadata.gz: 95b3c3bbbb1f542faf2c67fff212c6a4eb7f0c4986c827fa14b8a64f9c98046c
4
+ data.tar.gz: 101b72445564b0b8f656f9194ff9140d0551bc556b5444bf69ef4f8c8be67d61
5
5
  SHA512:
6
- metadata.gz: 61587004c5ba54fffb2bd34d9f4abdfd182a82002ebcbe688c8c500975797f43f2caac63ce3ca510276828e1b2132cda95027b42ea02533221a18a008d8d654b
7
- data.tar.gz: 9b62efc68f689811910cb92ae3262447c41732eaa6ebdc14019b7fd96114fcfebddf921e29699480e1fa7a21d54281e9130e99a3c85f8104f2d4440fd22f840d
6
+ metadata.gz: 7f96379fee61b2b5dcef9f4f4c853c7602fba3ab51ec8e5ae8c95d1d034134e268cb2861842c68877b421c081979dec9b509d6b817e72bac26846d294f1b47f0
7
+ data.tar.gz: 7d0bd5d1c9ce8f0c0c1f49a1be17f99caa43bf8c15daab6b0674b423f5bdefe03cbc091b56657959a4575c0b1e64988e9f8155a1a8046e6724bb89c2e6fb8917
@@ -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,104 @@
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.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/rails70.gemfile
23
+ ruby-version: 3.1.1
24
+ - gemfile: gemfiles/rails70.gemfile
25
+ ruby-version: 3.0.3
26
+ - gemfile: gemfiles/rails61.gemfile
27
+ ruby-version: 3.0.3
28
+ - gemfile: gemfiles/rails42.gemfile
29
+ ruby-version: 2.4.5
30
+ - gemfile: gemfiles/rails42.gemfile
31
+ ruby-version: 2.3.8
32
+ - gemfile: gemfiles/rails42.gemfile
33
+ ruby-version: 2.2.10
34
+ - gemfile: gemfiles/rails41.gemfile
35
+ ruby-version: 2.3.0
36
+ - gemfile: gemfiles/rails41.gemfile
37
+ ruby-version: 2.2.10
38
+ - gemfile: gemfiles/rails41.gemfile
39
+ ruby-version: 2.1.9
40
+ - gemfile: gemfiles/rails40.gemfile
41
+ ruby-version: 2.3.0
42
+ - gemfile: gemfiles/rails40.gemfile
43
+ ruby-version: 2.2.10
44
+ - gemfile: gemfiles/rails40.gemfile
45
+ ruby-version: 2.1.9
46
+ - gemfile: gemfiles/rails32.gemfile
47
+ ruby-version: 2.2.10
48
+ - gemfile: gemfiles/rails32.gemfile
49
+ ruby-version: 2.1.9
50
+ - gemfile: gemfiles/rails31.gemfile
51
+ ruby-version: 2.0.0
52
+ - gemfile: gemfiles/rails30.gemfile
53
+ ruby-version: 2.0.0
54
+
55
+ steps:
56
+ - uses: actions/checkout@v2
57
+ with:
58
+ submodules: recursive
59
+
60
+ - name: Start Redis
61
+ uses: supercharge/redis-github-action@1.1.0
62
+ with:
63
+ redis-version: 4
64
+
65
+ - name: Setup Ruby > 2.0
66
+ uses: ruby/setup-ruby@v1
67
+ if: ${{ matrix.ruby-version != '2.0.0' }}
68
+ with:
69
+ ruby-version: ${{ matrix.ruby-version }}
70
+
71
+ - name: Setup Ruby 2.0.0
72
+ if: ${{ matrix.ruby-version == '2.0.0' }}
73
+ timeout-minutes: 15
74
+ run: |
75
+ sudo apt-get update -y
76
+ sudo apt-get install -y libssl1.0-dev
77
+ wget http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p648.tar.gz
78
+ tar xvfz ruby-2.0.0-p648.tar.gz
79
+ cd ruby-2.0.0-p648
80
+ ./configure && make && sudo make install-nodoc
81
+
82
+ - name: Ruby 2.0.0, install bundler
83
+ if: ${{ matrix.ruby-version == '2.0.0' }}
84
+ run: sudo gem install bundler -v 1.17.3
85
+
86
+ - name: Rails 4.2 ensure bundler version
87
+ if: ${{ matrix.gemfile == 'gemfiles/rails42.gemfile' }}
88
+ run: |
89
+ gem uninstall bundler
90
+ gem install bundler -v '< 2.0.0'
91
+
92
+ - name: Bundle Install
93
+ run: |
94
+ export BUNDLE_GEMFILE=${{ matrix.gemfile }}
95
+ bundle config path vendor/bundle
96
+ bundle config gemfile ${{ matrix.gemfile }}
97
+ bundle install --jobs 4 --retry 3
98
+
99
+ - name: Rspec
100
+ run: |
101
+ export BUNDLE_GEMFILE=${{ matrix.gemfile }}
102
+ bundle config path vendor/bundle
103
+ bundle config gemfile ${{ matrix.gemfile }}
104
+ bundle exec rspec
data/.rubocop.yml CHANGED
@@ -4,52 +4,30 @@ 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
- Style/HashSyntax:
9
- EnforcedStyle: hash_rockets
10
- SupportedStyles:
11
- - hash_rockets
12
-
13
- Style/SymbolArray:
14
- Enabled: false # %i[] syntax isn't 1.9.x compatible
15
-
16
- Metrics/LineLength:
17
- Max: 1000
18
-
19
- Metrics/MethodLength:
20
- Max: 15 # Relax slightly from the default of 10
11
+ Gemspec/RequiredRubyVersion:
12
+ Enabled: false # rubocop compares to gemspec, yet won't allow 1.9 as minimum version
21
13
 
22
- Style/DoubleNegation:
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.
23
17
  Enabled: false
24
18
 
25
- Style/Lambda:
26
- Enabled: false
19
+ Layout/LineLength:
20
+ Max: 90
27
21
 
28
- Style/EachWithObject:
22
+ Lint/SendWithMixinArgument:
23
+ # Object#include is still a private method in Ruby 2.0.
29
24
  Enabled: false
30
25
 
31
26
  Metrics/BlockLength:
32
27
  ExcludedMethods: ['describe', 'context'] # RSpec DSL is expected to have long blocks.
33
28
 
34
- Style/ExpandPathArguments:
35
- Enabled: false # syntax requires Ruby >= 2.0
36
-
37
- Gemspec/RequiredRubyVersion:
38
- Enabled: false # rubocop compares to gemspec, yet won't allow 1.9 as minimum version
39
-
40
- Style/Encoding:
41
- Enabled: false # Ruby 1.9.3 needs these magic comments, e.g. # encoding: UTF-8
42
-
43
- Style/PercentLiteralDelimiters:
44
- PreferredDelimiters:
45
- # rubocop switched from () to [] at some past version.
46
- # Make sure we are consistent across all bundles/builds.
47
- default: '[]'
48
-
49
- Style/Documentation:
50
- # We can enabled this if/when we want to start doing consistent class documentation.
51
- # As is, we currently add :nodoc: if anything at all.
52
- Enabled: false
29
+ Metrics/MethodLength:
30
+ Max: 15 # Relax slightly from the default of 10
53
31
 
54
32
  Naming/MethodParameterName:
55
33
  # It's possible to configure this cop to allow just about anything, but what's the point.
@@ -64,15 +42,53 @@ Style/CaseEquality:
64
42
  # review and test each of these.
65
43
  Enabled: false
66
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
49
+
50
+ Style/DoubleNegation:
51
+ Enabled: false
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
+
67
62
  Style/FrozenStringLiteralComment:
68
63
  # If we do this, it will be in its own PR. It requires adding these magic comments
69
64
  # throughout the project, in order to prepare for a future Ruby 3.x.
70
65
  Enabled: false
71
66
 
67
+ Style/HashSyntax:
68
+ EnforcedStyle: hash_rockets
69
+ SupportedStyles:
70
+ - hash_rockets
71
+
72
+ Style/Lambda:
73
+ Enabled: false
74
+
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
83
+ Enabled: false
84
+
72
85
  Style/SafeNavigation:
73
86
  # Not available in Ruby < 2.3.
74
87
  Enabled: false
75
88
 
89
+ Style/SymbolArray:
90
+ Enabled: false # %i[] syntax isn't 1.9.x compatible
91
+
76
92
  #
77
93
  # Performance cops are opt in, and `Enabled: true` is always required.
78
94
  # Full list is here: https://github.com/rubocop-hq/rubocop-performance/tree/master/lib/rubocop/cop/performance
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- # This file was generated by Appraisal
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 '>= 2.5.0'
2
4
 
3
5
  source 'https://rubygems.org'
4
6
 
@@ -11,8 +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 = '5.2.2'.freeze
15
-
16
+ GEMFILE_RAILS_VERSION = '~> 6.1.5'.freeze
16
17
  gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
17
18
  gem 'appraisal'
18
19
  gem 'jruby-openssl', :platform => :jruby
@@ -21,41 +22,28 @@ gem 'rake'
21
22
  if GEMFILE_RAILS_VERSION < '6.0'
22
23
  gem 'rspec-rails', '~> 3.4'
23
24
  else
24
- # TODO: update this when 4.x becomes available on Rubygems
25
- gem 'rspec-rails', :git => 'https://github.com/rspec/rspec-rails', :ref => 'v4.0.0.beta2' # rubocop:disable Bundler/DuplicatedGem
25
+ gem 'rspec-rails', '~> 4.0.2'
26
26
  end
27
27
 
28
28
  if GEMFILE_RAILS_VERSION < '6.0'
29
29
  gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
30
30
  else
31
- gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw] # rubocop:disable Bundler/DuplicatedGem
31
+ gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
32
32
  end
33
33
 
34
- if RUBY_VERSION < '2.2.2'
35
- gem 'sidekiq', '~> 2.13.0'
36
- else
37
- gem 'sidekiq', '>= 2.13.0' # rubocop:disable Bundler/DuplicatedGem
38
- end
34
+ gem 'sidekiq', '>= 6.4.0'
39
35
 
40
36
  platforms :rbx do
41
37
  gem 'minitest'
42
38
  gem 'racc'
43
39
  gem 'rubinius-developer_tools'
44
- gem 'rubysl', '~> 2.0' unless RUBY_VERSION.start_with?('1')
40
+ gem 'rubysl', '~> 2.0' if RUBY_VERSION.start_with?('2')
45
41
  end
46
42
 
47
- if RUBY_VERSION.start_with?('1.9')
48
- gem 'capistrano', '<= 3.4.1', :require => false
49
- gem 'json', '1.8.6'
50
- gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
51
- gem 'sucker_punch', '~> 1.0'
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
43
+ gem 'capistrano', :require => false
44
+ gem 'shoryuken'
45
+ gem 'simplecov'
46
+ gem 'sucker_punch', '~> 2.0'
59
47
 
60
48
  unless is_jruby
61
49
  # JRuby doesn't support fork, which is required for this test helper.
@@ -63,18 +51,26 @@ unless is_jruby
63
51
  end
64
52
 
65
53
  gem 'aws-sdk-sqs'
66
- gem 'database_cleaner'
54
+
55
+ if GEMFILE_RAILS_VERSION >= '5.2'
56
+ gem 'database_cleaner'
57
+ elsif GEMFILE_RAILS_VERSION.between?('5.0', '5.2')
58
+ gem 'database_cleaner', '~> 1.8.4'
59
+ elsif GEMFILE_RAILS_VERSION < '5.0'
60
+ gem 'database_cleaner', '~> 1.0.0'
61
+ end
62
+
67
63
  if GEMFILE_RAILS_VERSION < '6.0'
68
64
  gem 'delayed_job', :require => false
69
65
  else
70
- gem 'delayed_job', '~> 4.1', :require => false # rubocop:disable Bundler/DuplicatedGem
66
+ gem 'delayed_job', '~> 4.1', :require => false
71
67
  end
72
68
  gem 'generator_spec'
73
- gem 'girl_friday', '>= 0.11.1'
74
- gem 'redis'
69
+ gem 'redis', '<= 4.8.0'
75
70
  gem 'resque', '< 2.0.0'
76
- gem 'rubocop', :require => false
71
+ gem 'rubocop', '1.15.0', :require => false # pin specific version, update manually
77
72
  gem 'rubocop-performance', :require => false
73
+ gem 'secure_headers', '~> 6.3.2', :require => false
78
74
  gem 'sinatra'
79
75
  gem 'webmock', :require => false
80
76
  gemspec
data/README.md CHANGED
@@ -1,21 +1,35 @@
1
- # Rollbar-gem
2
- [![Build Status](https://travis-ci.org/rollbar/rollbar-gem.svg?branch=master)](https://travis-ci.org/rollbar/rollbar-gem/branches)
3
- [![Gem Version](https://badge.fury.io/rb/rollbar.svg)](http://badge.fury.io/rb/rollbar)
4
- [![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=rollbar&package-manager=bundler&version-scheme=semver&target-version=latest)](https://dependabot.com/compatibility-score.html?dependency-name=rollbar&package-manager=bundler&version-scheme=semver&new-version=latest)
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>
5
4
 
5
+ <h1 align="center">Rollbar Ruby Gem</h1>
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)).
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>
9
10
 
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.
11
+
12
+ ![Build Status](https://github.com/rollbar/rollbar-gem/workflows/Rollbar-gem%20CI/badge.svg?tag=latest)
13
+ [![Gem Version](https://badge.fury.io/rb/rollbar.svg)](http://badge.fury.io/rb/rollbar)
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)
12
15
 
13
16
 
17
+ ---
14
18
 
15
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.
16
20
 
17
21
  Rollbar-gem is the SDK for Ruby apps and includes support for apps using Rails, Sinatra, Rack, plain Ruby, and other frameworks.
18
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
+
19
33
  ## Setup Instructions
20
34
 
21
35
  1. [Sign up for a Rollbar account](https://rollbar.com/signup)
@@ -27,10 +41,20 @@ For complete usage instructions and configuration reference, see our [Ruby SDK d
27
41
 
28
42
  ## Compatibility
29
43
 
44
+ Version >= 3.0.0 is compatible with Ruby >= 2.0.0.
45
+
30
46
  Version >= 2.19.0 is compatible with Ruby >= 1.9.3.
31
47
 
32
48
  Version < 2.19.0 is compatible with Ruby >= 1.8.7.
33
49
 
50
+ ### Ruby 2.6.0
51
+
52
+ > WARNING: Ruby 2.6.0 introduced a new bug ([#15472 -
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)).
54
+
55
+ > UPDATE: This bug is fixed in Ruby 2.6.1, and rollbar-gem has a safe workaround in version >= 2.19.0.
56
+ If you need to stay on Ruby 2.6.0 for any reason, make sure you have the latest rollbar-gem.
57
+
34
58
  ## Release History & Changelog
35
59
 
36
60
  See our [Releases](https://github.com/rollbar/rollbar-gem/releases) page for a list of all releases, including changes.
@@ -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(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.15.2/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);function t(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var a=0;function l(r,e){this.options=r,this._rollbarOldOnError=null;var o=a++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var i=o(3),s=function(r,e){return new l(r,e)},d=function(r){return new i(s,r)};function c(r){return t((function(){var e=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)}))}l.prototype.loadFull=function(r,e,o,n,a){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=t((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,t,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(t=n.args||[],i=0;i<t.length;++i)if("function"==typeof(l=t[i])){l(e);break}}"function"==typeof a&&a(e)}()}})),d.insertBefore(i,s)},l.prototype.wrap=function(r,e,o){try{var n;if(n="function"==typeof e?e:function(){return e||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){o&&"function"==typeof o&&o.apply(this,arguments);try{return r.apply(this,arguments)}catch(o){var e=o;throw e&&("string"==typeof e&&(e=new String(e)),e._rollbarContext=n()||{},e._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=e),e}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(e){return r}};for(var u="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad".split(","),p=0;p<u.length;++p)l.prototype[u[p]]=c(u[p]);r.exports={setupShim:function(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var a=new d(e);return t((function(){e.captureUncaught&&(a._rollbarOldOnError=r.onerror,n.captureUncaughtExceptions(r,a,!0),e.wrapGlobalEventHandlers&&n.wrapGlobals(r,a,!0)),e.captureUnhandledRejections&&n.captureUnhandledRejections(r,a,!0);var t=e.autoInstrument;return!1!==e.enabled&&(void 0===t||!0===t||"object"==typeof t&&t.network)&&r.addEventListener&&(r.addEventListener("load",a.captureLoad.bind(a)),r.addEventListener("DOMContentLoaded",a.captureDomContentLoaded.bind(a))),r[o]=a,a}))()}},Rollbar:d}},function(r,e,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)}function t(r,e,o){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(e,o,t){n.call(this,e,r.wrap(o),t)};t._rollbarOldAdd=n,t.belongsToShim=o,e.addEventListener=t;for(var a=e.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,e,o){a.call(this,r,e&&e._rollbar_wrapped||e,o)};l._rollbarOldRemove=a,l.belongsToShim=o,e.removeEventListener=l}}r.exports={captureUncaughtExceptions:function(r,e,o){if(r){var 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)}},wrapGlobals:function(r,e,o){if(r){var n,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(n=0;n<l.length;++n)r[a=l[n]]&&r[a].prototype&&t(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}}}}]);
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}}}}]);
@@ -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`
@@ -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,24 @@ platforms :rbx do
34
27
  gem 'rubysl-test-unit'
35
28
  end
36
29
 
37
- if RUBY_VERSION.start_with?('1.9')
38
- gem 'capistrano', '<= 3.4.1', :require => false
39
- gem 'sucker_punch', '~> 1.0'
40
- gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
41
- elsif RUBY_VERSION.start_with?('2')
42
- gem 'capistrano', :require => false
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 'rexml', '<= 3.2.4'
32
+ gem 'shoryuken'
33
+ gem 'simplecov', '<= 0.17.1'
34
+ gem 'sucker_punch', '~> 2.0'
48
35
 
49
- gem 'sinatra'
50
- gem 'delayed_job', :require => false
51
- gem 'redis'
52
36
  gem 'database_cleaner', '~> 1.0.0'
37
+ gem 'delayed_job', :require => false
53
38
  gem 'genspec', '>= 0.2.8'
54
39
  gem 'girl_friday', '>= 0.11.1'
40
+ gem 'redis', '<= 3.3.5'
41
+ gem 'redis-namespace', '<= 1.5.0'
55
42
  gem 'rspec-command'
43
+ gem 'sinatra'
56
44
 
57
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
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
45
+ gem 'webmock', :require => false
64
46
 
65
- gem 'resque', '< 2.0.0'
66
47
  gem 'aws-sdk-sqs'
48
+ gem 'resque', '< 2.0.0'
67
49
 
68
50
  gemspec :path => '../'
@@ -2,22 +2,15 @@ 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.1.12'
6
+ gem 'jruby-openssl', :platform => :jruby
7
+ gem 'mixlib-shellout', '<= 2.0.0'
8
+ gem 'net-ssh', '<= 3.1.1'
9
+ gem 'public_suffix', '<= 2.0.5'
10
+ gem 'rails', '~> 3.1.12'
11
+ gem 'rake', '< 11'
19
12
  gem 'rspec-rails', '~> 3.4'
20
- gem 'rake'
13
+ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
21
14
 
22
15
  if RUBY_VERSION < '2.2.2'
23
16
  gem 'sidekiq', '~> 2.13.0'
@@ -33,35 +26,25 @@ platforms :rbx do
33
26
  gem 'rubysl-test-unit'
34
27
  end
35
28
 
36
- if RUBY_VERSION.start_with?('1.9')
37
- gem 'capistrano', '<= 3.4.1', :require => false
38
- gem 'sucker_punch'
39
- gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
40
- elsif RUBY_VERSION.start_with?('2')
41
- gem 'capistrano', :require => false
42
- gem 'sucker_punch'
43
- gem 'shoryuken'
44
- gem 'codacy-coverage'
45
- gem 'simplecov'
46
- end
29
+ gem 'capistrano', :require => false
30
+ gem 'rexml', '<= 3.2.4'
31
+ gem 'shoryuken'
32
+ gem 'simplecov', '<= 0.17.1'
33
+ gem 'sucker_punch'
47
34
 
48
- gem 'sinatra'
49
- gem 'delayed_job', :require => false
50
- gem 'redis'
51
35
  gem 'database_cleaner'
52
- gem 'girl_friday'
36
+ gem 'delayed_job', :require => false
53
37
  gem 'generator_spec'
38
+ gem 'girl_friday'
39
+ gem 'rack-cache', '<= 1.9.0'
40
+ gem 'redis', '<= 3.3.5'
41
+ gem 'redis-namespace', '<= 1.5.0'
54
42
  gem 'rspec-command'
43
+ gem 'sinatra'
55
44
 
56
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
57
- gem 'mime-types', '< 3.0'
58
- gem 'public_suffix', '< 1.5'
59
- gem 'webmock', '< 2.3.0', :require => false
60
- else
61
- gem 'webmock', :require => false
62
- end
45
+ gem 'webmock', :require => false
63
46
 
64
- gem 'resque', '< 2.0.0'
65
47
  gem 'aws-sdk-sqs'
48
+ gem 'resque', '< 2.0.0'
66
49
 
67
50
  gemspec :path => '../'