solidus_core 4.5.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/jobs/spree/base_job.rb +12 -0
- data/app/jobs/spree/state_change_tracking_job.rb +32 -0
- data/app/models/concerns/spree/state_change_tracking.rb +26 -0
- data/app/models/concerns/spree/user_address_book.rb +24 -6
- data/app/models/concerns/spree/user_methods.rb +52 -14
- data/app/models/concerns/spree/user_reporting.rb +1 -1
- data/app/models/spree/address.rb +8 -2
- data/app/models/spree/adjustment_reason.rb +1 -1
- data/app/models/spree/calculator.rb +0 -2
- data/app/models/spree/carton.rb +7 -0
- data/app/models/spree/classification.rb +3 -3
- data/app/models/spree/core/state_machines/order/class_methods.rb +0 -16
- data/app/models/spree/core/state_machines/order.rb +1 -0
- data/app/models/spree/core/state_machines/payment.rb +1 -8
- data/app/models/spree/core/state_machines/shipment.rb +1 -8
- data/app/models/spree/country.rb +16 -5
- data/app/models/spree/customer_return.rb +1 -2
- data/app/models/spree/fulfilment_changer.rb +38 -11
- data/app/models/spree/inventory_unit.rb +1 -1
- data/app/models/spree/line_item.rb +3 -2
- data/app/models/spree/order.rb +5 -7
- data/app/models/spree/order_cancellations.rb +17 -20
- data/app/models/spree/order_shipping.rb +2 -9
- data/app/models/spree/order_taxation.rb +3 -2
- data/app/models/spree/order_updater.rb +11 -7
- data/app/models/spree/payment_method.rb +0 -1
- data/app/models/spree/product.rb +6 -5
- data/app/models/spree/product_option_type.rb +2 -2
- data/app/models/spree/product_property.rb +2 -2
- data/app/models/spree/role_user.rb +3 -3
- data/app/models/spree/shipment.rb +26 -12
- data/app/models/spree/shipping_category.rb +2 -2
- data/app/models/spree/shipping_method_category.rb +2 -2
- data/app/models/spree/state.rb +7 -4
- data/app/models/spree/stock/quantifier.rb +33 -9
- data/app/models/spree/stock_item.rb +1 -1
- data/app/models/spree/stock_location.rb +3 -2
- data/app/models/spree/store.rb +6 -0
- data/app/models/spree/store_credit.rb +3 -3
- data/app/models/spree/store_credit_event.rb +1 -1
- data/app/models/spree/tax_category.rb +1 -1
- data/app/models/spree/taxon.rb +0 -3
- data/app/models/spree/taxonomy.rb +2 -2
- data/app/models/spree/user_address.rb +6 -6
- data/app/models/spree/variant.rb +1 -1
- data/app/models/spree/variant_property_rule.rb +1 -1
- data/app/models/spree/variant_property_rule_condition.rb +1 -1
- data/app/models/spree/wallet_payment_source.rb +2 -2
- data/app/subscribers/spree/carton_shipped_mailer_subscriber.rb +30 -0
- data/app/subscribers/spree/order_cancel_mailer_subscriber.rb +21 -0
- data/app/subscribers/spree/order_confirmation_mailer_subscriber.rb +23 -0
- data/app/subscribers/spree/order_inventory_cancellation_mailer_subscriber.rb +27 -0
- data/app/subscribers/spree/order_mailer_subscriber.rb +8 -26
- data/app/subscribers/spree/reimbursement_mailer_subscriber.rb +20 -0
- data/config/locales/en.yml +9 -0
- data/db/migrate/20160101010000_solidus_one_four.rb +92 -0
- data/db/migrate/20180416083007_add_apply_to_all_to_variant_property_rule.rb +1 -1
- data/db/migrate/20250129061658_add_metadata_to_spree_resources.rb +5 -6
- data/db/migrate/20250214094207_add_reverse_charge_status_to_store.rb +8 -0
- data/db/migrate/20250221152004_add_metadata_to_users.rb +13 -0
- data/db/migrate/20250225051308_add_vat_id_email_and_reverse_charge_status_to_addresses.rb +10 -0
- data/db/migrate/20250508145917_add_email_to_stock_locations.rb +5 -0
- data/db/migrate/20250530102541_add_addressbook_foreign_key.rb +29 -0
- data/db/migrate/20250604072105_add_fk_products_variant_property_rules.rb +30 -0
- data/db/migrate/20250604072555_add_fk_to_product_properties.rb +52 -0
- data/db/migrate/20250604072948_add_fk_to_product_option_types.rb +52 -0
- data/db/migrate/20250604073219_add_fk_to_classifications.rb +52 -0
- data/db/migrate/20250605105424_add_shipping_category_foreign_keys.rb +73 -0
- data/db/migrate/20250626112117_add_foreign_key_to_spree_role_users.rb +30 -0
- data/db/migrate/20250628094037_change_countries_iso_to_unique.rb +9 -0
- data/db/migrate/20250708120317_add_adjustment_reason_foreign_keys.rb +30 -0
- data/db/migrate/20250709073151_add_country_foreign_keys.rb +75 -0
- data/db/migrate/20250709084513_add_state_foreign_keys.rb +30 -0
- data/db/migrate/20250726220709_add_fk_to_customer_return.rb +30 -0
- data/lib/generators/solidus/install/app_templates/frontend/starter.rb +1 -1
- data/lib/generators/spree/dummy/dummy_generator.rb +2 -1
- data/lib/generators/spree/dummy/templates/rails/{manifest.js → manifest.js.tt} +2 -0
- data/lib/spree/app_configuration.rb +9 -1
- data/lib/spree/core/engine.rb +7 -2
- data/lib/spree/core/environment.rb +1 -0
- data/lib/spree/core/version.rb +6 -10
- data/lib/spree/core.rb +2 -0
- data/lib/spree/permitted_attributes.rb +2 -1
- data/lib/spree/preferences/preferable.rb +1 -5
- data/lib/spree/testing_support/capybara_driver.rb +9 -0
- data/lib/spree/testing_support/common_rake.rb +6 -3
- data/lib/spree/testing_support/dummy_app/migrations.rb +2 -2
- data/lib/spree/testing_support/dummy_app/rake_tasks.rb +0 -6
- data/lib/spree/testing_support/dummy_app.rb +7 -0
- data/lib/spree/testing_support/factories/zone_factory.rb +4 -0
- data/lib/spree/testing_support/job_helpers.rb +6 -15
- data/lib/spree/testing_support/translations.rb +2 -2
- data/lib/spree/zero.rb +3 -0
- data/solidus_core.gemspec +6 -2
- metadata +57 -5
- /data/{lib → app/models/concerns}/spree/preferences/persistable.rb +0 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddCountryForeignKeys < ActiveRecord::Migration[7.0]
|
4
|
+
FOREIGN_KEY_VIOLATION_ERRORS = %w[PG::ForeignKeyViolation Mysql2::Error SQLite3::ConstraintException]
|
5
|
+
|
6
|
+
def up
|
7
|
+
# Uncomment the following code to remove orphaned records if this migration fails
|
8
|
+
#
|
9
|
+
# say_with_time "Removing orphaned states (no corresponding country)" do
|
10
|
+
# Spree::State.left_joins(:country).where(spree_countries: { id: nil }).delete_all
|
11
|
+
# end
|
12
|
+
|
13
|
+
begin
|
14
|
+
add_foreign_key :spree_states, :spree_countries, column: :country_id, null: false, on_delete: :cascade
|
15
|
+
rescue ActiveRecord::StatementInvalid => e
|
16
|
+
if e.cause.class.name.in?(FOREIGN_KEY_VIOLATION_ERRORS)
|
17
|
+
say <<~MSG
|
18
|
+
⚠️ Foreign key constraint failed when adding :spree_states => :spree_countries.
|
19
|
+
To fix this:
|
20
|
+
1. Uncomment the code that removes orphaned records.
|
21
|
+
2. Rerun the migration.
|
22
|
+
Offending error: #{e.cause.class} - #{e.cause.message}
|
23
|
+
MSG
|
24
|
+
end
|
25
|
+
raise
|
26
|
+
end
|
27
|
+
|
28
|
+
# Uncomment the following code to remove orphaned records if this migration fails
|
29
|
+
#
|
30
|
+
# say_with_time "Updating orphaned addresses (no corresponding country) to use default country" do
|
31
|
+
# Spree::Address.left_joins(:country).where(spree_countries: { id: nil }).update_all(country: Spree::Country.default)
|
32
|
+
# end
|
33
|
+
|
34
|
+
begin
|
35
|
+
add_foreign_key :spree_addresses, :spree_countries, column: :country_id, null: false, on_delete: :restrict
|
36
|
+
rescue ActiveRecord::StatementInvalid => e
|
37
|
+
if e.cause.class.name.in?(FOREIGN_KEY_VIOLATION_ERRORS)
|
38
|
+
say <<~MSG
|
39
|
+
⚠️ Foreign key constraint failed when adding :spree_addresses => :spree_countries.
|
40
|
+
To fix this:
|
41
|
+
1. Uncomment the code that removes orphaned records.
|
42
|
+
2. Rerun the migration.
|
43
|
+
Offending error: #{e.cause.class} - #{e.cause.message}
|
44
|
+
MSG
|
45
|
+
end
|
46
|
+
raise
|
47
|
+
end
|
48
|
+
# Uncomment the following code to remove orphaned records if this migration fails
|
49
|
+
#
|
50
|
+
# say_with_time "Deleting orphaned prices (country ID without corresponding country)" do
|
51
|
+
# Spree::Price.where.not(country_iso: nil).left_joins(:country).where(spree_countries: { iso: nil }).update_all(country_iso: Spree::Config.default_country_iso)
|
52
|
+
# end
|
53
|
+
|
54
|
+
begin
|
55
|
+
add_foreign_key :spree_prices, :spree_countries, column: :country_iso, primary_key: :iso, null: true, on_delete: :restrict
|
56
|
+
rescue ActiveRecord::StatementInvalid => e
|
57
|
+
if e.cause.class.name.in?(FOREIGN_KEY_VIOLATION_ERRORS)
|
58
|
+
say <<~MSG
|
59
|
+
⚠️ Foreign key constraint failed when adding :spree_prices => :spree_countries.
|
60
|
+
To fix this:
|
61
|
+
1. Uncomment the code that removes orphaned records.
|
62
|
+
2. Rerun the migration.
|
63
|
+
Offending error: #{e.cause.class} - #{e.cause.message}
|
64
|
+
MSG
|
65
|
+
end
|
66
|
+
raise
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def down
|
71
|
+
remove_foreign_key :spree_states, :spree_countries, column: :country_id, null: false, on_delete: :cascade
|
72
|
+
remove_foreign_key :spree_addresses, :spree_countries, column: :country_id, null: false, on_delete: :restrict
|
73
|
+
remove_foreign_key :spree_prices, :spree_countries, column: :country_id, null: true, on_delete: :restrict
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddStateForeignKeys < ActiveRecord::Migration[7.0]
|
4
|
+
FOREIGN_KEY_VIOLATION_ERRORS = %w[PG::ForeignKeyViolation Mysql2::Error SQLite3::ConstraintException]
|
5
|
+
|
6
|
+
def up
|
7
|
+
# Uncomment the following code to remove orphaned records if this migration fails
|
8
|
+
#
|
9
|
+
# say_with_time "Resetting state IDs on addresses where the state record is no longer present" do
|
10
|
+
# Spree::Address.where.not(state_id: nil).left_joins(:state).where(spree_states: { id: nil }).update_all(state_id: nil)
|
11
|
+
# end
|
12
|
+
|
13
|
+
add_foreign_key :spree_addresses, :spree_states, column: :state_id, null: true, on_delete: :restrict
|
14
|
+
rescue ActiveRecord::StatementInvalid => e
|
15
|
+
if e.cause.class.name.in?(FOREIGN_KEY_VIOLATION_ERRORS)
|
16
|
+
say <<~MSG
|
17
|
+
⚠️ Foreign key constraint failed when adding :spree_addresses => :spree_states.
|
18
|
+
To fix this:
|
19
|
+
1. Uncomment the code that removes orphaned records.
|
20
|
+
2. Rerun the migration.
|
21
|
+
Offending error: #{e.cause.class} - #{e.cause.message}
|
22
|
+
MSG
|
23
|
+
end
|
24
|
+
raise
|
25
|
+
end
|
26
|
+
|
27
|
+
def down
|
28
|
+
remove_foreign_key :spree_addresses, :spree_states, column: :state_id, null: true, on_delete: :restrict
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozent_string_literal: true
|
2
|
+
#
|
3
|
+
class AddFkToCustomerReturn < ActiveRecord::Migration[7.0]
|
4
|
+
FOREIGN_KEY_VIOLATION_ERRORS = %w[PG::ForeignKeyViolation Mysql2::Error SQLite3::ConstraintException]
|
5
|
+
|
6
|
+
def up
|
7
|
+
# Uncomment the following code to remove orphaned records if this migration fails
|
8
|
+
#
|
9
|
+
# say_with_time "Removing invalid adjustment reason IDs from adjustments table" do
|
10
|
+
# Spree::CustomerReturn.where.not(stock_location_id: nil).left_joins(:stock_location).where(spree_stock_locations: { id: nil }).delete_all
|
11
|
+
# end
|
12
|
+
|
13
|
+
add_foreign_key :spree_customer_returns, :spree_stock_locations, column: :stock_location_id, null: false, on_delete: :restrict
|
14
|
+
rescue ActiveRecord::StatementInvalid => e
|
15
|
+
if e.cause.class.name.in?(FOREIGN_KEY_VIOLATION_ERRORS)
|
16
|
+
say <<~MSG
|
17
|
+
⚠️ Foreign key constraint failed when adding :spree_customer_returns => :spree_stock_locations.
|
18
|
+
To fix this:
|
19
|
+
1. Uncomment the code that removes invalid adjustment reason IDs from the spree_customer_returns table.
|
20
|
+
2. Rerun the migration.
|
21
|
+
Offending error: #{e.cause.class} - #{e.cause.message}
|
22
|
+
MSG
|
23
|
+
end
|
24
|
+
raise
|
25
|
+
end
|
26
|
+
|
27
|
+
def down
|
28
|
+
remove_foreign_key :spree_customer_returns, :spree_stock_locations, column: :stock_location_id, null: false, on_delete: :restrict
|
29
|
+
end
|
30
|
+
end
|
@@ -1 +1 @@
|
|
1
|
-
apply 'https://github.com/solidusio/solidus_starter_frontend/raw/v4.
|
1
|
+
apply 'https://github.com/solidusio/solidus_starter_frontend/raw/v4.6/template.rb'
|
@@ -46,7 +46,7 @@ module Spree
|
|
46
46
|
opts[:skip_javascript] = true
|
47
47
|
opts[:skip_action_cable] = true
|
48
48
|
|
49
|
-
|
49
|
+
say "Generating dummy Rails application..."
|
50
50
|
invoke Rails::Generators::AppGenerator,
|
51
51
|
[File.expand_path(dummy_path, destination_root)], opts
|
52
52
|
end
|
@@ -54,6 +54,7 @@ module Spree
|
|
54
54
|
def test_dummy_config
|
55
55
|
@lib_name = options[:lib_name]
|
56
56
|
@database = options[:database]
|
57
|
+
@has_javascripts = Dir.exist?("#{dummy_path}/app/assets/javascripts")
|
57
58
|
|
58
59
|
template "rails/database.yml", "#{dummy_path}/config/database.yml", force: true
|
59
60
|
template "rails/storage.yml", "#{dummy_path}/config/storage/test.yml", force: true
|
@@ -222,7 +222,7 @@ module Spree
|
|
222
222
|
# - The maximum number of keys that can be added to the metadata columns (meta_data_max_keys).
|
223
223
|
# - The maximum length of each key in the metadata columns (meta_data_max_key_length).
|
224
224
|
# - The maximum length of each value in the metadata columns (meta_data_max_value_length).
|
225
|
-
# (default: +
|
225
|
+
# (default: +false+)
|
226
226
|
preference :meta_data_validation_enabled, :boolean, default: false
|
227
227
|
|
228
228
|
# @!attribute [rw] meta_data_max_keys
|
@@ -724,6 +724,14 @@ module Spree
|
|
724
724
|
Spree::Stock::Splitter::ShippingCategory
|
725
725
|
Spree::Stock::Splitter::Backordered
|
726
726
|
]
|
727
|
+
|
728
|
+
env.subscribers = %w[
|
729
|
+
Spree::CartonShippedMailerSubscriber
|
730
|
+
Spree::OrderCancelMailerSubscriber
|
731
|
+
Spree::OrderConfirmationMailerSubscriber
|
732
|
+
Spree::OrderInventoryCancellationMailerSubscriber
|
733
|
+
Spree::ReimbursementMailerSubscriber
|
734
|
+
]
|
727
735
|
end
|
728
736
|
end
|
729
737
|
|
data/lib/spree/core/engine.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/
|
3
|
+
require 'spree/core'
|
4
4
|
|
5
5
|
module Spree
|
6
6
|
module Core
|
@@ -61,14 +61,19 @@ module Spree
|
|
61
61
|
Spree::Bus.clear
|
62
62
|
|
63
63
|
%i[
|
64
|
+
carton_shipped
|
65
|
+
order_canceled
|
64
66
|
order_emptied
|
65
67
|
order_finalized
|
66
68
|
order_recalculated
|
69
|
+
order_short_shipped
|
67
70
|
reimbursement_reimbursed
|
68
71
|
reimbursement_errored
|
69
72
|
].each { |event_name| Spree::Bus.register(event_name) }
|
70
73
|
|
71
|
-
Spree::
|
74
|
+
Spree::Config.environment.subscribers.each do |subscriber_class|
|
75
|
+
subscriber_class.new.subscribe_to(Spree::Bus)
|
76
|
+
end
|
72
77
|
end
|
73
78
|
end
|
74
79
|
|
data/lib/spree/core/version.rb
CHANGED
@@ -1,17 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Spree
|
4
|
-
VERSION = "4.
|
4
|
+
VERSION = "4.6.0"
|
5
5
|
|
6
|
-
def self.solidus_version
|
7
|
-
VERSION
|
8
|
-
end
|
6
|
+
def self.solidus_version = VERSION
|
9
7
|
|
10
|
-
def self.
|
11
|
-
'4.4'
|
12
|
-
end
|
8
|
+
def self.minimum_required_rails_version = "7.0"
|
13
9
|
|
14
|
-
def self.
|
15
|
-
|
16
|
-
|
10
|
+
def self.previous_solidus_minor_version = "4.5"
|
11
|
+
|
12
|
+
def self.solidus_gem_version = Gem::Version.new(solidus_version)
|
17
13
|
end
|
data/lib/spree/core.rb
CHANGED
@@ -101,7 +101,9 @@ require 'spree/core/environment'
|
|
101
101
|
require 'spree/migrations'
|
102
102
|
require 'spree/migration_helpers'
|
103
103
|
require 'spree/bus'
|
104
|
+
require 'spree/config'
|
104
105
|
require 'spree/core/engine'
|
106
|
+
require 'spree/zero'
|
105
107
|
|
106
108
|
require 'spree/i18n'
|
107
109
|
require 'spree/localized_number'
|
@@ -42,6 +42,7 @@ module Spree
|
|
42
42
|
@@address_attributes = [
|
43
43
|
:id, :name, :address1, :address2, :city, :country_id, :state_id,
|
44
44
|
:zipcode, :phone, :state_name, :country_iso, :alternative_phone, :company,
|
45
|
+
:email, :vat_id, :reverse_charge_status,
|
45
46
|
country: [:iso, :name, :iso3, :iso_name],
|
46
47
|
state: [:name, :abbr]
|
47
48
|
]
|
@@ -124,7 +125,7 @@ module Spree
|
|
124
125
|
@@store_attributes = [:name, :url, :seo_title, :meta_keywords,
|
125
126
|
:meta_description, :default_currency,
|
126
127
|
:mail_from_address, :cart_tax_country_iso,
|
127
|
-
:bcc_email]
|
128
|
+
:bcc_email, :reverse_charge_status]
|
128
129
|
|
129
130
|
@@taxonomy_attributes = [:name]
|
130
131
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "selenium/webdriver"
|
4
|
+
require "capybara-screenshot"
|
5
|
+
|
6
|
+
Capybara::Screenshot.register_driver(:selenium_headless) do |driver, path|
|
7
|
+
driver.browser.save_screenshot(path)
|
8
|
+
end
|
9
|
+
Capybara.javascript_driver = (ENV['CAPYBARA_DRIVER'] || :selenium_headless).to_sym
|
@@ -1,11 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'generators/spree/dummy/dummy_generator'
|
4
|
+
require 'logger'
|
4
5
|
|
5
6
|
class CommonRakeTasks
|
6
7
|
include Rake::DSL
|
8
|
+
attr_reader :logger
|
7
9
|
|
8
10
|
def initialize
|
11
|
+
@logger = Logger.new($stdout)
|
9
12
|
namespace :common do
|
10
13
|
task :test_app, :user_class do |_t, args|
|
11
14
|
args.with_defaults(user_class: "Spree::LegacyUser")
|
@@ -45,19 +48,19 @@ class CommonRakeTasks
|
|
45
48
|
sh "bin/rails g solidus_frontend:install --auto-accept"
|
46
49
|
end
|
47
50
|
|
48
|
-
|
51
|
+
logger.info "Setting up dummy database..."
|
49
52
|
|
50
53
|
sh "bin/rails db:environment:set RAILS_ENV=test"
|
51
54
|
sh "bin/rails db:drop db:create db:migrate VERBOSE=false RAILS_ENV=test"
|
52
55
|
|
53
56
|
if extension_installation_generator_exists?
|
54
|
-
|
57
|
+
logger.info 'Running extension installation generator...'
|
55
58
|
sh "bin/rails generate #{rake_generator_namespace}:install --auto-run-migrations"
|
56
59
|
end
|
57
60
|
end
|
58
61
|
|
59
62
|
task :seed do |_t, _args|
|
60
|
-
|
63
|
+
logger.info "Seeding ..."
|
61
64
|
|
62
65
|
sh "bundle exec rake db:seed RAILS_ENV=test"
|
63
66
|
end
|
@@ -6,7 +6,7 @@ module DummyApp
|
|
6
6
|
|
7
7
|
def auto_migrate
|
8
8
|
if needs_migration?
|
9
|
-
|
9
|
+
Rails.logger.info "Configuration changed. Re-running migrations"
|
10
10
|
|
11
11
|
# Disconnect to avoid "database is being accessed by other users" on postgres
|
12
12
|
ActiveRecord::Base.remove_connection
|
@@ -29,7 +29,7 @@ module DummyApp
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def sh(cmd)
|
32
|
-
|
32
|
+
Rails.logger.info cmd
|
33
33
|
system cmd
|
34
34
|
end
|
35
35
|
end
|
@@ -50,12 +50,6 @@ end
|
|
50
50
|
|
51
51
|
desc "Open a sandboxed console in the test environment"
|
52
52
|
task console: :dummy_environment do
|
53
|
-
begin
|
54
|
-
require 'pry'
|
55
|
-
Rails.application.config.console = Pry
|
56
|
-
rescue LoadError
|
57
|
-
end
|
58
|
-
|
59
53
|
require 'rails/commands'
|
60
54
|
require 'rails/commands/console/console_command'
|
61
55
|
Rails::Console.new(Rails.application, sandbox: true, environment: "test").start
|
@@ -23,6 +23,10 @@ class ApplicationRecord < ActiveRecord::Base
|
|
23
23
|
self.abstract_class = true
|
24
24
|
end
|
25
25
|
|
26
|
+
# @private
|
27
|
+
class ApplicationJob < ActiveJob::Base
|
28
|
+
end
|
29
|
+
|
26
30
|
# @private
|
27
31
|
class ApplicationMailer < ActionMailer::Base
|
28
32
|
end
|
@@ -94,6 +98,9 @@ module DummyApp
|
|
94
98
|
# We don't want to send email in the test environment.
|
95
99
|
config.action_mailer.delivery_method = :test
|
96
100
|
|
101
|
+
# Do not actually run background jobs
|
102
|
+
config.active_job.queue_adapter = :test
|
103
|
+
|
97
104
|
# No need to use credentials file in a test environment.
|
98
105
|
config.secret_key_base = 'SECRET_TOKEN'
|
99
106
|
|
@@ -3,21 +3,12 @@
|
|
3
3
|
module Spree
|
4
4
|
module TestingSupport
|
5
5
|
module JobHelpers
|
6
|
-
def
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
begin
|
13
|
-
adapter.perform_enqueued_jobs = true
|
14
|
-
adapter.perform_enqueued_at_jobs = true
|
15
|
-
|
16
|
-
yield
|
17
|
-
ensure
|
18
|
-
adapter.perform_enqueued_jobs = old
|
19
|
-
adapter.perform_enqueued_at_jobs = old_at
|
20
|
-
end
|
6
|
+
def self.included(base)
|
7
|
+
Spree.deprecator.warn <<~WARN
|
8
|
+
Including `Spree::TestingSupport::JobHelpers` is deprecated and will be removed in Solidus 5.0.
|
9
|
+
Please `include ActiveJob::TestHelper` instead.
|
10
|
+
WARN
|
11
|
+
base.include(ActiveJob::TestHelper)
|
21
12
|
end
|
22
13
|
end
|
23
14
|
end
|
@@ -6,8 +6,8 @@ module Spree
|
|
6
6
|
def check_missing_translations(page, example)
|
7
7
|
missing_translations = page.body.scan(/translation missing: #{I18n.locale}\.(.*?)[\s<\"&]/)
|
8
8
|
if missing_translations.any?
|
9
|
-
|
10
|
-
|
9
|
+
Rails.logger.info "Found missing translations: #{missing_translations.inspect}"
|
10
|
+
Rails.logger.info "In spec: #{example.location}"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/lib/spree/zero.rb
ADDED
data/solidus_core.gemspec
CHANGED
@@ -27,7 +27,10 @@ Gem::Specification.new do |s|
|
|
27
27
|
actionmailer actionpack actionview activejob activemodel activerecord
|
28
28
|
activestorage activesupport railties
|
29
29
|
].each do |rails_dep|
|
30
|
-
s.add_dependency rails_dep, [
|
30
|
+
s.add_dependency rails_dep, [
|
31
|
+
">= #{Spree.minimum_required_rails_version}",
|
32
|
+
"< 8.1.0.beta1"
|
33
|
+
]
|
31
34
|
end
|
32
35
|
|
33
36
|
s.add_dependency 'activemerchant', '~> 1.66'
|
@@ -45,7 +48,8 @@ Gem::Specification.new do |s|
|
|
45
48
|
s.add_dependency 'psych', ['>= 4.0.1', '< 6.0']
|
46
49
|
s.add_dependency 'ransack', ['~> 4.0', '< 5']
|
47
50
|
s.add_dependency 'sprockets-rails', '!= 3.5.0'
|
48
|
-
s.add_dependency 'state_machines
|
51
|
+
s.add_dependency 'state_machines', ['~> 0.6', '< 0.10.0']
|
52
|
+
s.add_dependency 'state_machines-activerecord', ['~> 0.6', '< 0.10.0']
|
49
53
|
s.add_dependency 'omnes', '~> 0.2.2'
|
50
54
|
|
51
55
|
s.post_install_message = <<-MSG
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: actionmailer
|
@@ -429,6 +429,26 @@ dependencies:
|
|
429
429
|
- - "!="
|
430
430
|
- !ruby/object:Gem::Version
|
431
431
|
version: 3.5.0
|
432
|
+
- !ruby/object:Gem::Dependency
|
433
|
+
name: state_machines
|
434
|
+
requirement: !ruby/object:Gem::Requirement
|
435
|
+
requirements:
|
436
|
+
- - "~>"
|
437
|
+
- !ruby/object:Gem::Version
|
438
|
+
version: '0.6'
|
439
|
+
- - "<"
|
440
|
+
- !ruby/object:Gem::Version
|
441
|
+
version: 0.10.0
|
442
|
+
type: :runtime
|
443
|
+
prerelease: false
|
444
|
+
version_requirements: !ruby/object:Gem::Requirement
|
445
|
+
requirements:
|
446
|
+
- - "~>"
|
447
|
+
- !ruby/object:Gem::Version
|
448
|
+
version: '0.6'
|
449
|
+
- - "<"
|
450
|
+
- !ruby/object:Gem::Version
|
451
|
+
version: 0.10.0
|
432
452
|
- !ruby/object:Gem::Dependency
|
433
453
|
name: state_machines-activerecord
|
434
454
|
requirement: !ruby/object:Gem::Requirement
|
@@ -436,6 +456,9 @@ dependencies:
|
|
436
456
|
- - "~>"
|
437
457
|
- !ruby/object:Gem::Version
|
438
458
|
version: '0.6'
|
459
|
+
- - "<"
|
460
|
+
- !ruby/object:Gem::Version
|
461
|
+
version: 0.10.0
|
439
462
|
type: :runtime
|
440
463
|
prerelease: false
|
441
464
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -443,6 +466,9 @@ dependencies:
|
|
443
466
|
- - "~>"
|
444
467
|
- !ruby/object:Gem::Version
|
445
468
|
version: '0.6'
|
469
|
+
- - "<"
|
470
|
+
- !ruby/object:Gem::Version
|
471
|
+
version: 0.10.0
|
446
472
|
- !ruby/object:Gem::Dependency
|
447
473
|
name: omnes
|
448
474
|
requirement: !ruby/object:Gem::Requirement
|
@@ -488,6 +514,8 @@ files:
|
|
488
514
|
- app/helpers/spree/products_helper.rb
|
489
515
|
- app/helpers/spree/store_helper.rb
|
490
516
|
- app/helpers/spree/taxons_helper.rb
|
517
|
+
- app/jobs/spree/base_job.rb
|
518
|
+
- app/jobs/spree/state_change_tracking_job.rb
|
491
519
|
- app/mailers/spree/base_mailer.rb
|
492
520
|
- app/mailers/spree/carton_mailer.rb
|
493
521
|
- app/mailers/spree/order_mailer.rb
|
@@ -502,8 +530,10 @@ files:
|
|
502
530
|
- app/models/concerns/spree/metadata.rb
|
503
531
|
- app/models/concerns/spree/named_type.rb
|
504
532
|
- app/models/concerns/spree/ordered_property_value_list.rb
|
533
|
+
- app/models/concerns/spree/preferences/persistable.rb
|
505
534
|
- app/models/concerns/spree/ransackable_attributes.rb
|
506
535
|
- app/models/concerns/spree/soft_deletable.rb
|
536
|
+
- app/models/concerns/spree/state_change_tracking.rb
|
507
537
|
- app/models/concerns/spree/user_address_book.rb
|
508
538
|
- app/models/concerns/spree/user_api_authentication.rb
|
509
539
|
- app/models/concerns/spree/user_methods.rb
|
@@ -730,7 +760,12 @@ files:
|
|
730
760
|
- app/models/spree/wallet_payment_source.rb
|
731
761
|
- app/models/spree/zone.rb
|
732
762
|
- app/models/spree/zone_member.rb
|
763
|
+
- app/subscribers/spree/carton_shipped_mailer_subscriber.rb
|
764
|
+
- app/subscribers/spree/order_cancel_mailer_subscriber.rb
|
765
|
+
- app/subscribers/spree/order_confirmation_mailer_subscriber.rb
|
766
|
+
- app/subscribers/spree/order_inventory_cancellation_mailer_subscriber.rb
|
733
767
|
- app/subscribers/spree/order_mailer_subscriber.rb
|
768
|
+
- app/subscribers/spree/reimbursement_mailer_subscriber.rb
|
734
769
|
- app/views/layouts/spree/base_mailer.html.erb
|
735
770
|
- app/views/spree/carton_mailer/shipped_email.html.erb
|
736
771
|
- app/views/spree/carton_mailer/shipped_email.text.erb
|
@@ -806,6 +841,22 @@ files:
|
|
806
841
|
- db/migrate/20250129061658_add_metadata_to_spree_resources.rb
|
807
842
|
- db/migrate/20250201172950_add_gtin_and_condition_to_spree_variant.rb
|
808
843
|
- db/migrate/20250207104016_add_primary_taxon_to_products.rb
|
844
|
+
- db/migrate/20250214094207_add_reverse_charge_status_to_store.rb
|
845
|
+
- db/migrate/20250221152004_add_metadata_to_users.rb
|
846
|
+
- db/migrate/20250225051308_add_vat_id_email_and_reverse_charge_status_to_addresses.rb
|
847
|
+
- db/migrate/20250508145917_add_email_to_stock_locations.rb
|
848
|
+
- db/migrate/20250530102541_add_addressbook_foreign_key.rb
|
849
|
+
- db/migrate/20250604072105_add_fk_products_variant_property_rules.rb
|
850
|
+
- db/migrate/20250604072555_add_fk_to_product_properties.rb
|
851
|
+
- db/migrate/20250604072948_add_fk_to_product_option_types.rb
|
852
|
+
- db/migrate/20250604073219_add_fk_to_classifications.rb
|
853
|
+
- db/migrate/20250605105424_add_shipping_category_foreign_keys.rb
|
854
|
+
- db/migrate/20250626112117_add_foreign_key_to_spree_role_users.rb
|
855
|
+
- db/migrate/20250628094037_change_countries_iso_to_unique.rb
|
856
|
+
- db/migrate/20250708120317_add_adjustment_reason_foreign_keys.rb
|
857
|
+
- db/migrate/20250709073151_add_country_foreign_keys.rb
|
858
|
+
- db/migrate/20250709084513_add_state_foreign_keys.rb
|
859
|
+
- db/migrate/20250726220709_add_fk_to_customer_return.rb
|
809
860
|
- db/seeds.rb
|
810
861
|
- lib/generators/solidus/install/app_templates/authentication/custom.rb
|
811
862
|
- lib/generators/solidus/install/app_templates/authentication/devise.rb
|
@@ -830,7 +881,7 @@ files:
|
|
830
881
|
- lib/generators/spree/dummy/templates/rails/application.rb.tt
|
831
882
|
- lib/generators/spree/dummy/templates/rails/boot.rb
|
832
883
|
- lib/generators/spree/dummy/templates/rails/database.yml
|
833
|
-
- lib/generators/spree/dummy/templates/rails/manifest.js
|
884
|
+
- lib/generators/spree/dummy/templates/rails/manifest.js.tt
|
834
885
|
- lib/generators/spree/dummy/templates/rails/routes.rb
|
835
886
|
- lib/generators/spree/dummy/templates/rails/storage.yml
|
836
887
|
- lib/generators/spree/dummy/templates/rails/test.rb
|
@@ -909,7 +960,6 @@ files:
|
|
909
960
|
- lib/spree/permission_sets/user_management.rb
|
910
961
|
- lib/spree/permitted_attributes.rb
|
911
962
|
- lib/spree/preferences/configuration.rb
|
912
|
-
- lib/spree/preferences/persistable.rb
|
913
963
|
- lib/spree/preferences/preferable.rb
|
914
964
|
- lib/spree/preferences/preferable_class_methods.rb
|
915
965
|
- lib/spree/preferences/preference_differentiator.rb
|
@@ -922,6 +972,7 @@ files:
|
|
922
972
|
- lib/spree/testing_support/blacklist_urls.rb
|
923
973
|
- lib/spree/testing_support/bus_helpers.rb
|
924
974
|
- lib/spree/testing_support/caching.rb
|
975
|
+
- lib/spree/testing_support/capybara_driver.rb
|
925
976
|
- lib/spree/testing_support/capybara_ext.rb
|
926
977
|
- lib/spree/testing_support/common_rake.rb
|
927
978
|
- lib/spree/testing_support/controller_requests.rb
|
@@ -1010,6 +1061,7 @@ files:
|
|
1010
1061
|
- lib/spree/testing_support/translations.rb
|
1011
1062
|
- lib/spree/testing_support/url_helpers.rb
|
1012
1063
|
- lib/spree/user_class_handle.rb
|
1064
|
+
- lib/spree/zero.rb
|
1013
1065
|
- lib/spree_core.rb
|
1014
1066
|
- lib/tasks/colorado_delivery_fee.rake
|
1015
1067
|
- lib/tasks/payment_method.rake
|
@@ -1060,7 +1112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1060
1112
|
- !ruby/object:Gem::Version
|
1061
1113
|
version: 1.8.23
|
1062
1114
|
requirements: []
|
1063
|
-
rubygems_version: 3.6.
|
1115
|
+
rubygems_version: 3.6.9
|
1064
1116
|
specification_version: 4
|
1065
1117
|
summary: Essential models, mailers, and classes for the Solidus e-commerce project.
|
1066
1118
|
test_files: []
|
File without changes
|