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

[pull] main from solidusio:main #405

Merged
merged 13 commits into from
Apr 22, 2024
Merged

[pull] main from solidusio:main #405

merged 13 commits into from
Apr 22, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 18, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

mamhoff and others added 11 commits April 17, 2024 17:22
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
…to-null-configuration

Add `shipping_promotion_handler_class` attribute to null promo config
@pull pull bot merged commit eda3961 into nebulab:main Apr 22, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants