solidus_core 4.5.0 → 4.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb7dd71ea62d43498c1c5877746964d21c86df53336f0258493212019fc2d44e
4
- data.tar.gz: '0068830026c1ca0fe52e4a01e78aa6ae34ab69ee2bc513e59b5626f218f31891'
3
+ metadata.gz: 995355f29d96abe41d7beb6b28cbe8bd8198d8c4ebee544dedc223f15b856548
4
+ data.tar.gz: 07b683686244717fc86fe1a83777e29845365dbed70c2117d1aacddf8c729717
5
5
  SHA512:
6
- metadata.gz: 69ba883f25bb741c7694a9cf6023cec99562c2f7d4fbc9ac8b958b36ded1e4ee26cc7bf7007851bc4fcfbefdc822cd6c8a4f10da84118b72b677a54cc4eb1836
7
- data.tar.gz: 9f11f391a6afa095008c9b48a0f881a1037391c6d2277e3933d04de588f84ed6958c6d074f01362cded9e9c05e20e52fd41bf860b087b0dcc4e19f455d9afbd1
6
+ metadata.gz: '0963f51448492bca5190edb6641ea96206670f8ce17bea75e67c429838b5b98c041a936d64f57b994ca731df036995ef402eb24e723840a3b00efb109bf4e5c0'
7
+ data.tar.gz: 0fc6248571ff6027d618e4840d9c154bba8674fdbfd96805a58fbbc051b7c36d9c31d6e1d20b042bce38b8c5fc2b48d8b3201acb2ec264be2466c29704612c02
@@ -15,13 +15,13 @@ module Spree
15
15
  end
16
16
 
17
17
  scope :all_historical, -> {
18
- Spree::Deprecation.warn("This scope does not do anything and will be removed from Solidus 5.")
18
+ Spree.deprecator.warn("The 'Spree::UserAddress.all_historical` scope does not do anything and will be removed from Solidus 5.")
19
19
  all
20
20
  }
21
21
  scope :default_shipping, -> { where(default: true) }
22
22
  scope :default_billing, -> { where(default_billing: true) }
23
23
  scope :active, -> {
24
- Spree::Deprecation.warn("This scope does not do anything and will be removed from Solidus 5.")
24
+ Spree.deprecator.warn("The 'Spree::UserAddress.active` scope does not do anything and will be removed from Solidus 5.")
25
25
  all
26
26
  }
27
27
 
@@ -11,17 +11,16 @@ class AddMetadataToSpreeResources < ActiveRecord::Migration[7.2]
11
11
  spree_refunds
12
12
  spree_customer_returns
13
13
  spree_store_credit_events
14
- spree_users
15
14
  spree_return_authorizations
16
15
  ].each do |table_name|
17
16
  change_table table_name do |t|
18
17
  # Check if the database supports jsonb for efficient querying
19
18
  if t.respond_to?(:jsonb)
20
- add_column table_name, :customer_metadata, :jsonb, default: {}
21
- add_column table_name, :admin_metadata, :jsonb, default: {}
19
+ t.jsonb(:customer_metadata, default: {}) unless t.column_exists?(:customer_metadata)
20
+ t.jsonb(:admin_metadata, default: {}) unless t.column_exists?(:admin_metadata)
22
21
  else
23
- add_column table_name, :customer_metadata, :json
24
- add_column table_name, :admin_metadata, :json
22
+ t.json(:customer_metadata) unless t.column_exists?(:customer_metadata)
23
+ t.json(:admin_metadata) unless t.column_exists?(:admin_metadata)
25
24
  end
26
25
  end
27
26
  end
@@ -0,0 +1,13 @@
1
+ class AddMetadataToUsers < ActiveRecord::Migration[7.0]
2
+ def change
3
+ change_table Spree.user_class.table_name do |t|
4
+ if t.respond_to?(:jsonb)
5
+ t.jsonb(:customer_metadata, default: {}) unless t.column_exists?(:customer_metadata)
6
+ t.jsonb(:admin_metadata, default: {}) unless t.column_exists?(:admin_metadata)
7
+ else
8
+ t.json(:customer_metadata) unless t.column_exists?(:customer_metadata)
9
+ t.json(:admin_metadata) unless t.column_exists?(:admin_metadata)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -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: +true+)
225
+ # (default: +false+)
226
226
  preference :meta_data_validation_enabled, :boolean, default: false
227
227
 
228
228
  # @!attribute [rw] meta_data_max_keys
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "4.5.0"
4
+ VERSION = "4.5.1"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
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.5.0
4
+ version: 4.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-20 00:00:00.000000000 Z
10
+ date: 2025-03-06 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: actionmailer
@@ -806,6 +806,7 @@ files:
806
806
  - db/migrate/20250129061658_add_metadata_to_spree_resources.rb
807
807
  - db/migrate/20250201172950_add_gtin_and_condition_to_spree_variant.rb
808
808
  - db/migrate/20250207104016_add_primary_taxon_to_products.rb
809
+ - db/migrate/20250221152004_add_metadata_to_users.rb
809
810
  - db/seeds.rb
810
811
  - lib/generators/solidus/install/app_templates/authentication/custom.rb
811
812
  - lib/generators/solidus/install/app_templates/authentication/devise.rb
@@ -1060,7 +1061,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1060
1061
  - !ruby/object:Gem::Version
1061
1062
  version: 1.8.23
1062
1063
  requirements: []
1063
- rubygems_version: 3.6.3
1064
+ rubygems_version: 3.6.5
1064
1065
  specification_version: 4
1065
1066
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.
1066
1067
  test_files: []