Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move permission sets back to app/ #6090

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jan 23, 2025

These were already in app, but moved in #403, attempting to fix #344 (A copy of Spree::PermissionSets::DefaultCustomer has been removed from the module tree but is still active!)

At the time of that PR, code reloading was still handled by Rails, so let's see if we can now move them back as Zeitwerk now handles code reloading.

@mamhoff mamhoff requested a review from a team as a code owner January 23, 2025 10:33
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label Jan 23, 2025
@mamhoff mamhoff force-pushed the move-permission-sets-to-app branch from 37aadeb to e0d3721 Compare January 23, 2025 11:52
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 64.00000% with 135 lines in your changes missing coverage. Please review.

Project coverage is 88.69%. Comparing base (b1b8567) to head (fba1c16).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...els/spree/permission_sets/configuration_display.rb 0.00% 30 Missing ⚠️
.../models/spree/permission_sets/dashboard_display.rb 0.00% 19 Missing ⚠️
core/lib/spree/permission_sets.rb 0.00% 5 Missing ⚠️
core/lib/spree/permission_sets/base.rb 0.00% 5 Missing ⚠️
...lib/spree/permission_sets/configuration_display.rb 0.00% 5 Missing ⚠️
.../spree/permission_sets/configuration_management.rb 0.00% 5 Missing ⚠️
...ore/lib/spree/permission_sets/dashboard_display.rb 0.00% 5 Missing ⚠️
core/lib/spree/permission_sets/default_customer.rb 0.00% 5 Missing ⚠️
core/lib/spree/permission_sets/order_display.rb 0.00% 5 Missing ⚠️
core/lib/spree/permission_sets/order_management.rb 0.00% 5 Missing ⚠️
... and 10 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6090      +/-   ##
==========================================
- Coverage   89.28%   88.69%   -0.59%     
==========================================
  Files         813      829      +16     
  Lines       17906    17989      +83     
==========================================
- Hits        15987    15956      -31     
- Misses       1919     2033     +114     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

These were already in app, but moved in
solidusio#403.

At the time of that PR, code reloading was still handled by Rails, so
let's see if we can now move them back as Zeitwerk now handles code
reloading.
We had two spec files for this functionality.
@tvdeyen tvdeyen force-pushed the move-permission-sets-to-app branch from d956fcf to fba1c16 Compare January 24, 2025 15:12
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks for the house keeping as well.

@tvdeyen tvdeyen added this to the 4.5 milestone Jan 24, 2025
@tvdeyen tvdeyen merged commit 9f7a53f into solidusio:main Jan 30, 2025
16 of 18 checks passed
mamhoff added a commit to mamhoff/solidus_subscriptions that referenced this pull request Jan 31, 2025
With Solidus PR solidusio/solidus#6090 merged,
permission sets are not available at boot time. They don't need to be
either, we can move them into app/, where they can live as autoloadable
classes. This should also work with older Solidus versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code reloading causes issues with Spree::PermissionSets
4 participants