Skip to content

Commit a997d01

Browse files
committed
Add Deprecation
1 parent 3d46f58 commit a997d01

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/job-iteration.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ module JobIteration
1212

1313
INTEGRATIONS = [:resque, :sidekiq]
1414

15+
Deprecation = ActiveSupport::Deprecation.new("2.0", "JobIteration")
16+
1517
extend self
1618

1719
attr_writer :logger

lib/job-iteration/railtie.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44

55
module JobIteration
66
class Railtie < Rails::Railtie
7+
initializer "job_iteration.register_deprecator" do |app|
8+
# app.deprecators was added in Rails 7.1
9+
app.deprecators[:job_iteration] = JobIteration::Deprecation if app.respond_to?(:deprecators)
10+
end
711
end
812
end

0 commit comments

Comments
 (0)