Skip to content

Commit

Permalink
WIP 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasKoppensteiner committed Jan 26, 2021
1 parent 84026e4 commit f182ffd
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 19 deletions.
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-1-2
channel: rubocop-1-8-1
config:
file: .rubocop_codeclimate.yml
11 changes: 2 additions & 9 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
require:
- rubocop-rake
- 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
5 changes: 5 additions & 0 deletions .rubocop_codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
require:
- rubocop-rake
- rubocop-rspec

inherit_from:
- .rt_rubocop_defaults.yml
- .rubocop_todo.yml

RSpec/MultipleMemoizedHelpers:
Enabled: false
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
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: 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
5 changes: 3 additions & 2 deletions sidekiq-undertaker.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ 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", "~> 2.1"
spec.add_development_dependency "rubocop", "~> 1.2"
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"
Expand Down
4 changes: 2 additions & 2 deletions spec/sidekiq/undertaker/job_distributor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module Undertaker

let(:dead_jobs) { [dead_job1, dead_job2, dead_job3, dead_job4] }

# rubocop:disable Metrics/LineLength
# rubocop:disable Layout/LineLength
describe "#group_by_job_class" do
subject(:distribution) { described_class.new(dead_jobs).group_by_job_class }

Expand Down Expand Up @@ -98,7 +98,7 @@ module Undertaker
expect(distribution).to eq expected_distribution
end
end
# rubocop:enable Metrics/LineLength
# rubocop:enable Layout/LineLength
end
end
end

0 comments on commit f182ffd

Please sign in to comment.