Skip to content

Commit

Permalink
chore(lint): lint'em real good
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenrixon committed Feb 14, 2023
1 parent 75314c3 commit 2690d41
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bin/_guard-core
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Expand Down
2 changes: 1 addition & 1 deletion bin/appraisal
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Expand Down
2 changes: 1 addition & 1 deletion bin/code_climate_reek
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Expand Down
2 changes: 1 addition & 1 deletion bin/rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Expand Down
2 changes: 1 addition & 1 deletion bin/reek
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Expand Down
2 changes: 1 addition & 1 deletion bin/rspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Expand Down
2 changes: 1 addition & 1 deletion bin/rubocop
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Expand Down
2 changes: 1 addition & 1 deletion spec/sidekiq_unique_jobs/lock/base_lock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

RSpec.describe SidekiqUniqueJobs::Lock::BaseLock do
let(:lock) { described_class.new(item, callback) }
let(:callback) { -> { p "debug" } }
let(:callback) { -> { p "debug" } } # rubocop:disable Lint/Debugger
let(:strategy) { :replace }
let(:jid) { "bogusjobid" }
let(:item) do
Expand Down
2 changes: 1 addition & 1 deletion spec/sidekiq_unique_jobs/on_conflict/replace_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RSpec.describe SidekiqUniqueJobs::OnConflict::Replace do
let(:strategy) { described_class.new(item) }
let(:lock_digest) { "uniquejobs:a1d714a6dacd9fcfe0aa6274af3d5ab4" }
let(:block) { -> { p "Hello" } }
let(:block) { -> { p "Hello" } } # rubocop:disable Lint/Debugger
let(:digest) { digests.entries.first }

let(:item) do
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
chain.add SidekiqUniqueJobs::Middleware::Server
end

config.error_handlers << ->(ex, ctx_hash) { p ex, ctx_hash }
config.error_handlers << ->(ex, ctx_hash) { p ex, ctx_hash } # rubocop:disable Lint/Debugger
config.death_handlers << lambda do |job, _ex|
digest = job["lock_digest"]
SidekiqUniqueJobs::Digests.new.delete_by_digest(digest) if digest
Expand Down Expand Up @@ -119,7 +119,7 @@
end

config.after(:suite) do
p EVENTS if ENV["REFLECT_DEBUG"]
p EVENTS if ENV["REFLECT_DEBUG"] # rubocop:disable Lint/Debugger
end
end

Expand Down

0 comments on commit 2690d41

Please sign in to comment.