solidus_core 3.4.6 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -1
- data/app/helpers/spree/products_helper.rb +1 -1
- data/app/models/concerns/spree/active_storage_adapter.rb +0 -17
- data/app/models/concerns/spree/default_price.rb +0 -15
- data/app/models/concerns/spree/ransackable_attributes.rb +0 -21
- data/app/models/spree/adjustment.rb +0 -13
- data/app/models/spree/carton.rb +1 -1
- data/app/models/spree/fulfilment_changer.rb +2 -14
- data/app/models/spree/option_value.rb +2 -11
- data/app/models/spree/order.rb +9 -21
- data/app/models/spree/order_updater.rb +0 -29
- data/app/models/spree/payment.rb +5 -37
- data/app/models/spree/product/scopes.rb +0 -5
- data/app/models/spree/product.rb +3 -10
- data/app/models/spree/promotion/rules/item_total.rb +0 -11
- data/app/models/spree/promotion.rb +7 -30
- data/app/models/spree/promotion_rule.rb +0 -5
- data/app/models/spree/taxon.rb +2 -2
- data/app/models/spree/taxonomy.rb +1 -1
- data/app/models/spree/variant/price_selector.rb +1 -14
- data/app/models/spree/variant.rb +1 -17
- data/db/migrate/20210815004823_add_unique_index_to_option_values_variants.rb +16 -0
- data/db/migrate/20230321161854_change_column_null_option_values_option_type_id.rb +5 -0
- data/db/migrate/20230322085416_remove_match_policy_from_spree_promotion.rb +5 -0
- data/db/migrate/20230325132905_remove_unused_columns_from_promotion_rules.rb +6 -0
- data/db/migrate/20230325161633_drop_unused_promo_action_line_items.rb +13 -0
- data/db/migrate/20230425103509_remove_taxon_position.rb +5 -0
- data/db/migrate/20230427095534_drop_deprecated_address_id_from_shipments.rb +11 -0
- data/lib/generators/solidus/install/app_templates/frontend/none.rb +1 -2
- data/lib/generators/solidus/install/app_templates/frontend/starter.rb +1 -3
- data/lib/generators/solidus/install/app_templates/payment_method/paypal.rb +2 -14
- data/lib/generators/solidus/install/app_templates/payment_method/stripe.rb +5 -0
- data/lib/generators/solidus/install/install_generator.rb +59 -153
- data/lib/spree/app_configuration.rb +2 -82
- data/lib/spree/bus.rb +0 -11
- data/lib/spree/core/controller_helpers/auth.rb +0 -16
- data/lib/spree/core/engine.rb +11 -31
- data/lib/spree/core/validators/email.rb +0 -4
- data/lib/spree/core/version.rb +2 -2
- data/lib/spree/core.rb +0 -2
- data/lib/spree/migration_helpers.rb +3 -3
- data/lib/spree/preferences/preferable_class_methods.rb +1 -25
- data/lib/spree/testing_support/common_rake.rb +5 -1
- data/lib/spree/testing_support/dummy_app/rake_tasks.rb +4 -8
- data/lib/spree/testing_support/dummy_app.rb +1 -6
- data/lib/spree/testing_support/factories/address_factory.rb +0 -7
- data/lib/spree/testing_support/factories/adjustment_factory.rb +0 -11
- data/lib/spree/testing_support/factories/adjustment_reason_factory.rb +0 -5
- data/lib/spree/testing_support/factories/calculator_factory.rb +0 -5
- data/lib/spree/testing_support/factories/carton_factory.rb +0 -8
- data/lib/spree/testing_support/factories/country_factory.rb +0 -5
- data/lib/spree/testing_support/factories/credit_card_factory.rb +0 -5
- data/lib/spree/testing_support/factories/customer_return_factory.rb +0 -9
- data/lib/spree/testing_support/factories/image_factory.rb +0 -5
- data/lib/spree/testing_support/factories/inventory_unit_factory.rb +0 -10
- data/lib/spree/testing_support/factories/line_item_factory.rb +0 -8
- data/lib/spree/testing_support/factories/option_type_factory.rb +0 -8
- data/lib/spree/testing_support/factories/option_value_factory.rb +0 -5
- data/lib/spree/testing_support/factories/order_factory.rb +0 -12
- data/lib/spree/testing_support/factories/order_promotion_factory.rb +0 -8
- data/lib/spree/testing_support/factories/payment_factory.rb +0 -10
- data/lib/spree/testing_support/factories/payment_method_factory.rb +0 -5
- data/lib/spree/testing_support/factories/price_factory.rb +0 -7
- data/lib/spree/testing_support/factories/product_factory.rb +0 -11
- data/lib/spree/testing_support/factories/product_option_type_factory.rb +0 -8
- data/lib/spree/testing_support/factories/product_property_factory.rb +0 -8
- data/lib/spree/testing_support/factories/promotion_category_factory.rb +0 -5
- data/lib/spree/testing_support/factories/promotion_code_factory.rb +0 -8
- data/lib/spree/testing_support/factories/promotion_factory.rb +0 -8
- data/lib/spree/testing_support/factories/property_factory.rb +0 -5
- data/lib/spree/testing_support/factories/refund_factory.rb +0 -8
- data/lib/spree/testing_support/factories/refund_reason_factory.rb +0 -5
- data/lib/spree/testing_support/factories/reimbursement_factory.rb +0 -7
- data/lib/spree/testing_support/factories/reimbursement_type_factory.rb +0 -5
- data/lib/spree/testing_support/factories/return_authorization_factory.rb +0 -9
- data/lib/spree/testing_support/factories/return_item_factory.rb +0 -9
- data/lib/spree/testing_support/factories/return_reason_factory.rb +0 -5
- data/lib/spree/testing_support/factories/role_factory.rb +0 -5
- data/lib/spree/testing_support/factories/shipment_factory.rb +0 -10
- data/lib/spree/testing_support/factories/shipping_category_factory.rb +0 -5
- data/lib/spree/testing_support/factories/shipping_method_factory.rb +0 -9
- data/lib/spree/testing_support/factories/shipping_rate_factory.rb +0 -8
- data/lib/spree/testing_support/factories/state_factory.rb +0 -8
- data/lib/spree/testing_support/factories/stock_item_factory.rb +0 -8
- data/lib/spree/testing_support/factories/stock_location_factory.rb +0 -9
- data/lib/spree/testing_support/factories/stock_movement_factory.rb +0 -7
- data/lib/spree/testing_support/factories/stock_package_factory.rb +0 -8
- data/lib/spree/testing_support/factories/store_credit_category_factory.rb +0 -5
- data/lib/spree/testing_support/factories/store_credit_event_factory.rb +0 -8
- data/lib/spree/testing_support/factories/store_credit_factory.rb +0 -9
- data/lib/spree/testing_support/factories/store_credit_reason_factory.rb +0 -5
- data/lib/spree/testing_support/factories/store_credit_type_factory.rb +0 -5
- data/lib/spree/testing_support/factories/store_factory.rb +0 -5
- data/lib/spree/testing_support/factories/tax_category_factory.rb +0 -8
- data/lib/spree/testing_support/factories/tax_rate_factory.rb +0 -9
- data/lib/spree/testing_support/factories/taxon_factory.rb +0 -7
- data/lib/spree/testing_support/factories/taxonomy_factory.rb +0 -5
- data/lib/spree/testing_support/factories/user_factory.rb +0 -9
- data/lib/spree/testing_support/factories/variant_factory.rb +0 -10
- data/lib/spree/testing_support/factories/variant_property_rule_condition_factory.rb +0 -8
- data/lib/spree/testing_support/factories/variant_property_rule_factory.rb +0 -9
- data/lib/spree/testing_support/factories/variant_property_rule_value_factory.rb +0 -8
- data/lib/spree/testing_support/factories/zone_factory.rb +0 -8
- data/lib/spree/testing_support/factory_bot.rb +4 -28
- data/lib/spree/testing_support/sequences.rb +0 -5
- data/solidus_core.gemspec +4 -4
- metadata +48 -76
- data/app/subscribers/spree/mailer_subscriber.rb +0 -29
- data/lib/generators/solidus/install/app_templates/frontend/break_down_solidus_gem.rb +0 -54
- data/lib/generators/solidus/install/app_templates/frontend/classic.rb +0 -16
- data/lib/generators/solidus/install/app_templates/payment_method/bolt.rb +0 -13
- data/lib/spree/core/controller_helpers/current_host.rb +0 -19
- data/lib/spree/event/adapters/active_support_notifications.rb +0 -67
- data/lib/spree/event/configuration.rb +0 -25
- data/lib/spree/event/subscriber.rb +0 -86
- data/lib/spree/event/subscriber_registry.rb +0 -92
- data/lib/spree/event.rb +0 -119
- data/lib/spree/promotion/match_policies.rb +0 -2
- data/lib/spree/rails_compatibility.rb +0 -106
- data/lib/spree/testing_support/factories.rb +0 -11
- data/lib/spree/testing_support.rb +0 -36
- data/lib/tasks/solidus/check_orders_with_invalid_email.rake +0 -18
- data/lib/tasks/solidus/split_promotions_with_any_match_policy.rake +0 -33
@@ -1,13 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/stock_location_factory'
|
8
|
-
require 'spree/testing_support/factories/variant_factory'
|
9
|
-
end
|
10
|
-
|
11
3
|
FactoryBot.define do
|
12
4
|
factory :stock_item, class: 'Spree::StockItem' do
|
13
5
|
backorderable { true }
|
@@ -1,14 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/country_factory'
|
8
|
-
require 'spree/testing_support/factories/state_factory'
|
9
|
-
require 'spree/testing_support/factories/product_factory'
|
10
|
-
end
|
11
|
-
|
12
3
|
FactoryBot.define do
|
13
4
|
factory :stock_location, class: 'Spree::StockLocation' do
|
14
5
|
name { 'NY Warehouse' }
|
@@ -1,12 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/stock_item_factory'
|
8
|
-
end
|
9
|
-
|
10
3
|
FactoryBot.define do
|
11
4
|
factory :stock_movement, class: 'Spree::StockMovement' do
|
12
5
|
quantity { 1 }
|
@@ -1,13 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/inventory_unit_factory'
|
8
|
-
require 'spree/testing_support/factories/variant_factory'
|
9
|
-
end
|
10
|
-
|
11
3
|
FactoryBot.define do
|
12
4
|
factory :stock_package, class: 'Spree::Stock::Package' do
|
13
5
|
skip_create
|
@@ -1,10 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
end
|
7
|
-
|
8
3
|
FactoryBot.define do
|
9
4
|
factory :store_credit_category, class: 'Spree::StoreCreditCategory' do
|
10
5
|
name { "Exchange" }
|
@@ -1,13 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/store_credit_factory'
|
8
|
-
require 'spree/testing_support/factories/store_credit_reason_factory'
|
9
|
-
end
|
10
|
-
|
11
3
|
FactoryBot.define do
|
12
4
|
factory :store_credit_event, class: 'Spree::StoreCreditEvent' do
|
13
5
|
store_credit
|
@@ -1,14 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/store_credit_category_factory'
|
8
|
-
require 'spree/testing_support/factories/store_credit_type_factory'
|
9
|
-
require 'spree/testing_support/factories/user_factory'
|
10
|
-
end
|
11
|
-
|
12
3
|
FactoryBot.define do
|
13
4
|
factory :store_credit, class: 'Spree::StoreCredit' do
|
14
5
|
association :user, strategy: :create
|
@@ -1,10 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
end
|
7
|
-
|
8
3
|
FactoryBot.define do
|
9
4
|
factory :store_credit_reason, class: 'Spree::StoreCreditReason' do
|
10
5
|
sequence :name do |n|
|
@@ -1,10 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
end
|
7
|
-
|
8
3
|
FactoryBot.define do
|
9
4
|
factory :primary_credit_type, class: 'Spree::StoreCreditType' do
|
10
5
|
name { Spree::StoreCreditType::DEFAULT_TYPE_NAME }
|
@@ -1,10 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
end
|
7
|
-
|
8
3
|
FactoryBot.define do
|
9
4
|
factory :store, class: 'Spree::Store' do
|
10
5
|
sequence(:code) { |i| "spree_#{i}" }
|
@@ -1,13 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/sequences'
|
8
|
-
end
|
9
|
-
|
10
|
-
|
11
3
|
FactoryBot.define do
|
12
4
|
factory :tax_category, class: 'Spree::TaxCategory' do
|
13
5
|
name { "TaxCategory - #{rand(999_999)}" }
|
@@ -1,14 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/calculator_factory'
|
8
|
-
require 'spree/testing_support/factories/tax_category_factory'
|
9
|
-
require 'spree/testing_support/factories/zone_factory'
|
10
|
-
end
|
11
|
-
|
12
3
|
FactoryBot.define do
|
13
4
|
factory :tax_rate, class: 'Spree::TaxRate' do
|
14
5
|
zone
|
@@ -1,12 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/taxonomy_factory'
|
8
|
-
end
|
9
|
-
|
10
3
|
FactoryBot.define do
|
11
4
|
factory :taxon, class: 'Spree::Taxon' do
|
12
5
|
name { 'Ruby on Rails' }
|
@@ -1,10 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
end
|
7
|
-
|
8
3
|
FactoryBot.define do
|
9
4
|
factory :taxonomy, class: 'Spree::Taxonomy' do
|
10
5
|
sequence :name do |seq|
|
@@ -1,14 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/sequences'
|
8
|
-
require 'spree/testing_support/factories/role_factory'
|
9
|
-
require 'spree/testing_support/factories/address_factory'
|
10
|
-
end
|
11
|
-
|
12
3
|
FactoryBot.define do
|
13
4
|
factory :user, class: Spree::UserClassHandle.new do
|
14
5
|
email { generate(:email) }
|
@@ -1,15 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/sequences'
|
8
|
-
require 'spree/testing_support/factories/option_value_factory'
|
9
|
-
require 'spree/testing_support/factories/option_type_factory'
|
10
|
-
require 'spree/testing_support/factories/product_factory'
|
11
|
-
end
|
12
|
-
|
13
3
|
FactoryBot.define do
|
14
4
|
sequence(:random_float) { BigDecimal("#{rand(200)}.#{rand(99)}") }
|
15
5
|
|
@@ -1,13 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/option_value_factory'
|
8
|
-
require 'spree/testing_support/factories/variant_property_rule_factory'
|
9
|
-
end
|
10
|
-
|
11
3
|
FactoryBot.define do
|
12
4
|
factory :variant_property_rule_condition, class: 'Spree::VariantPropertyRuleCondition' do
|
13
5
|
variant_property_rule
|
@@ -1,14 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/product_factory'
|
8
|
-
require 'spree/testing_support/factories/property_factory'
|
9
|
-
require 'spree/testing_support/factories/option_value_factory'
|
10
|
-
end
|
11
|
-
|
12
3
|
FactoryBot.define do
|
13
4
|
factory :variant_property_rule, class: 'Spree::VariantPropertyRule' do
|
14
5
|
product
|
@@ -1,13 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/factories/variant_property_rule_factory'
|
8
|
-
require 'spree/testing_support/factories/property_factory'
|
9
|
-
end
|
10
|
-
|
11
3
|
FactoryBot.define do
|
12
4
|
factory :variant_property_rule_value, class: 'Spree::VariantPropertyRuleValue' do
|
13
5
|
variant_property_rule
|
@@ -1,13 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
|
7
|
-
require 'spree/testing_support/sequences'
|
8
|
-
require 'spree/testing_support/factories/country_factory'
|
9
|
-
end
|
10
|
-
|
11
3
|
FactoryBot.define do
|
12
4
|
factory :global_zone, class: 'Spree::Zone' do
|
13
5
|
initialize_with { Spree::Zone.find_or_initialize_by(name: 'GlobalZone') }
|
@@ -17,30 +17,6 @@ module Spree
|
|
17
17
|
@paths ||= PATHS.map { |path| path.sub(/.rb\z/, '') }
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.when_cherry_picked
|
21
|
-
callsites = caller
|
22
|
-
|
23
|
-
# All good if the factory is being loaded by FactoryBot or from `testing_support/factories.rb`.
|
24
|
-
return if callsites.find do |line|
|
25
|
-
line.include?("/factory_bot/find_definitions.rb") ||
|
26
|
-
line.include?("/spree/testing_support/factories.rb")
|
27
|
-
end
|
28
|
-
|
29
|
-
yield
|
30
|
-
end
|
31
|
-
|
32
|
-
def self.deprecate_cherry_picking
|
33
|
-
callsites = caller
|
34
|
-
core_root = Spree::Core::Engine.root.to_s
|
35
|
-
index = callsites.index { |line| !line.start_with? core_root }
|
36
|
-
|
37
|
-
Spree::Deprecation.warn(
|
38
|
-
"Please do not cherry-pick factories, this is not well supported by FactoryBot, " \
|
39
|
-
'follow the changelog instructions on how to migrate your current setup.',
|
40
|
-
callsites[index..]
|
41
|
-
)
|
42
|
-
end
|
43
|
-
|
44
20
|
def self.check_version
|
45
21
|
require "factory_bot/version"
|
46
22
|
|
@@ -48,10 +24,10 @@ module Spree
|
|
48
24
|
version = Gem::Version.new(::FactoryBot::VERSION)
|
49
25
|
|
50
26
|
unless requirement.satisfied_by? version
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
27
|
+
raise <<~MSG
|
28
|
+
Please be aware that the supported version of FactoryBot is #{requirement},
|
29
|
+
using version #{version} could lead to factory loading issues.
|
30
|
+
MSG
|
55
31
|
end
|
56
32
|
end
|
57
33
|
deprecate :check_version, deprecator: Spree::Deprecation
|
@@ -1,10 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support/factory_bot'
|
4
|
-
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
-
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
-
end
|
7
|
-
|
8
3
|
FactoryBot.define do
|
9
4
|
sequence(:sku) { |n| "SKU-#{n}" }
|
10
5
|
sequence(:email) { |n| "email#{n}@example.com" }
|
data/solidus_core.gemspec
CHANGED
@@ -20,14 +20,14 @@ Gem::Specification.new do |s|
|
|
20
20
|
f.match(%r{^(spec|script)/})
|
21
21
|
end
|
22
22
|
|
23
|
-
s.required_ruby_version = '>=
|
23
|
+
s.required_ruby_version = '>= 3.0.0'
|
24
24
|
s.required_rubygems_version = '>= 1.8.23'
|
25
25
|
|
26
26
|
%w[
|
27
27
|
actionmailer actionpack actionview activejob activemodel activerecord
|
28
|
-
|
28
|
+
activesupport railties
|
29
29
|
].each do |rails_dep|
|
30
|
-
s.add_dependency rails_dep, ['>=
|
30
|
+
s.add_dependency rails_dep, ['>= 7.0', '< 7.1']
|
31
31
|
end
|
32
32
|
|
33
33
|
s.add_dependency 'activemerchant', '~> 1.66'
|
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
s.add_dependency 'mini_magick', '~> 4.10'
|
43
43
|
s.add_dependency 'monetize', '~> 1.8'
|
44
44
|
s.add_dependency 'kt-paperclip', ['>= 6.3', '< 8']
|
45
|
-
s.add_dependency 'psych', ['>=
|
45
|
+
s.add_dependency 'psych', ['>= 3.1.0', '< 5.0']
|
46
46
|
s.add_dependency 'ransack', '~> 2.0'
|
47
47
|
s.add_dependency 'sprockets-rails'
|
48
48
|
s.add_dependency 'state_machines-activerecord', '~> 0.6'
|