solidus_core 3.2.0.alpha → 3.2.2
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/user_methods.rb +15 -0
- data/app/models/spree/price.rb +1 -1
- data/config/i18n-tasks.yml +134 -0
- data/config/locales/en.yml +384 -257
- data/lib/generators/solidus/install/install_generator/install_frontend.rb +5 -2
- data/lib/spree/app_configuration.rb +3 -2
- data/lib/spree/core/version.rb +2 -2
- data/lib/spree/rails_compatibility.rb +24 -0
- metadata +4 -3
@@ -30,7 +30,7 @@ module Solidus
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
@generator_context.generate(
|
33
|
+
@generator_context.generate("solidus_frontend:install #{@generator_context.options[:auto_accept] ? '--auto-accept' : ''}")
|
34
34
|
end
|
35
35
|
|
36
36
|
def install_solidus_starter_frontend(installer_adds_auth)
|
@@ -38,7 +38,10 @@ module Solidus
|
|
38
38
|
|
39
39
|
# TODO: Move installation of solidus_auth_devise to the
|
40
40
|
# solidus_starter_frontend template
|
41
|
-
|
41
|
+
unless auth_present?(installer_adds_auth)
|
42
|
+
BundlerContext.bundle_cleanly { `bundle add solidus_auth_devise` }
|
43
|
+
@generator_context.generate('solidus:auth:install --auto-run-migrations')
|
44
|
+
end
|
42
45
|
`LOCATION="https://raw.githubusercontent.com/solidusio/solidus_starter_frontend/main/template.rb" bin/rails app:template`
|
43
46
|
end
|
44
47
|
|
@@ -21,6 +21,7 @@ require "spree/core/search/base"
|
|
21
21
|
require "spree/core/search/variant"
|
22
22
|
require 'spree/preferences/configuration'
|
23
23
|
require 'spree/core/environment'
|
24
|
+
require 'spree/rails_compatibility'
|
24
25
|
|
25
26
|
module Spree
|
26
27
|
class AppConfiguration < Preferences::Configuration
|
@@ -497,7 +498,7 @@ module Spree
|
|
497
498
|
# @!attribute [rw] image_attachment_module
|
498
499
|
# @return [Module] a module that can be included into Spree::Image to allow attachments
|
499
500
|
# Enumerable of images adhering to the present_image_class interface
|
500
|
-
class_name_attribute :image_attachment_module, default:
|
501
|
+
class_name_attribute :image_attachment_module, default: Spree::RailsCompatibility.default_image_attachment_module
|
501
502
|
|
502
503
|
# @!attribute [rw] allowed_image_mime_types
|
503
504
|
#
|
@@ -555,7 +556,7 @@ module Spree
|
|
555
556
|
# @!attribute [rw] taxon_attachment_module
|
556
557
|
# @return [Module] a module that can be included into Spree::Taxon to allow attachments
|
557
558
|
# Enumerable of taxons adhering to the present_taxon_class interface
|
558
|
-
class_name_attribute :taxon_attachment_module, default:
|
559
|
+
class_name_attribute :taxon_attachment_module, default: Spree::RailsCompatibility.default_taxon_attachment_module
|
559
560
|
|
560
561
|
# Configures the absolute path that contains the Solidus engine
|
561
562
|
# migrations. This will be checked at app boot to confirm that all Solidus
|
data/lib/spree/core/version.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'rails/gem_version'
|
4
|
+
|
3
5
|
module Spree
|
4
6
|
# Supported Rails versions compatibility
|
5
7
|
#
|
@@ -48,6 +50,28 @@ module Spree
|
|
48
50
|
end
|
49
51
|
end
|
50
52
|
|
53
|
+
# Set default image attachment adapter
|
54
|
+
#
|
55
|
+
# TODO: Remove when deprecating Rails 6.0
|
56
|
+
def self.default_image_attachment_module
|
57
|
+
if version_gte?("6.1")
|
58
|
+
"Spree::Image::ActiveStorageAttachment"
|
59
|
+
else
|
60
|
+
"Spree::Image::PaperclipAttachment"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Set default taxon attachment adapter
|
65
|
+
#
|
66
|
+
# TODO: Remove when deprecating Rails 6.0
|
67
|
+
def self.default_taxon_attachment_module
|
68
|
+
if version_gte?("6.1")
|
69
|
+
"Spree::Taxon::ActiveStorageAttachment"
|
70
|
+
else
|
71
|
+
"Spree::Taxon::PaperclipAttachment"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
51
75
|
# Set current host for ActiveStorage in a controller
|
52
76
|
#
|
53
77
|
# Changed from `#host` to including a module in Rails 6
|
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.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -714,6 +714,7 @@ files:
|
|
714
714
|
- app/views/spree/shared/_error_messages.html.erb
|
715
715
|
- app/views/spree/test_mailer/test_email.html.erb
|
716
716
|
- app/views/spree/test_mailer/test_email.text.erb
|
717
|
+
- config/i18n-tasks.yml
|
717
718
|
- config/initializers/assets.rb
|
718
719
|
- config/initializers/friendly_id.rb
|
719
720
|
- config/initializers/inflections.rb
|
@@ -1019,7 +1020,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1019
1020
|
- !ruby/object:Gem::Version
|
1020
1021
|
version: 1.8.23
|
1021
1022
|
requirements: []
|
1022
|
-
rubygems_version: 3.
|
1023
|
+
rubygems_version: 3.3.19
|
1023
1024
|
signing_key:
|
1024
1025
|
specification_version: 4
|
1025
1026
|
summary: Essential models, mailers, and classes for the Solidus e-commerce project.
|