Skip to content

Commit

Permalink
Add Deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
sambostock committed Feb 9, 2024
1 parent 3d46f58 commit a997d01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/job-iteration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ module JobIteration

INTEGRATIONS = [:resque, :sidekiq]

Deprecation = ActiveSupport::Deprecation.new("2.0", "JobIteration")

extend self

attr_writer :logger
Expand Down
4 changes: 4 additions & 0 deletions lib/job-iteration/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@

module JobIteration
class Railtie < Rails::Railtie
initializer "job_iteration.register_deprecator" do |app|
# app.deprecators was added in Rails 7.1
app.deprecators[:job_iteration] = JobIteration::Deprecation if app.respond_to?(:deprecators)
end
end
end

0 comments on commit a997d01

Please sign in to comment.