rollbar 2.19.1 → 2.27.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/pull_request_template.md +25 -0
- data/.rubocop.yml +168 -0
- data/.travis.yml +63 -34
- data/Appraisals +10 -10
- data/Gemfile +35 -14
- data/README.md +5 -2
- data/Rakefile +0 -0
- data/data/rollbar.snippet.js +1 -1
- data/docs/configuration.md +17 -0
- data/gemfiles/rails30.gemfile +10 -10
- data/gemfiles/rails31.gemfile +10 -9
- data/gemfiles/rails32.gemfile +10 -9
- data/gemfiles/rails40.gemfile +10 -9
- data/gemfiles/rails41.gemfile +10 -9
- data/gemfiles/rails42.gemfile +12 -9
- data/gemfiles/rails50.gemfile +21 -14
- data/gemfiles/rails51.gemfile +21 -14
- data/gemfiles/rails52.gemfile +15 -12
- data/gemfiles/rails60.gemfile +67 -0
- data/lib/generators/rollbar/rollbar_generator.rb +1 -1
- data/lib/rails/rollbar_runner.rb +4 -2
- data/lib/rollbar/capistrano.rb +1 -1
- data/lib/rollbar/capistrano3.rb +6 -3
- data/lib/rollbar/capistrano_tasks.rb +29 -21
- data/lib/rollbar/configuration.rb +86 -16
- data/lib/rollbar/delay/girl_friday.rb +4 -8
- data/lib/rollbar/delay/resque.rb +3 -6
- data/lib/rollbar/delay/sidekiq.rb +4 -10
- data/lib/rollbar/delay/sucker_punch.rb +16 -19
- data/lib/rollbar/delay/thread.rb +16 -2
- data/lib/rollbar/deploy.rb +52 -29
- data/lib/rollbar/encoding/encoder.rb +17 -10
- data/lib/rollbar/exception_reporter.rb +19 -5
- data/lib/rollbar/item/backtrace.rb +13 -3
- data/lib/rollbar/item/frame.rb +9 -1
- data/lib/rollbar/item/locals.rb +100 -0
- data/lib/rollbar/item.rb +56 -17
- data/lib/rollbar/json.rb +6 -51
- data/lib/rollbar/language_support.rb +4 -20
- data/lib/rollbar/lazy_store.rb +5 -5
- data/lib/rollbar/logger.rb +1 -0
- data/lib/rollbar/logger_proxy.rb +6 -2
- data/lib/rollbar/middleware/js.rb +28 -18
- data/lib/rollbar/middleware/rack.rb +4 -1
- data/lib/rollbar/middleware/rails/rollbar.rb +10 -1
- data/lib/rollbar/notifier/trace_with_bindings.rb +65 -0
- data/lib/rollbar/notifier.rb +225 -89
- data/lib/rollbar/plugin.rb +54 -6
- data/lib/rollbar/plugins/active_job.rb +6 -2
- data/lib/rollbar/plugins/basic_socket.rb +21 -6
- data/lib/rollbar/plugins/delayed_job/job_data.rb +3 -3
- data/lib/rollbar/plugins/delayed_job/plugin.rb +13 -3
- data/lib/rollbar/plugins/error_context.rb +11 -0
- data/lib/rollbar/plugins/goalie.rb +11 -3
- data/lib/rollbar/plugins/rails/controller_methods.rb +15 -3
- data/lib/rollbar/plugins/rake.rb +2 -2
- data/lib/rollbar/plugins/sidekiq/plugin.rb +5 -4
- data/lib/rollbar/plugins.rb +7 -1
- data/lib/rollbar/rake_tasks.rb +4 -148
- data/lib/rollbar/request_data_extractor.rb +31 -21
- data/lib/rollbar/rollbar_test.rb +36 -0
- data/lib/rollbar/scrubbers/params.rb +19 -18
- data/lib/rollbar/scrubbers/url.rb +18 -9
- data/lib/rollbar/scrubbers.rb +3 -3
- data/lib/rollbar/truncation/frames_strategy.rb +1 -1
- data/lib/rollbar/truncation/min_body_strategy.rb +2 -3
- data/lib/rollbar/truncation/mixin.rb +1 -1
- data/lib/rollbar/truncation/remove_any_key_strategy.rb +123 -0
- data/lib/rollbar/truncation/remove_extra_strategy.rb +35 -0
- data/lib/rollbar/truncation/remove_request_strategy.rb +21 -0
- data/lib/rollbar/truncation/strings_strategy.rb +6 -5
- data/lib/rollbar/truncation.rb +9 -2
- data/lib/rollbar/util/hash.rb +15 -0
- data/lib/rollbar/util/ip_anonymizer.rb +8 -7
- data/lib/rollbar/util/ip_obfuscator.rb +1 -1
- data/lib/rollbar/util.rb +6 -2
- data/lib/rollbar/version.rb +1 -1
- data/lib/rollbar.rb +2 -3
- data/lib/tasks/benchmark.rake +103 -0
- data/rollbar.gemspec +13 -5
- data/spec/support/rollbar_api.rb +67 -0
- metadata +21 -23
- data/gemfiles/ruby_1_8_and_1_9_2.gemfile +0 -49
- data/lib/rollbar/json/default.rb +0 -11
- data/lib/rollbar/json/oj.rb +0 -16
data/gemfiles/rails31.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
@@ -12,15 +19,7 @@ gem 'rails', '3.1.12'
|
|
12
19
|
gem 'rspec-rails', '~> 3.4'
|
13
20
|
gem 'rake'
|
14
21
|
|
15
|
-
|
16
|
-
if RUBY_VERSION >= '2.4.0'
|
17
|
-
gem 'oj', '~> 2.16.1'
|
18
|
-
else
|
19
|
-
gem 'oj', '~> 2.12.14'
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
|
22
|
+
if RUBY_VERSION < '2.2.2'
|
24
23
|
gem 'sidekiq', '~> 2.13.0'
|
25
24
|
else
|
26
25
|
gem 'sidekiq', '>= 2.13.0'
|
@@ -35,9 +34,11 @@ platforms :rbx do
|
|
35
34
|
end
|
36
35
|
|
37
36
|
if RUBY_VERSION.start_with?('1.9')
|
37
|
+
gem 'capistrano', '<= 3.4.1', :require => false
|
38
38
|
gem 'sucker_punch'
|
39
39
|
gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
|
40
40
|
elsif RUBY_VERSION.start_with?('2')
|
41
|
+
gem 'capistrano', :require => false
|
41
42
|
gem 'sucker_punch'
|
42
43
|
gem 'shoryuken'
|
43
44
|
gem 'codacy-coverage'
|
data/gemfiles/rails32.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
@@ -14,15 +21,7 @@ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
|
14
21
|
# Please see https://github.com/rspec/rspec-rails/issues/1273
|
15
22
|
gem 'test-unit'
|
16
23
|
|
17
|
-
|
18
|
-
if RUBY_VERSION >= '2.4.0'
|
19
|
-
gem 'oj', '~> 2.16.1'
|
20
|
-
else
|
21
|
-
gem 'oj', '~> 2.12.14'
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
|
24
|
+
if RUBY_VERSION < '2.2.2'
|
26
25
|
gem 'sidekiq', '~> 2.13.0'
|
27
26
|
else
|
28
27
|
gem 'sidekiq', '>= 2.13.0'
|
@@ -37,9 +36,11 @@ platforms :rbx do
|
|
37
36
|
end
|
38
37
|
|
39
38
|
if RUBY_VERSION.start_with?('1.9')
|
39
|
+
gem 'capistrano', '<= 3.4.1', :require => false
|
40
40
|
gem 'sucker_punch', '~> 1.0'
|
41
41
|
gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
|
42
42
|
elsif RUBY_VERSION.start_with?('2')
|
43
|
+
gem 'capistrano', :require => false
|
43
44
|
gem 'sucker_punch', '~> 2.0'
|
44
45
|
gem 'shoryuken'
|
45
46
|
gem 'codacy-coverage'
|
data/gemfiles/rails40.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
@@ -14,15 +21,7 @@ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
|
14
21
|
# Please see https://github.com/rspec/rspec-rails/issues/1273
|
15
22
|
gem 'test-unit'
|
16
23
|
|
17
|
-
|
18
|
-
if RUBY_VERSION >= '2.4.0'
|
19
|
-
gem 'oj', '~> 2.16.1'
|
20
|
-
else
|
21
|
-
gem 'oj', '~> 2.12.14'
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
|
24
|
+
if RUBY_VERSION < '2.2.2'
|
26
25
|
gem 'sidekiq', '~> 2.13.0'
|
27
26
|
else
|
28
27
|
gem 'sidekiq', '>= 2.13.0'
|
@@ -37,10 +36,12 @@ platforms :rbx do
|
|
37
36
|
end
|
38
37
|
|
39
38
|
if RUBY_VERSION.start_with?('1.9')
|
39
|
+
gem 'capistrano', '<= 3.4.1', :require => false
|
40
40
|
gem 'sucker_punch', '~> 1.0'
|
41
41
|
gem 'json', '~> 1.8'
|
42
42
|
gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
|
43
43
|
elsif RUBY_VERSION.start_with?('2')
|
44
|
+
gem 'capistrano', :require => false
|
44
45
|
gem 'sucker_punch', '~> 2.0'
|
45
46
|
gem 'json', '~> 2.0'
|
46
47
|
gem 'shoryuken'
|
data/gemfiles/rails41.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
@@ -12,15 +19,7 @@ gem 'rake'
|
|
12
19
|
gem 'rspec-rails', '~> 3.4'
|
13
20
|
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
14
21
|
|
15
|
-
|
16
|
-
if RUBY_VERSION >= '2.4.0'
|
17
|
-
gem 'oj', '~> 2.16.1'
|
18
|
-
else
|
19
|
-
gem 'oj', '~> 2.12.14'
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
|
22
|
+
if RUBY_VERSION < '2.2.2'
|
24
23
|
gem 'sidekiq', '~> 2.13.0'
|
25
24
|
else
|
26
25
|
gem 'sidekiq', '>= 2.13.0'
|
@@ -34,9 +33,11 @@ platforms :rbx do
|
|
34
33
|
end
|
35
34
|
|
36
35
|
if RUBY_VERSION.start_with?('1.9')
|
36
|
+
gem 'capistrano', '<= 3.4.1', :require => false
|
37
37
|
gem 'sucker_punch', '~> 1.0'
|
38
38
|
gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
|
39
39
|
elsif RUBY_VERSION.start_with?('2')
|
40
|
+
gem 'capistrano', :require => false
|
40
41
|
gem 'sucker_punch', '~> 2.0'
|
41
42
|
gem 'shoryuken'
|
42
43
|
gem 'codacy-coverage'
|
data/gemfiles/rails42.gemfile
CHANGED
@@ -2,6 +2,13 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
is_not_jruby = !is_jruby
|
7
14
|
|
@@ -20,25 +27,21 @@ platforms :rbx do
|
|
20
27
|
gem 'rubysl', '~> 2.0' unless RUBY_VERSION.start_with?('1')
|
21
28
|
end
|
22
29
|
|
23
|
-
|
24
|
-
|
25
|
-
gem 'oj'
|
26
|
-
elsif RUBY_VERSION >= '2.4.0'
|
27
|
-
gem 'oj', '~> 2.16.1'
|
28
|
-
else
|
29
|
-
gem 'oj', '~> 2.12.14'
|
30
|
-
end
|
30
|
+
if RUBY_VERSION < '2.0.0'
|
31
|
+
gem 'json', '1.8.6'
|
31
32
|
end
|
32
33
|
|
33
|
-
if RUBY_VERSION
|
34
|
+
if RUBY_VERSION < '2.2.2'
|
34
35
|
gem 'sidekiq', '~> 2.13.0'
|
35
36
|
else
|
36
37
|
gem 'sidekiq', '>= 2.13.0'
|
37
38
|
end
|
38
39
|
|
39
40
|
if RUBY_VERSION.start_with?('1.9')
|
41
|
+
gem 'capistrano', '<= 3.4.1', :require => false
|
40
42
|
gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
|
41
43
|
elsif RUBY_VERSION.start_with?('2')
|
44
|
+
gem 'capistrano', :require => false
|
42
45
|
gem 'shoryuken'
|
43
46
|
end
|
44
47
|
|
data/gemfiles/rails50.gemfile
CHANGED
@@ -2,12 +2,19 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
8
15
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
9
16
|
gem 'jruby-openssl', :platform => :jruby
|
10
|
-
gem 'rails', '~> 5.0.
|
17
|
+
gem 'rails', '~> 5.0.7'
|
11
18
|
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
12
19
|
|
13
20
|
gem 'rspec-core', '~> 3.5.0.beta3'
|
@@ -20,16 +27,6 @@ gem 'rake'
|
|
20
27
|
|
21
28
|
gem 'sidekiq', '>= 2.13.0'
|
22
29
|
|
23
|
-
unless is_jruby
|
24
|
-
if RUBY_VERSION >= '2.5'
|
25
|
-
gem 'oj'
|
26
|
-
elsif RUBY_VERSION >= '2.4.0'
|
27
|
-
gem 'oj', '~> 2.16.1'
|
28
|
-
else
|
29
|
-
gem 'oj', '~> 2.12.14'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
30
|
platforms :rbx do
|
34
31
|
gem 'minitest'
|
35
32
|
gem 'racc'
|
@@ -38,23 +35,33 @@ platforms :rbx do
|
|
38
35
|
end
|
39
36
|
|
40
37
|
if RUBY_VERSION.start_with?('1.9')
|
38
|
+
gem 'capistrano', '<= 3.4.1', :require => false
|
41
39
|
gem 'sucker_punch', '~> 1.0'
|
42
40
|
elsif RUBY_VERSION.start_with?('2')
|
41
|
+
gem 'capistrano', :require => false
|
43
42
|
gem 'sucker_punch', '~> 2.0'
|
44
43
|
gem 'codacy-coverage'
|
45
44
|
gem 'simplecov'
|
46
45
|
end
|
47
46
|
|
48
|
-
|
49
|
-
gem '
|
47
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3')
|
48
|
+
gem 'rack', '2.1.2'
|
49
|
+
end
|
50
|
+
|
51
|
+
# We need last sinatra that uses rack 2.1.x
|
52
|
+
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag => 'v2.0.8'
|
50
53
|
gem 'database_cleaner'
|
51
54
|
gem 'delayed_job', :require => false
|
52
55
|
gem 'generator_spec'
|
53
56
|
gem 'girl_friday', '>= 0.11.1'
|
54
|
-
gem 'rspec-command'
|
55
57
|
gem 'redis'
|
56
58
|
gem 'resque'
|
57
59
|
|
60
|
+
unless is_jruby
|
61
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
62
|
+
gem 'rspec-command'
|
63
|
+
end
|
64
|
+
|
58
65
|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
|
59
66
|
gem 'mime-types', '< 3.0'
|
60
67
|
end
|
data/gemfiles/rails51.gemfile
CHANGED
@@ -2,12 +2,19 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
8
15
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
9
16
|
gem 'jruby-openssl', :platform => :jruby
|
10
|
-
gem 'rails', '~> 5.1.
|
17
|
+
gem 'rails', '~> 5.1.7'
|
11
18
|
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
12
19
|
|
13
20
|
gem 'rspec-core', '~> 3.5.0.beta3'
|
@@ -20,16 +27,6 @@ gem 'rake'
|
|
20
27
|
|
21
28
|
gem 'sidekiq', '>= 2.13.0'
|
22
29
|
|
23
|
-
unless is_jruby
|
24
|
-
if RUBY_VERSION >= '2.5'
|
25
|
-
gem 'oj'
|
26
|
-
elsif RUBY_VERSION >= '2.4.0'
|
27
|
-
gem 'oj', '~> 2.16.1'
|
28
|
-
else
|
29
|
-
gem 'oj', '~> 2.12.14'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
30
|
platforms :rbx do
|
34
31
|
gem 'minitest'
|
35
32
|
gem 'racc'
|
@@ -38,24 +35,34 @@ platforms :rbx do
|
|
38
35
|
end
|
39
36
|
|
40
37
|
if RUBY_VERSION.start_with?('1.9')
|
38
|
+
gem 'capistrano', '<= 3.4.1', :require => false
|
41
39
|
gem 'sucker_punch', '~> 1.0'
|
42
40
|
elsif RUBY_VERSION.start_with?('2')
|
41
|
+
gem 'capistrano', :require => false
|
43
42
|
gem 'sucker_punch', '~> 2.0'
|
44
43
|
gem 'codacy-coverage'
|
45
44
|
gem 'simplecov'
|
46
45
|
end
|
47
46
|
|
48
|
-
|
49
|
-
gem '
|
47
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3')
|
48
|
+
gem 'rack', '2.1.2'
|
49
|
+
end
|
50
|
+
|
51
|
+
# We need last sinatra that uses rack 2.1.x
|
52
|
+
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra', :tag => 'v2.0.8'
|
50
53
|
|
51
54
|
gem 'database_cleaner'
|
52
55
|
gem 'delayed_job', :require => false
|
53
56
|
gem 'generator_spec'
|
54
57
|
gem 'girl_friday', '>= 0.11.1'
|
55
|
-
gem 'rspec-command'
|
56
58
|
gem 'redis'
|
57
59
|
gem 'resque'
|
58
60
|
|
61
|
+
unless is_jruby
|
62
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
63
|
+
gem 'rspec-command'
|
64
|
+
end
|
65
|
+
|
59
66
|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0')
|
60
67
|
gem 'mime-types', '< 3.0'
|
61
68
|
end
|
data/gemfiles/rails52.gemfile
CHANGED
@@ -2,12 +2,19 @@ require 'rubygems/version'
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
6
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
7
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
8
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
9
|
+
# with the wrong gemfile path.
|
10
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
11
|
+
|
5
12
|
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
6
13
|
|
7
14
|
gem 'appraisal'
|
8
15
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
9
16
|
gem 'jruby-openssl', :platform => :jruby
|
10
|
-
gem 'rails', '~> 5.2.
|
17
|
+
gem 'rails', '~> 5.2.3'
|
11
18
|
gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
|
12
19
|
|
13
20
|
gem 'rspec-core', '~> 3.8.0'
|
@@ -18,16 +25,6 @@ gem 'rspec-mocks', '~> 3.8.0'
|
|
18
25
|
|
19
26
|
gem 'rake'
|
20
27
|
|
21
|
-
unless is_jruby
|
22
|
-
if RUBY_VERSION >= '2.5'
|
23
|
-
gem 'oj'
|
24
|
-
elsif RUBY_VERSION >= '2.4.0'
|
25
|
-
gem 'oj', '~> 2.16.1'
|
26
|
-
else
|
27
|
-
gem 'oj', '~> 2.12.14'
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
28
|
gem 'sidekiq', '>= 2.13.0'
|
32
29
|
|
33
30
|
platforms :rbx do
|
@@ -47,11 +44,15 @@ gem 'codacy-coverage'
|
|
47
44
|
gem 'delayed_job', :require => false
|
48
45
|
gem 'generator_spec'
|
49
46
|
gem 'girl_friday', '>= 0.11.1'
|
50
|
-
gem 'rspec-command'
|
51
47
|
gem 'redis'
|
52
48
|
gem 'resque'
|
53
49
|
gem 'simplecov'
|
54
50
|
|
51
|
+
unless is_jruby
|
52
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
53
|
+
gem 'rspec-command'
|
54
|
+
end
|
55
|
+
|
55
56
|
gem 'mime-types'
|
56
57
|
|
57
58
|
gem 'webmock', :require => false
|
@@ -59,4 +60,6 @@ gem 'webmock', :require => false
|
|
59
60
|
gem 'aws-sdk-sqs'
|
60
61
|
gem 'shoryuken'
|
61
62
|
|
63
|
+
gem 'capistrano', :require => false
|
64
|
+
|
62
65
|
gemspec :path => '../'
|
@@ -0,0 +1,67 @@
|
|
1
|
+
|
2
|
+
require 'rubygems/version'
|
3
|
+
|
4
|
+
source 'https://rubygems.org'
|
5
|
+
|
6
|
+
# Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
|
7
|
+
# new process is created during tests. (Testing rake tasks, for example.)
|
8
|
+
# This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
|
9
|
+
# We use the ||= assignment because Travis loads the gemfile twice, the second time
|
10
|
+
# with the wrong gemfile path.
|
11
|
+
ENV['CURRENT_GEMFILE'] ||= __FILE__
|
12
|
+
|
13
|
+
is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
14
|
+
|
15
|
+
gem 'appraisal'
|
16
|
+
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
17
|
+
gem 'jruby-openssl', :platform => :jruby
|
18
|
+
gem 'rails', '6.0.2.1'
|
19
|
+
gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw]
|
20
|
+
|
21
|
+
gem 'rspec-core', '~> 3.8.0'
|
22
|
+
gem 'rspec-support', '~> 3.8.0'
|
23
|
+
gem 'rspec-expectations', '~> 3.8.0'
|
24
|
+
gem 'rspec-mocks', '~> 3.8.0'
|
25
|
+
# TODO: update this when 4.x becomes available on Rubygems
|
26
|
+
gem 'rspec-rails', :git => 'https://github.com/rspec/rspec-rails', :ref => 'v4.0.0.beta2' # rubocop:disable Bundler/DuplicatedGem
|
27
|
+
|
28
|
+
gem 'rake'
|
29
|
+
|
30
|
+
gem 'sidekiq', '>= 2.13.0'
|
31
|
+
|
32
|
+
platforms :rbx do
|
33
|
+
gem 'minitest'
|
34
|
+
gem 'racc'
|
35
|
+
gem 'rubinius-developer_tools'
|
36
|
+
gem 'rubysl', '~> 2.0' unless RUBY_VERSION.start_with?('1')
|
37
|
+
end
|
38
|
+
|
39
|
+
gem 'sucker_punch', '~> 2.0'
|
40
|
+
|
41
|
+
# We need last sinatra that uses rack 2.x
|
42
|
+
gem 'sinatra', :git => 'https://github.com/sinatra/sinatra'
|
43
|
+
|
44
|
+
gem 'database_cleaner'
|
45
|
+
gem 'codacy-coverage'
|
46
|
+
gem 'delayed_job', '4.1.8.beta1', :require => false
|
47
|
+
gem 'generator_spec'
|
48
|
+
gem 'girl_friday', '>= 0.11.1'
|
49
|
+
gem 'redis'
|
50
|
+
gem 'resque'
|
51
|
+
gem 'simplecov'
|
52
|
+
|
53
|
+
unless is_jruby
|
54
|
+
# JRuby doesn't support fork, which is required for this test helper.
|
55
|
+
gem 'rspec-command'
|
56
|
+
end
|
57
|
+
|
58
|
+
gem 'mime-types'
|
59
|
+
|
60
|
+
gem 'webmock', :require => false
|
61
|
+
|
62
|
+
gem 'aws-sdk-sqs'
|
63
|
+
gem 'shoryuken'
|
64
|
+
|
65
|
+
gem 'capistrano', :require => false
|
66
|
+
|
67
|
+
gemspec :path => '../'
|
data/lib/rails/rollbar_runner.rb
CHANGED
@@ -39,7 +39,7 @@ module Rails
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def eval_runner
|
42
|
-
if Rails.version >= '5.
|
42
|
+
if Gem::Version.new(Rails.version) >= Gem::Version.new('5.1.0')
|
43
43
|
rails5_runner
|
44
44
|
else
|
45
45
|
legacy_runner
|
@@ -55,12 +55,14 @@ module Rails
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def rails5_runner
|
58
|
+
require 'rails/command'
|
59
|
+
|
58
60
|
Rails::Command.invoke 'runner', ARGV
|
59
61
|
end
|
60
62
|
|
61
63
|
def rollbar_managed
|
62
64
|
yield
|
63
|
-
rescue => e
|
65
|
+
rescue StandardError => e
|
64
66
|
Rollbar.scope(:custom => { :command => command }).error(e)
|
65
67
|
raise
|
66
68
|
end
|
data/lib/rollbar/capistrano.rb
CHANGED
@@ -35,7 +35,7 @@ module Rollbar
|
|
35
35
|
_cset(:rollbar_user) { ENV['USER'] || ENV['USERNAME'] }
|
36
36
|
_cset(:rollbar_env) { fetch(:rails_env, 'production') }
|
37
37
|
_cset(:rollbar_token) { abort("Please specify the Rollbar access token, set :rollbar_token, 'your token'") }
|
38
|
-
_cset(:rollbar_revision) {
|
38
|
+
_cset(:rollbar_revision) { real_revision }
|
39
39
|
_cset(:rollbar_comment) { nil }
|
40
40
|
end
|
41
41
|
end
|
data/lib/rollbar/capistrano3.rb
CHANGED
@@ -7,24 +7,27 @@ require 'rollbar/deploy'
|
|
7
7
|
require 'rollbar/capistrano_tasks'
|
8
8
|
|
9
9
|
namespace :rollbar do
|
10
|
+
# dry_run? wasn't introduced till Capistrano 3.5.0; use the old fetch(:sshkit_backed)
|
11
|
+
set :dry_run, (proc { ::Capistrano::Configuration.env.fetch(:sshkit_backend) == ::SSHKit::Backend::Printer })
|
12
|
+
|
10
13
|
desc 'Send deployment started notification to Rollbar.'
|
11
14
|
task :deploy_started do
|
12
15
|
on primary fetch(:rollbar_role) do
|
13
|
-
::Rollbar::CapistranoTasks.deploy_started(self, self, dry_run
|
16
|
+
::Rollbar::CapistranoTasks.deploy_started(self, self, fetch(:dry_run))
|
14
17
|
end
|
15
18
|
end
|
16
19
|
|
17
20
|
desc 'Send deployment succeeded notification to Rollbar.'
|
18
21
|
task :deploy_succeeded do
|
19
22
|
on primary fetch(:rollbar_role) do
|
20
|
-
::Rollbar::CapistranoTasks.deploy_succeeded(self, self, dry_run
|
23
|
+
::Rollbar::CapistranoTasks.deploy_succeeded(self, self, fetch(:dry_run))
|
21
24
|
end
|
22
25
|
end
|
23
26
|
|
24
27
|
desc 'Send deployment failed notification to Rollbar.'
|
25
28
|
task :deploy_failed do
|
26
29
|
on primary fetch(:rollbar_role) do
|
27
|
-
::Rollbar::CapistranoTasks.deploy_failed(self, self, dry_run
|
30
|
+
::Rollbar::CapistranoTasks.deploy_failed(self, self, fetch(:dry_run))
|
28
31
|
end
|
29
32
|
end
|
30
33
|
|