Convert auth accessors to configuration object#3418
Conversation
d5c9603 to
954e985
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3418 +/- ##
==========================================
+ Coverage 97.44% 97.46% +0.01%
==========================================
Files 314 314
Lines 8194 8218 +24
==========================================
+ Hits 7985 8010 +25
+ Misses 209 208 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
954e985 to
8645785
Compare
c6d73b9 to
74d6166
Compare
|
Rebased on #3424 in order to get the |
74d6166 to
a85e1b4
Compare
e1adfda to
43681c3
Compare
|
This pull request has not seen any activiy in a long time. |
|
@mamhoff this needs a rebase and conflict resolution. |
d13264a to
20a4bdb
Compare
tvdeyen
left a comment
There was a problem hiding this comment.
Thanks for rebasing. I think we should get rid of the extra auth class. It is unnecessary imo.
e80ebb2 to
1b0afb4
Compare
If `Alchemy.user_class` is `nil`, which it is in case of an invalid configuration, it's not a class, and we can't use the `<` operator. Let's use duck typing instead.
This allows us to do ``` Alchemy.configure do |config| config.user_class = "Spree::User" end ```
1b0afb4 to
1ff562b
Compare
Creates a configuration object for authentication that can be initialized outside of a `config.to_prepare` block. Configuration is now in `Alchemy.config`.
1ff562b to
afb581f
Compare
tvdeyen
left a comment
There was a problem hiding this comment.
Amazing work. Would be great to update the alchemy.rb.tt install file to the new configurations.
What is this pull request for?
This converts the
auth_accessors.rbmodule, which is purely configuration, to a configuration object.All methods are still there, but deprecated, and a few accessors stay in
lib/alchemy.rbas shortcuts.Notable changes (remove if none)
We can now configure Alchemy's auth system entirely outside of a
config.to_prepareblock.Checklist