spree / spree_auth_devise

Provides authentication (user accounts, login & signup) for @spree by using Devise
https://spreecommerce.org
BSD 3-Clause "New" or "Revised" License
139 stars 494 forks source link

Check for spree_frontend gem via Gem::Specification #569

Closed nciemniak closed 2 years ago

nciemniak commented 2 years ago

Currently, the spree_auth_devise code checks for the spree_frontend gem by checking if Spree::Frontend::Engine is present. This makes it so that if spree_auth_devise is listed in the gemspec before spree_frontend within a user's gemfile, the spree auth code will not find spree_frontend.

Checking for spree_frontend via Gem::Specification allows the code to know whether the spree_frontend gem is present whether or not it has been initialized already or not.

This fixes the broken /account page in the spree legacy frontend.

nciemniak commented 2 years ago

Testing completed:

Should be ready to merge @rafalcymerys

Will be making a separate PR to also update the methods checking for backend and API, but would prefer to apply those changes after the 4.5 release to allow more time for the changes to be tested.