forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 3
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
[pull] main from solidusio:main #405
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Solidus main already depends on `solidus_legacy_promotions`, but we forgot to require it in the original PR. This makes sure people still have the legacy promotion system when they upgrade to the next Solidus version.
They just released sqlite3 2.0.0, but ActiveRecord's sqlite3 adapter doesn't know about this yet, leading to conflicting sqlite3 gems in specs. This is probably a temporary fix until ActiveRecord learns the news.
…ions Solidus gem: Require `solidus_legacy_promotions`
The task itself is fine, as it inherits from Rails' app generator, which has the sqlite3 restriction: https://github.com/rails/rails/blob/main/railties/lib/rails/generators/database.rb#L19.
Restrict sqlite3 gem to '~> 1.3', like ActiveRecord
For now, this introduces a hard dependency from legacy_promotions to the new admin.
We need a way of a spec telling the app to use the new admin for tests that require it, and using the old admin to not use it. After experimenting with using a cookie, which led to a number of undesirable issues (needing a new gem to manage cookies across Capybara drivers, having to visit some URL before being able to even set the cookie etc), what we do is we just define a global module attribute accessor on the dummy app that enables or disables the routes for the `solidus_admin` gem.
We have a shipping_promotion_handler_class in the legacy promotion system, and we have calling code from Solidus itself, so we need to add this configuration option to the null promotion configuration, too.
This drops the dependency between solidus_legacy_promotions and solidus_admin. If `solidus_legacy_promotions` is not defined, the admin will not have a promotion configuration. If `solidus_admin` is not defined, the routes and controllers necessary for the new admin won't be loaded.
This naming is better since two directories, `admin` and `solidus_admin` are really confusing, and naming them after the gems they use is more appropriate.
…-legacy-promotions Move solidus admin promotion to legacy promotions
pull
bot
added
⤵️ pull
and removed
changelog:repository
changelog:solidus
changelog:solidus_admin
labels
Apr 18, 2024
…to-null-configuration Add `shipping_promotion_handler_class` attribute to null promo config
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )