diff --git a/.gitignore b/.gitignore index b536bfb..9fa5746 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ _yardoc .bundle .config .idea/ +.java-version +.ruby-env .ruby-version .rvmrc .yardoc diff --git a/.rubocop.yml b/.rubocop.yml index 341b841..dfae32b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,3 +2,15 @@ require: - rubocop-rspec - rt_rubocop_defaults inherit_from: .rubocop_todo.yml + +AllCops: + TargetRubyVersion: 2.5 + +Lint/DuplicateBranch: + Enabled: true + +Lint/EmptyClass: + Enabled: true + +Style/NilLambda: + Enabled: true diff --git a/.travis.yml b/.travis.yml index f1093b7..ee432dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,10 @@ language: ruby cache: bundler rvm: - - 2.7.0 - - 2.6.5 - - 2.5.7 - - 2.4.9 - - jruby-9.2.10.0 - - jruby-9.1.17.0 + - 2.7.2 + - 2.6.6 + - 2.5.8 + - jruby-9.2.13.0 # - truffleruby # https://github.com/oracle/truffleruby/issues/1398 jdk: - oraclejdk11 @@ -19,16 +17,13 @@ env: matrix: exclude: - - rvm: 2.7.0 + - rvm: 2.7.2 env: "JRUBY_OPTS='-Xcompile.invokedynamic=true --debug'" - - rvm: 2.6.5 + - rvm: 2.6.6 env: "JRUBY_OPTS='-Xcompile.invokedynamic=true --debug'" - - rvm: 2.5.7 - env: "JRUBY_OPTS='-Xcompile.invokedynamic=true --debug'" - - rvm: 2.4.9 + - rvm: 2.5.8 env: "JRUBY_OPTS='-Xcompile.invokedynamic=true --debug'" allow_failures: - - rvm: 2.4.9 - rvm: truffleruby - env: "JRUBY_OPTS='-Xcompile.invokedynamic=true --debug'" services: diff --git a/sidekiq-undertaker.gemspec b/sidekiq-undertaker.gemspec index b1d9496..0da8605 100644 --- a/sidekiq-undertaker.gemspec +++ b/sidekiq-undertaker.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |spec| "build_status_uri" => "https://travis-ci.org/ThomasKoppensteiner/sidekiq-undertaker" } - spec.required_ruby_version = ">= 2.4.0" + spec.required_ruby_version = ">= 2.5.0" spec.files = `git ls-files -z`.split("\x0") spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "bundler", ">= 1.17", "<3" spec.add_development_dependency "rake", "~> 13.0" - spec.add_development_dependency "approvals", "~> 0.0", ">= 0.0.24" + spec.add_development_dependency "approvals", "~> 0.0.24" spec.add_development_dependency "mock_redis", "~> 0.19" spec.add_development_dependency "pry", "~> 0.12" spec.add_development_dependency "rack-test", "~> 1.1" @@ -52,5 +52,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "sinatra", "~> 2.0" spec.add_development_dependency "timecop", "~> 0.9" - spec.add_runtime_dependency "sidekiq", ">= 5.2", "< 7" + spec.add_runtime_dependency "sidekiq", "~> 6" end diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_filter_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_filter_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt deleted file mode 100644 index 02e3783..0000000 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_filter_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt +++ /dev/null @@ -1,240 +0,0 @@ - - - - [TEST] Sidekiq - - - - - - - - - - - - - - - - - -
-
-
-
- - -
- -
-
-
-

- 4 dead jobs -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
JobsAll1 hour3 hours1 day3 days1 weekOlder
all4400000
HardWorker3300000
HardWorker11100000
- -
-
-
-
- - - - diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_filter_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_filter_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt index 568ac34..4c44c53 100644 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_filter_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt +++ b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_filter_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt @@ -9,7 +9,7 @@ - + diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt deleted file mode 100644 index 028ef2f..0000000 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt +++ /dev/null @@ -1,241 +0,0 @@ - - - - [TEST] Sidekiq - - - - - - - - - - - - - - - - - -
-
-
-
- - -
- -
-
-
-

