Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rubocop to version '1.x' #33

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ plugins:
enabled: true
rubocop:
enabled: true
channel: rubocop-0-77
channel: rubocop-1-8-1
config:
file: .rubocop_codeclimate.yml
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ _yardoc
.bundle
.config
.idea/
.java-version
.ruby-env
.ruby-version
.rvmrc
.yardoc
Expand Down
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
require:
- rubocop-rake
- rubocop-rspec
- rt_rubocop_defaults

inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.5
2 changes: 2 additions & 0 deletions .rubocop_codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require:
- rubocop-rake
- rubocop-rspec

inherit_from:
- .rt_rubocop_defaults.yml
- .rubocop_todo.yml
10 changes: 5 additions & 5 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-01-30 23:52:34 +0100 using RuboCop version 0.77.0.
# on 2021-01-26 18:39:16 UTC using RuboCop version 1.8.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# Configuration parameters: Severity.
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes, Severity.
Metrics/AbcSize:
Max: 22

# Offense count: 3
# Configuration parameters: CountComments, ExcludedMethods, Severity.
# Offense count: 2
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods, Severity.
Metrics/MethodLength:
Max: 19
Max: 14

# Offense count: 5
# Configuration parameters: .
Expand Down
19 changes: 7 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ begin
RSpec::Core::RakeTask.new(:spec)

task default: :spec

desc "run specs"
task test: :spec
rescue LoadError
puts "RSpec not available!"
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/undertaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

begin
require "sidekiq/web"
rescue LoadError # rubocop:disable Lint/SuppressedException
rescue LoadError
# client-only usage
end

Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/undertaker/dead_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def ==(other)

attr_writer :job_class, :time_elapsed_since_failure, :error_class, :bucket_name, :job

def job_eql?(other_job) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
def job_eql?(other_job) # rubocop:disable Metrics/AbcSize
job.jid == other_job.jid &&
job.item == other_job.item &&
job.args == other_job.args &&
Expand Down
2 changes: 2 additions & 0 deletions lib/sidekiq/undertaker/web_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
module Sidekiq
module Undertaker
module WebExtension
# rubocop:disable Metrics/MethodLength
def self.registered(app)
app.helpers APIHelpers

Expand Down Expand Up @@ -32,6 +33,7 @@ def self.registered(app)
post_undertaker_job_class_error_class_buckent_name_retry
end
end
# rubocop:enable Metrics/MethodLength
end
end
end
13 changes: 8 additions & 5 deletions sidekiq-undertaker.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Gem::Specification.new do |spec|
"build_status_uri" => "https://travis-ci.org/ThomasKoppensteiner/sidekiq-undertaker"
}

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) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
Expand All @@ -33,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"
Expand All @@ -42,13 +44,14 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rspec-core", "~> 3.8"
spec.add_development_dependency "rspec-mocks", "~> 3.8"
spec.add_development_dependency "rspec-sidekiq", "~> 3.0"
spec.add_development_dependency "rt_rubocop_defaults", "~> 1.2"
spec.add_development_dependency "rubocop", "~> 0.77"
spec.add_development_dependency "rubocop-rspec", "~> 1.30"
spec.add_development_dependency "rt_rubocop_defaults", "~> 2.3"
spec.add_development_dependency "rubocop", "~> 1.8"
spec.add_development_dependency "rubocop-rake", "~> 0.5"
spec.add_development_dependency "rubocop-rspec", "~> 2.0"
spec.add_development_dependency "rubocop_runner", "~> 2.1"
spec.add_development_dependency "simplecov", "~> 0.14"
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
Loading