Skip to content

Commit

Permalink
Activejob 7.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
laurafeier committed Aug 12, 2024
1 parent 179184f commit 4768fa6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ jobs:
- 3.0.5
- 3.1.3
- 3.2.0
- 3.3.4
gemfile:
- gemfiles/activejob_4.2.x.gemfile
- gemfiles/activejob_5.2.x.gemfile
- gemfiles/activejob_6.0.x.gemfile
- gemfiles/activejob_6.1.x.gemfile
- gemfiles/activejob_7.0.x.gemfile
- gemfiles/activejob_7.1.x.gemfile
- gemfiles/activejob_7.2.x.gemfile
- gemfiles/sidekiq_4.x.gemfile
- gemfiles/sidekiq_5.x.gemfile
- gemfiles/sidekiq_6.x.gemfile
Expand Down Expand Up @@ -84,6 +86,10 @@ jobs:
gemfile: gemfiles/activejob_6.0.x.gemfile
- ruby: 3.2.0
gemfile: gemfiles/activejob_7.1.x.gemfile
- ruby: 3.2.0
gemfile: gemfiles/activejob_7.2.x.gemfile
- ruby: 3.3.4
gemfile: gemfiles/activejob_7.2.x.gemfile
- ruby: 3.2.0
gemfile: gemfiles/sidekiq_4.x.gemfile
- ruby: 3.2.0
Expand Down
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ RSpec/AnyInstance:
RSpec/LetSetup:
Exclude:
- spec/active_job/uniqueness/sidekiq_patch_spec.rb

Lint/RedundantCopDisableDirective:
Enabled: false
4 changes: 4 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ appraise 'activejob-7.1.x' do
gem 'activejob', '~> 7.1'
end

appraise 'activejob-7.2.x' do
gem 'activejob', '~> 7.2'
end

appraise 'sidekiq-4.x' do
gem 'sidekiq', '~> 4.2'
gem 'activejob', '~> 5.2'
Expand Down
2 changes: 1 addition & 1 deletion activejob-uniqueness.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 2.5'

spec.add_dependency 'activejob', '>= 4.2', '< 7.2'
spec.add_dependency 'activejob', '>= 4.2', '< 7.3'
spec.add_dependency 'redlock', '>= 2.0', '< 3'

spec.add_development_dependency 'appraisal', '~> 2.3.0'
Expand Down
7 changes: 7 additions & 0 deletions gemfiles/activejob_7.2.x.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activejob", "~> 7.2"

gemspec path: "../"
4 changes: 2 additions & 2 deletions lib/active_job/uniqueness/sidekiq_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def remove_job
module ScheduledSet
def delete(score, job_id)
entry = find_job(job_id)
ActiveJob::Uniqueness.unlock_sidekiq_job!(entry.item) if super(score, job_id)
ActiveJob::Uniqueness.unlock_sidekiq_job!(entry.item) if super(score, job_id) # rubocop:disable Style/SuperArguments
entry
end
end
Expand All @@ -67,7 +67,7 @@ def clear
end

def delete_by_value(name, value)
ActiveJob::Uniqueness.unlock_sidekiq_job!(Sidekiq.load_json(value)) if super(name, value)
ActiveJob::Uniqueness.unlock_sidekiq_job!(Sidekiq.load_json(value)) if super(name, value) # rubocop:disable Style/SuperArguments
end
end
end
Expand Down

0 comments on commit 4768fa6

Please sign in to comment.