solidus_core 3.3.1 → 3.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41166c504ad4a467ac0d444551669efca2f6ff36b8083b11483ca1d6953c838e
4
- data.tar.gz: f9c8abd6767eb3aaecf807d1e360defbb57ba7af0590d88b6019f0cd8bf2f1b1
3
+ metadata.gz: caace905606e0421dddde4e2092959bc15679b45d4fd6f71202aca8ac9b22cca
4
+ data.tar.gz: d0076132f422409dbfc7754d68cfc5d1dd72165429ce1ee2c5cbf7e6a7aa78e6
5
5
  SHA512:
6
- metadata.gz: 5f9384ee4d463107d31e2cff1670ee587e7c2ad61795f11d1120bb69049fcc0bec3f04a0edee1e10e4c951a5b287cd9b93986c4194b87303e1a2a1ee38a7062a
7
- data.tar.gz: 6d924bbc21a024712b1579c6bb73390904b456fc4671f1dc15b17de255d2f543b7cdcd2a4484e005444be085041a98819c6b3d2a1d55469305ce5b85108327e3
6
+ metadata.gz: 30d1a926a99a01a2610f0f87a7eaf6881693fd1bb0f449d795e3ba147e88e3bbab335aa47a0efc981eaec818e7820cc81a74d1bb21888c25bf656f01b4604cc7
7
+ data.tar.gz: b4f85d2275a4b1823411f9d592f5d5c2acf13b47d137b34e9f15733114cda5280c79d243a5deaa89994b7a5cdcf5cf4fafcf40e9a01e276094257e7c2e26c233
@@ -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
@@ -83,6 +83,7 @@ module Spree
83
83
  :height,
84
84
  :price,
85
85
  :sku,
86
+ :track_inventory,
86
87
  :weight,
87
88
  :width,
88
89
  ]
@@ -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.price = master.price
48
+ new_master.prices = master.prices.map(&:dup)
49
49
  end
50
50
  end
51
51
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "3.3.1"
4
+ VERSION = "3.3.2"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
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.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-07 00:00:00.000000000 Z
11
+ date: 2023-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -1034,8 +1034,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1034
1034
  - !ruby/object:Gem::Version
1035
1035
  version: 1.8.23
1036
1036
  requirements: []
1037
- rubygems_version: 3.3.7
1038
- signing_key:
1037
+ rubygems_version: 3.4.6
1038
+ signing_key:
1039
1039
  specification_version: 4
1040
1040
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.
1041
1041
  test_files: []