solidusio / solidus_auth_devise

🔑 Devise authentication for your Solidus store.
http://solidus.io
BSD 3-Clause "New" or "Revised" License
53 stars 128 forks source link

Move AuthConfiguration out of autoloading paths #197

Closed elia closed 3 years ago

elia commented 3 years ago

The class is loaded during initialization and, beyond having no point in being autoloaded, it generates an explicit warning in Rails 6, and potential problems in prior versions.

Here's the Rails 6 warning:

DEPRECATION WARNING: Initialization autoloaded the constant Spree::AuthConfiguration.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload Spree::AuthConfiguration, for example,
the expected changes won't be reflected in that stale Class object.

This autoloaded constant has been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.
 (called from <top (required)> at /Users/elia/Code/Nebulab/ecommerce/config/environment.rb:5)