Skip to content

Commit

Permalink
Use a dedicated ActiveSupport::Deprecation object
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebarrie committed Apr 19, 2023
1 parent 891c363 commit d07fa6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/web_console/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ class Railtie < ::Rails::Railtie
end
end

initializer "web_console.deprecator" do |app|
app.deprecators[:web_console] = ActiveSupport::Deprecation.new("5.0", "WebConsole")
end

initializer "web_console.permissions" do
permissions = web_console_permissions
Request.permissions = Permissions.new(permissions)
Expand All @@ -63,7 +67,7 @@ def web_console_permissions
when config.web_console.allowed_ips
config.web_console.allowed_ips
when config.web_console.whitelisted_ips
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Rails.application.deprecators[:web_console].warn(<<-MSG.squish)
The config.web_console.whitelisted_ips is deprecated and will be ignored in future release of web_console.
Please use config.web_console.allowed_ips instead.
MSG
Expand Down

0 comments on commit d07fa6a

Please sign in to comment.