Skip to content

Commit 28780b8

Browse files
authored
fix: ignore reek for now (#818)
1 parent f8ade43 commit 28780b8

File tree

3 files changed

+8
-23
lines changed

3 files changed

+8
-23
lines changed

.github/workflows/lint.yml

-15
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,3 @@ jobs:
1818
bundler-cache: true
1919
- run: bin/bundle --jobs=$(nproc) --retry=$(nproc)
2020
- run: bin/rubocop -P
21-
22-
reek:
23-
runs-on: ubuntu-latest
24-
strategy:
25-
fail-fast: true
26-
27-
steps:
28-
- uses: actions/checkout@v3
29-
- uses: ruby/setup-ruby@v1
30-
with:
31-
ruby-version: 3.1
32-
bundler: 2.4.12
33-
bundler-cache: true
34-
- run: bin/bundle --jobs=$(nproc) --retry=$(nproc)
35-
- run: bin/reek .

lib/sidekiq_unique_jobs/lock_config.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,19 @@ def errors_as_string
113113

114114
# the strategy to use as conflict resolution from sidekiq client
115115
def on_client_conflict
116-
if on_conflict.is_a?(Hash)
117-
@on_client_conflict ||= on_conflict["client"] || on_conflict[:client]
116+
@on_client_conflict ||= if on_conflict.is_a?(Hash)
117+
on_conflict["client"] || on_conflict[:client]
118118
else
119-
@on_client_conflict ||= on_conflict
119+
on_conflict
120120
end
121121
end
122122

123123
# the strategy to use as conflict resolution from sidekiq server
124124
def on_server_conflict
125-
if on_conflict.is_a?(Hash)
126-
@on_server_conflict ||= on_conflict["server"] || on_conflict[:server]
125+
@on_server_conflict ||= if on_conflict.is_a?(Hash)
126+
on_conflict["server"] || on_conflict[:server]
127127
else
128-
@on_server_conflict ||= on_conflict
128+
on_conflict
129129
end
130130
end
131131
end

spec/sidekiq_unique_jobs/lock_config_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
end
149149

150150
context "when on_conflict is defined only for server" do
151-
let(:on_conflict) { {server: :log}}
151+
let(:on_conflict) { { server: :log } }
152152

153153
it { is_expected.to be_nil }
154154
end
@@ -166,7 +166,7 @@
166166
end
167167

168168
context "when on_conflict is defined only for client" do
169-
let(:on_conflict) { {client: :log}}
169+
let(:on_conflict) { { client: :log } }
170170

171171
it { is_expected.to be_nil }
172172
end

0 commit comments

Comments
 (0)