13220 Fixes affiliate sales spec
13220 Use before_create to update product name
13220 Fixes rubocop warnings
13220 Update product_name in line_item in specs
13220 Fix before_create lint
13220 Add spec for checking product_name is not set in reports
13220 Fixes rubocop issue
13220 Add migrations for updating the existing line items
13220 Fixing lint issues
13220 Set product_name in line_item before doing validation
13220 Fix linter issues
13220 Fixes spec
13220 Fixes linter issues
13220 Review comments
13220 Review comments
13220 Add default product name
13220 Use product_name instead of variant product name when using line item
13220 Fix specs
13220 Revert change in affiliate_sales_data_spec
CL-13220 Store variant name in line_item
13220 Default variant name to original variant's full name for line_items
13220 Add missing frozen string literal
13220 Add spec for full_variant_name
13220 Remove UpdateProductNameInLineItems and AddNotNullToProductNameInLineItems migrations
13220 Remove presence validation for product_name
13220 Use full_product_name which defaults to variant product name if empty
Changed all references of processable_image to processable_file which was a breaking change from v1 to v2 https://github.com/igorkasyanchuk/active_storage_validations/tree/3.0.2?tab=readme-ov-file#upgrading-from-1x-to-2x
Also it upgraded the way of validating files from just the file name and content type, so tests also needed to change for file upload checks
Refactored all the similar file image validator content type in Spree::Image::ACCEPTED_CONTENT_TYPES and Updated ImageBuilder.import method to use the url.path when getting filename.
Make sure failure to delete due to dependent objects is handled through
activemodel errors and not by rescuing
`ActiveRecord::DeleteRestrictionError` exceptions.
Previously we would display two alert prompts, and we would weirdly
display the content of our 500 error page on top of the screen.
Now, we display a flash error message explaining the reason to fail to
remove it.
There were a few changes needed:
* Plugins are now specified through `plugin:` config keyword.
* All plugin gems need to be specified explicitly in Gemfile since they
are no longer dependencies of plugins already specified explicitly.
* All plugin gems need to be updated in other to use the new APIs.
* One cop was renamed.
* New offenses safe to correct were corrected directly with `bundle exec
rubocop -a`.
* New offenses unsafe to correct were added to the TODO configuration
with `bundle exec rubocop --auto-gen-config --auto-gen-only-exclude
--exclude-limit 1400 --no-auto-gen-timestamp`.
This spec was using a very old syntax no longer supported by RSpec. It's
not currently influencing specs result because the spec running into
the error is currently set as "pending". However, the spec is still run
and the error is still visible.
Fixing the syntax does not fix the spec, but lets it get a bit further.