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

Extract Legacy Promotion System: Move ActiveRecord Models and Factories #5634

Merged
merged 16 commits into from
Jun 21, 2024

Commits on Jun 19, 2024

  1. Change default promotion source types to be empty

    `Spree::PromotionAction` is not in core any longer, and the null promo
    adjuster can not actually produce any adjustments.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    57ea514 View commit details
    Browse the repository at this point in the history
  2. Move promotion models

    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    7aa5911 View commit details
    Browse the repository at this point in the history
  3. Rubocop fixes

    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    eb6f7d8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a0e19d9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6556b9a View commit details
    Browse the repository at this point in the history
  6. Legacy promotions: Conditionally run migrations

    Since these promotions will be installed into all stores, we need to
    make sure they don't do anything to the existing promotion system. For
    new stores, they must do the things though.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    3dd49bd View commit details
    Browse the repository at this point in the history
  7. Move promotion-specific code from product.rb to gem

    We need to purge references to Solidus' legacy promotion system from the
    core.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    a8c99c9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3fd075a View commit details
    Browse the repository at this point in the history
  9. Move promotion calculators to legacy_promotions

    Except for the flat rate calculator, as that one is so generic it's
    often just used as a stand-in calculator.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    46eccef View commit details
    Browse the repository at this point in the history
  10. Move promotion permission sets to legacy_promotions

    In legacy_promotions, we'll just keep them in `app`, where they're
    tested, too.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    2a4c53c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5547c4d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8825398 View commit details
    Browse the repository at this point in the history
  13. Move promotion-specific code from Spree::Adjustment to legacy_promotions

    We don't need #recalculate for anything in core, and we don´t need the
    association to promotion codes.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    69b837f View commit details
    Browse the repository at this point in the history
  14. Move spec for Shipment#total_before_tax to legacy_promotions

    I'm keeping the spec to test what the model does, but moving the
    extended spec with the actual promotion to solidus_legacy_promotions.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    81c8460 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    c860e8d View commit details
    Browse the repository at this point in the history
  16. Automatically add legacy promotion factories

    This should help everyones test suite's to stay green.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    a78e28d View commit details
    Browse the repository at this point in the history