solidus_core 3.3.1 → 3.3.3
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/app/models/concerns/spree/default_price.rb +6 -0
- data/app/models/spree/product.rb +1 -0
- data/lib/generators/solidus/install/install_generator.rb +1 -1
- data/lib/generators/solidus/update/update_generator.rb +14 -2
- data/lib/spree/core/product_duplicator.rb +1 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/migration_helpers.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37474ca0bd9f64c6406eec5f01194d820551f5d0c4c683c5e772fdcf767bd4e8
|
4
|
+
data.tar.gz: fceb4a330c37ccb986a3ba4079461772065e0b301deae565d4dbbfd7679ec34c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8a9ff14b85d5d84cc59653a962da56241c91ca872de1c171e803081235503ca0275915908f013eaa4f144f5eebf4eab4a53dfd527b4a95982f35cc07e0999a7
|
7
|
+
data.tar.gz: fa0d9f73641d28cb08699b802c8c921a3348c033e9835011834ecac3c0caa31d3ca551d5f4d6b7c32a82005b21b62a52cee86132e624ba7792d8ba11ee020766
|
@@ -32,6 +32,12 @@ module Spree
|
|
32
32
|
prices.build(self.class.default_price_attributes)
|
33
33
|
end
|
34
34
|
|
35
|
+
# @deprecated Use {#default_price_or_build} instead.
|
36
|
+
def find_or_build_default_price
|
37
|
+
default_price_or_build
|
38
|
+
end
|
39
|
+
deprecate find_or_build_default_price: :default_price_or_build, deprecator: Spree::Deprecation
|
40
|
+
|
35
41
|
# Select from {#prices} the one to be considered as the default
|
36
42
|
#
|
37
43
|
# This method works with the in-memory association, so non-persisted prices
|
data/app/models/spree/product.rb
CHANGED
@@ -98,7 +98,7 @@ module Solidus
|
|
98
98
|
rake 'active_storage:install'
|
99
99
|
else
|
100
100
|
say_status :assets, "Paperclip", :green
|
101
|
-
gsub_file 'config/initializers/spree.rb', "ActiveStorageAttachment", "PaperclipAttachment"
|
101
|
+
gsub_file 'config/initializers/spree.rb', "::ActiveStorageAttachment", "::PaperclipAttachment"
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
@@ -8,7 +8,7 @@ module Solidus
|
|
8
8
|
class UpdateGenerator < ::Rails::Generators::Base
|
9
9
|
FROM = Spree.previous_solidus_minor_version
|
10
10
|
|
11
|
-
desc 'Generates a new initializer to preview the new defaults for current Solidus version'
|
11
|
+
desc 'Generates a new initializer to preview the new defaults for current Solidus version and copy new migrations'
|
12
12
|
|
13
13
|
source_root File.expand_path('templates', __dir__)
|
14
14
|
|
@@ -37,10 +37,15 @@ module Solidus
|
|
37
37
|
default: 'config/initializers/',
|
38
38
|
hide: true
|
39
39
|
|
40
|
+
class_option :install_migrations,
|
41
|
+
type: :boolean,
|
42
|
+
default: true,
|
43
|
+
hide: true
|
44
|
+
|
40
45
|
def create_new_defaults_initializer
|
41
46
|
previous_version_prompt = options[:previous_version_prompt]
|
42
47
|
return if previous_version_prompt && !yes?(<<~MSG, :red)
|
43
|
-
The update process is only supported if you are coming from version #{FROM}. If this is not the case, please, skip it and update your application to use Solidus #{FROM} before retrying.
|
48
|
+
The default preferences update process is only supported if you are coming from version #{FROM}. If this is not the case, please, skip it and update your application to use Solidus #{FROM} before retrying.
|
44
49
|
If you are confident you want to upgrade from a previous version, you must rerun the generator with the "--from={OLD_VERSION}" argument.
|
45
50
|
Are you sure you want to continue? (y/N)
|
46
51
|
MSG
|
@@ -57,6 +62,13 @@ module Solidus
|
|
57
62
|
File.join(options[:initializer_directory], "#{options[:initializer_basename]}.rb")
|
58
63
|
end
|
59
64
|
|
65
|
+
def install_migrations
|
66
|
+
return unless options[:install_migrations]
|
67
|
+
|
68
|
+
say_status :copying, "migrations"
|
69
|
+
rake 'spree:install:migrations'
|
70
|
+
end
|
71
|
+
|
60
72
|
def print_message
|
61
73
|
say <<~MSG
|
62
74
|
|
@@ -45,7 +45,7 @@ module Spree
|
|
45
45
|
new_master.sku = "COPY OF #{master.sku}"
|
46
46
|
new_master.deleted_at = nil
|
47
47
|
new_master.images = master.images.map { |image| duplicate_image image } if @include_images
|
48
|
-
new_master.
|
48
|
+
new_master.prices = master.prices.map(&:dup)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
data/lib/spree/core/version.rb
CHANGED
@@ -6,9 +6,9 @@ module Spree
|
|
6
6
|
remove_index(table, column) if index_exists?(table, column)
|
7
7
|
end
|
8
8
|
|
9
|
-
def safe_add_index(table, column, options
|
10
|
-
if columns_exist?(table, column) && !index_exists?(table, column, options)
|
11
|
-
add_index(table, column, options)
|
9
|
+
def safe_add_index(table, column, **options)
|
10
|
+
if columns_exist?(table, column) && !index_exists?(table, column, **options)
|
11
|
+
add_index(table, column, **options)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|