forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 3
[pull] main from solidusio:main #411
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
Merged
Merged
Conversation
This file contains hidden or 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
…permission Revert "GH: Allow backport workflow to trigger actions"
The `OrderMailerSubscriber` provided subscribers that depend on both the configurable `OrderMailer` and the `ReimbursementMailer`, which are separate. This change moves the code towards betting honouring the single responsibility principle. Co-Authored-By: Adam Mueller <adam@super.gd>
…criber Separate order mailer subscriber from reimbursement mailer subscriber
Fixed migrations so you can rollback them all
When attempting to run this migration on Rails 7.0 or Rails 7.1, an error is produced if the version of the migration is `7.2` ``` ArgumentError: Unknown migration version "7.2"; expected one of "4.2", "5.0", "5.1", "5.2", "6.0", "6.1", "7.0", "7.1" (ArgumentError) ``` Since Rails versions 7.0, 7.1, and 7.2 are currently supported, this migration should conform to, and inherit from, Rails 7.0 migrations.
…sion Inherit from ActiveRecord::Migration version for all supported Rails
Store model now has an enum for reverse_charge_status which let's user choose whether it is enabled, disabled or not validated.
Allows access to the reverse_charge_status attribute through existing store APIs.
Updated the store form for reverese_charge_status user can select the charge status from the dropdown for the store
Rubocop updated, and we have new offenses.
Fix Rubocop offense
The "spec_helper" does not include all the features necessary for feature specs.
We can't be sure the action has been created without having had confirmation on the screen.
We need to make sure that the browser has updated the page contents before checking for the updated path.
Otherwise, `Spree::Image.first` might not have its attachment yet.
Otherwise, the current path might not be what we expect yet.
Otherwise, the benefit might not have updated in the database yet.
We can just test that the buttons have the necessary attribute for the behaviour. These tests had become flaky.
This should help fix some really ugly flaky test runs. See teamcapybara/capybara#2800 for context.
Fix flaky specs
We're moving towards having a separate subscriber for each type of transaction email. This commit ensures that `OrderMailerSubscriber` actions are all moved to subscriber classes that more accurately describe the mailer action being taken. Now, the old `OrderMailerSubscriber` does nothing and can be removed in the next version of Solidus. In subsequent commits we can now add additional subscribers for: - Carton shipped transactional emails - Short ship transactional emails - Order cancellation transactionals emails Co-authored-by: Senem Soy <senem@super.gd>
…-subscriber Move OrderMailerSubscriber#send_confirmation_email
Fix typos
…atus Add reverse charge status to stores
[Backend] Fix issue refunding uncompleted payments
This join table needs both references to be pointing to valid records. A uniqueness index for the taxon id in this table is already present.
Ruby's `BigDecimal` library does not come with a constant that denotes zero. We don't need to be creating a new zero every time we need one. Also, there's even a Rubocop that tells people to use an integer for integer-type BigDecimal instantiations, but a string for float-type BigDecimals (See https://github.com/rubocop/rubocop-performance/blob/master/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb) This all to say: Let's have a constant in the codebase that is zero. We can just reference it, we don't need so many zeros.
This file is currently only loaded when loading either `Spree::Calculator` or `Spree::PaymentMethod`. We can use Rails' autoloading mechanism instead. This makes running the spec for the `Preferable` module run through on its own.
`String#to_d` will never, ever raise an ArgumentError. I tried with `Object.new.to_s.to_d`. This raises our test coverage for these files. This was originally introduced to guard against weird behaviour of Ruby 2.4, which we do not support any longer.
…taxons Add dependent/inverse_of options to product-related models
Legacy Promotions: Add inverse_of/dependent options
Add `Spree::ZERO` constant
We've added some foreign key constraints recently, and have since come up with a nicer way of guiding users towards fixing their data intentionally. This change gives them a nice error message and allows them to change the migration to remove offending records. Co-Authored-By: thomas@vondeyen.com
[Admin][UI] Radio component
…ions-migration Add email column to stock_locations
[Admin][UI] Allow select to include blank option
Rather than assuming Rails.logger exists, let's allow passing it in as a dependency and fall back on `Logger.new($stdout)`.
We need to output, let's use what's within the class.
Let's remove this implicit dependency.
I've opted for dependent: :destroy for records that do not need to be saved for posterity in the scenario of completed orders, and for :nullify if those records do need to be saved. For the User#orders/spree_orders method, we've not set any deletion callback, because we manually implement the `check_for_deletion` callback that checks for orders present by default.
This is a join table, neither of the keys is optional. This also adds a foreign key constraint between the role_id column of the spree_roles_users table and the spree_roles table. We're not adding one for the users table, because the user class is configurable and we do not know which table to constrain to.
Loading the currently available promotions can be quite useful outside of the order adjuster. This moves the LoadPromotions class out of there and into the main `SolidusPromotions` namespace so that it's clear that this class can be used elsewhere.
Use dedicated logger in rake tasks
…ions Add inverse/dependent options on user relations
…er-adjuster Move LoadPromotions out of OrderAdjuster namespace
Make debugging things easier now that we can use the new debugger. Replaces our use of pry which isn't really needed anymore. Co-authored-by: Jared Norman <jared@super.gd> Co-authored-by: Noah Silvera <noah@super.gd>
Add the new Ruby debug gem
Bye Bye CircleCI. GittHub actions is much faster and has better integration into GitHub (surprise!).
We only used it on Circle CI. We now use GitHub actions.
Otherwise we will get coverage mismatch warnings
Run tests on GitHub actions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 : )