solidus_core 2.11.12 → 2.11.15

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: a34b58af2575a9f4916aa79bdb8b968887685a642e1087c417ed186475762142
4
- data.tar.gz: 774a645e0ab71b87649d6f9d2b30366a2dd6e308a7ac41dbfa7d144ad392dffa
3
+ metadata.gz: 170be97648ddea982ac1e60483efd0c1c9f335e435e5f800b68610bf23588bf1
4
+ data.tar.gz: 43b3b39eba6eea77b196bb386d35f21cc6ab0fb4168a46a0ee0a440f9ba3f2ae
5
5
  SHA512:
6
- metadata.gz: ffadd725195f8e3909d8c8f67adf4fe8e7176c5af9e436160028be10a4bb06b1871178d7ec88540320811093ee924fde68e0e13c3fdb1c5ee59124a66e792f44
7
- data.tar.gz: f2a49eaa1d162dfd28500b6ea14e7e37a622ba471f9bec40d51b0a4f20b8c4291b662e0632471d9ef8fa11520644cfab142d93032888e8aae68889ff1e2d1673
6
+ metadata.gz: 4a873724850ac63a210c93304bbe5f974a85299720677cdec7c67b841728728a42d376adce4685c53b0cfcbdf46c03b27c4e282ef9a626c7e3072e519adc1ec5
7
+ data.tar.gz: 657463dd2bff50cca895615e6e26660e9f3b36e4a79e6305b211364ea35aa9352eb0f7eeba798c6b339304c062c92965bcffea644b9faf9ef5e49901223d45ac
@@ -84,6 +84,7 @@ module Spree
84
84
  # @return [Hash] hash of attributes contributing to value equality with optional merge
85
85
  def self.value_attributes(base_attributes, merge_attributes = {})
86
86
  base = base_attributes.stringify_keys.merge(merge_attributes.stringify_keys)
87
+ base.delete("name") unless Spree::Config.use_combined_first_and_last_name_in_address
87
88
 
88
89
  name_from_attributes = Spree::Address::Name.from_attributes(base)
89
90
  if base['firstname'].presence || base['first_name'].presence
@@ -49,6 +49,7 @@ module Spree
49
49
 
50
50
  has_many :variants,
51
51
  -> { where(is_master: false).order(:position) },
52
+ inverse_of: :product,
52
53
  class_name: 'Spree::Variant'
53
54
 
54
55
  has_many :variants_including_master,
@@ -5,12 +5,12 @@ class Spree::PromotionCode < Spree::Base
5
5
  belongs_to :promotion_code_batch, class_name: "Spree::PromotionCodeBatch", optional: true
6
6
  has_many :adjustments
7
7
 
8
+ before_validation :normalize_code
9
+
8
10
  validates :value, presence: true, uniqueness: { allow_blank: true, case_sensitive: true }
9
11
  validates :promotion, presence: true
10
12
  validate :promotion_not_apply_automatically, on: :create
11
13
 
12
- before_save :normalize_code
13
-
14
14
  self.whitelisted_ransackable_attributes = ['value']
15
15
 
16
16
  # Whether the promotion code has exceeded its usage restrictions
@@ -12,7 +12,7 @@ module Spree
12
12
  # end
13
13
  #
14
14
  class EmailValidator < ActiveModel::EachValidator
15
- EMAIL_REGEXP = /\A([^@\.]|[^@\.]([^@\s]*)[^@\.])@([^@\s]+\.)+[^@\s]+\z/
15
+ EMAIL_REGEXP = URI::MailTo::EMAIL_REGEXP
16
16
 
17
17
  def validate_each(record, attribute, value)
18
18
  unless EMAIL_REGEXP.match? value
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spree
4
- VERSION = "2.11.12"
4
+ VERSION = "2.11.15"
5
5
 
6
6
  def self.solidus_version
7
7
  VERSION
@@ -5,7 +5,7 @@ module Spree
5
5
  module BlacklistUrls
6
6
  def setup_url_blacklist(browser)
7
7
  if browser.respond_to?(:url_blacklist)
8
- browser.url_blacklist = ['http://fonts.googleapis.com']
8
+ browser.url_blacklist = ['https://fonts.googleapis.com']
9
9
  end
10
10
  end
11
11
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :solidus do
4
+ desc 'Prints orders with invalid email (after fix for GHSA-qxmr-qxh6-2cc9)'
5
+ task check_orders_with_invalid_email: :environment do
6
+ matches = Spree::Order.find_each.reduce([]) do |matches, order|
7
+ order.email.nil? || Spree::EmailValidator::EMAIL_REGEXP.match?(order.email) ? matches : matches + [order]
8
+ end
9
+ if matches.any?
10
+ puts 'Email / ID / Number'
11
+ puts(matches.map do |order|
12
+ "#{order.email} / #{order.id} / #{order.number}"
13
+ end.join("\n"))
14
+ else
15
+ puts 'NO MATCHES'
16
+ end
17
+ end
18
+ end
data/solidus_core.gemspec CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  s.add_dependency 'kaminari-activerecord', '~> 1.1'
40
40
  s.add_dependency 'mini_magick', '~> 4.10'
41
41
  s.add_dependency 'monetize', '~> 1.8'
42
- s.add_dependency 'paperclip', '>= 4.2'
42
+ s.add_dependency 'kt-paperclip', '>= 4.4.0'
43
43
  s.add_dependency 'paranoia', '~> 2.4'
44
44
  s.add_dependency 'ransack', '~> 2.0'
45
45
  s.add_dependency 'state_machines-activerecord', '~> 0.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: 2.11.12
4
+ version: 2.11.15
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: 2021-11-17 00:00:00.000000000 Z
11
+ date: 2022-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -331,19 +331,19 @@ dependencies:
331
331
  - !ruby/object:Gem::Version
332
332
  version: '1.8'
333
333
  - !ruby/object:Gem::Dependency
334
- name: paperclip
334
+ name: kt-paperclip
335
335
  requirement: !ruby/object:Gem::Requirement
336
336
  requirements:
337
337
  - - ">="
338
338
  - !ruby/object:Gem::Version
339
- version: '4.2'
339
+ version: 4.4.0
340
340
  type: :runtime
341
341
  prerelease: false
342
342
  version_requirements: !ruby/object:Gem::Requirement
343
343
  requirements:
344
344
  - - ">="
345
345
  - !ruby/object:Gem::Version
346
- version: '4.2'
346
+ version: 4.4.0
347
347
  - !ruby/object:Gem::Dependency
348
348
  name: paranoia
349
349
  requirement: !ruby/object:Gem::Requirement
@@ -942,6 +942,7 @@ files:
942
942
  - lib/tasks/migrations/migrate_user_addresses.rake
943
943
  - lib/tasks/migrations/rename_gateways.rake
944
944
  - lib/tasks/order_capturing.rake
945
+ - lib/tasks/solidus/check_orders_with_invalid_email.rake
945
946
  - lib/tasks/upgrade.rake
946
947
  - solidus_core.gemspec
947
948
  - vendor/assets/javascripts/jquery.payment.js
@@ -985,8 +986,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
985
986
  - !ruby/object:Gem::Version
986
987
  version: 1.8.23
987
988
  requirements: []
988
- rubygems_version: 3.1.2
989
- signing_key:
989
+ rubygems_version: 3.0.3
990
+ signing_key:
990
991
  specification_version: 4
991
992
  summary: Essential models, mailers, and classes for the Solidus e-commerce project.
992
993
  test_files: []