Skip to content

Commit

Permalink
Merge pull request #325 from etiennebarrie/use-dedicated-deprecator
Browse files Browse the repository at this point in the history
Use a dedicated ActiveSupport::Deprecation object
  • Loading branch information
gsamokovarov authored Apr 19, 2023
2 parents 891c363 + d07fa6a commit 3cb71a1
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 3cb71a1

Please sign in to comment.