Skip to content

Commit

Permalink
fix: ignore reek for now (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenrixon authored Nov 11, 2023
1 parent f8ade43 commit 28780b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,3 @@ jobs:
bundler-cache: true
- run: bin/bundle --jobs=$(nproc) --retry=$(nproc)
- run: bin/rubocop -P

reek:
runs-on: ubuntu-latest
strategy:
fail-fast: true

steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler: 2.4.12
bundler-cache: true
- run: bin/bundle --jobs=$(nproc) --retry=$(nproc)
- run: bin/reek .
12 changes: 6 additions & 6 deletions lib/sidekiq_unique_jobs/lock_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ def errors_as_string

# the strategy to use as conflict resolution from sidekiq client
def on_client_conflict
if on_conflict.is_a?(Hash)
@on_client_conflict ||= on_conflict["client"] || on_conflict[:client]
@on_client_conflict ||= if on_conflict.is_a?(Hash)
on_conflict["client"] || on_conflict[:client]
else
@on_client_conflict ||= on_conflict
on_conflict
end
end

# the strategy to use as conflict resolution from sidekiq server
def on_server_conflict
if on_conflict.is_a?(Hash)
@on_server_conflict ||= on_conflict["server"] || on_conflict[:server]
@on_server_conflict ||= if on_conflict.is_a?(Hash)
on_conflict["server"] || on_conflict[:server]
else
@on_server_conflict ||= on_conflict
on_conflict
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/sidekiq_unique_jobs/lock_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
end

context "when on_conflict is defined only for server" do
let(:on_conflict) { {server: :log}}
let(:on_conflict) { { server: :log } }

it { is_expected.to be_nil }
end
Expand All @@ -166,7 +166,7 @@
end

context "when on_conflict is defined only for client" do
let(:on_conflict) { {client: :log}}
let(:on_conflict) { { client: :log } }

it { is_expected.to be_nil }
end
Expand Down

0 comments on commit 28780b8

Please sign in to comment.