- 3 dead jobs - of HardWorker class -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ErrorAll1 hour3 hours1 day3 days1 weekOlder
all3300000
RuntimeError2200000
NoMethodError1100000
- -
-
-
-
- - - - diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt index 22863b6..a744d52 100644 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt +++ b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_called/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt @@ -9,7 +9,7 @@ - + diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_polled/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_polled/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt deleted file mode 100644 index cdeba5d..0000000 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_polled/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt +++ /dev/null @@ -1,241 +0,0 @@ - - - - [TEST] Sidekiq - - - - - - - - - - - - - - - - - -
-
-
-
- - -
- -
-
-
-

- 3 dead jobs - of HardWorker class -

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ErrorAll1 hour3 hours1 day3 days1 weekOlder
all3300000
RuntimeError2200000
NoMethodError1100000
- -
-
-
-
- - - - diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_polled/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_polled/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt index 87677bc..8cea5ad 100644 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_polled/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt +++ b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_filter/when_job_classbucket_page_is_polled/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt @@ -9,7 +9,7 @@ - + diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_all_failures_and_errors/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_all_failures_and_errors/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt deleted file mode 100644 index 9f0db58..0000000 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_all_failures_and_errors/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt +++ /dev/null @@ -1,319 +0,0 @@ - - - - [TEST] Sidekiq - - - - - - - - - - - - - - - - - -
-
-
-
- - -
- -
-
-
-

- 4 dead jobs - - - in total_dead bucket -

-
-
-
- - -
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Last RetryQueueJobArgumentsError
- - - - - foo - HardWorker1 -
"asdf", 1234
-
-
NoMethodError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
NoMethodError: Some fake message
-
- - -
- -
- - -
- -
- - -
- - -
-
-
-
- - - - diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_all_failures_and_errors/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_all_failures_and_errors/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt index 95a793f..60fc22a 100644 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_all_failures_and_errors/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt +++ b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_all_failures_and_errors/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt @@ -9,7 +9,7 @@ - + diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt deleted file mode 100644 index ca65815..0000000 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt +++ /dev/null @@ -1,277 +0,0 @@ - - - - [TEST] Sidekiq - - - - - - - - - - - - - - - - - -
-
-
-
- - -
- -
-
-
-

- 2 dead jobs - of HardWorker class - with RuntimeError exception - in 1_hour bucket -

-
-
-
- - -
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Last RetryQueueJobArgumentsError
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - -
- -
- - -
- -
- - -
- - -
-
-
-
- - - - diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt index 6ee4f37..580a007 100644 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt +++ b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt @@ -9,7 +9,7 @@ - + diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/with_pagination/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/with_pagination/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt deleted file mode 100644 index e675f85..0000000 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/with_pagination/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv5.approved.txt +++ /dev/null @@ -1,1303 +0,0 @@ - - - - [TEST] Sidekiq - - - - - - - - - - - - - - - - - -
-
-
-
- - -
- -
-
-
-

- 52 dead jobs - of HardWorker class - with RuntimeError exception - in 1_hour bucket -

-
-
-
- -
    -
  • - « -
  • - -
  • - 1 -
  • - -
  • - 2 -
  • - -
  • - » -
  • -
- - -
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Last RetryQueueJobArgumentsError
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - - - - foo - HardWorker -
"asdf", 1234
-
-
RuntimeError: Some fake message
-
- - -
- -
- - -
- -
- - -
- - -
-
-
-
- - - - diff --git a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/with_pagination/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/with_pagination/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt index 364b1f6..e5bc3a9 100644 --- a/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/with_pagination/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt +++ b/spec/fixtures/approvals/sidekiq_undertaker_webextension/show_morgue/when_job_classerrorbucket_is_called/with_specific_job_class_and_a_specific_error/with_pagination/behaves_like_a_page/the_displayed_page_is_correct_for_sidekiqv6.approved.txt @@ -9,7 +9,7 @@ - +