solidus_core 3.2.0 → 3.2.1

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: 885f6226175c0938deb833bd6f0654e62093c00321ef995d65b35e1a9cf3c900
4
- data.tar.gz: 3fd4df6e93392f0788b289f6e88bfd0edbb56b065a69097e480ee63a3568fd63
3
+ metadata.gz: 042052d428d45b820e494786dd25b4854e6d3c2f38e5ee080806174e0c677098
4
+ data.tar.gz: a2a869fec21b3aec695772aac0ffa71db9297c804d335fa0a19837f8b3551846
5
5
  SHA512:
6
- metadata.gz: 1c72990d1160aeaf6817c304fa01a5d77737deee3fc775fbd15bdd85b8dbe9c5456ee9568bbbf1bea00bc4cf43b5b311473f678fefcdca3c84ae3d788a70d05e
7
- data.tar.gz: 0052f5fcde83289daf4ea3a0efe90045963073b2c5ca19fc2fcd3afa824806ac69b0d13bef6d95b8205a009d368d304f68be4f76234aaf7f3aaeb7dcf04e6456
6
+ metadata.gz: 460488089ef09d746e12fbc3d6ce3497bd17fb949a60a1a6aeed35b1714c5702922876bb28a2c81729d9d937eeacde1469262bf8e94013850335730134146e3f
7
+ data.tar.gz: 72fb6ebd3ff554117b0e1375ad8933834c02e709a48b87751ec83660043a77b34b4369b4c80067e50bfa1572dc1c2bae3ee14e9d31ab35a399dcb17674a2592c
@@ -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: 'Spree::Image::ActiveStorageAttachment'
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: 'Spree::Taxon::ActiveStorageAttachment'
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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "3.2.0"
4
+ VERSION = "3.2.1"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
@@ -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.0
4
+ version: 3.2.1
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-08-18 00:00:00.000000000 Z
11
+ date: 2022-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -1020,7 +1020,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1020
1020
  - !ruby/object:Gem::Version
1021
1021
  version: 1.8.23
1022
1022
  requirements: []
1023
- rubygems_version: 3.1.2
1023
+ rubygems_version: 3.3.19
1024
1024
  signing_key:
1025
1025
  specification_version: 4
1026
1026
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.