spree_core 4.2.3.1 → 4.2.4

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: c0c372dea2c75fd41b1007170fd71a99bec886b2ea9de47bf69c155d1f9e44e1
4
- data.tar.gz: fd41eb8af4537f2a3fa12c52005a4fd6f2d7854dd097e355d5a748a73f6f777a
3
+ metadata.gz: 73a956aa0f5f8359d02e3804606a880d73af297547ef3eca07066e7ee244a728
4
+ data.tar.gz: 55cb848ec873396022bcaa67b8d8f6281ce4dd2d48dd1692e59f72e012c0dd13
5
5
  SHA512:
6
- metadata.gz: 621917d1e07ccf5c72a0947efe43c96ab48aa3c4f9cb85e4c0e78d4d5427f81ff41284af6f2d738cfa4df5a563daf5b24ac1a70ec66756ea765b78bd8c66d6e0
7
- data.tar.gz: 148e557777a9f21d7bc7e366498fa7ecbea69b3aa0f6286d62c0e1ef389af98499a07910581b6dbe5ec89e37219e4651dc7f52109d0b54638666aa3b590509e3
6
+ metadata.gz: '0749dcc7a17168458bfa742d9f4df1ad99c2f642fd6a4654be232cc8b75c8f72f73286effb135909a17bbcc27d5bdf7932f75c073068eb1492d4159f23793a66'
7
+ data.tar.gz: 8ddae63ba67bf3c68492f80605646176bb82bdb2ca1d80ffa3139cafca4402d4156e9f14d15353bff0b7d7fa1f72cd340b4dbf826697ee0b995c64383bfcf5a2
@@ -32,9 +32,9 @@ Spree.localizedPathFor = function(path) {
32
32
  if (pathName.match(/api\/v/)) {
33
33
  params.set('locale', SPREE_LOCALE)
34
34
  } else {
35
- pathName = SPREE_LOCALE + '/' + path
35
+ pathName = (this.mountedAt()) + SPREE_LOCALE + '/' + path
36
36
  }
37
- return fullUrl.origin + (this.mountedAt()) + pathName + '?' + params.toString()
37
+ return fullUrl.origin + pathName + '?' + params.toString()
38
38
  }
39
39
  return Spree.pathFor(path)
40
40
  }
@@ -102,8 +102,9 @@ module Spree
102
102
  validates :meta_title
103
103
  end
104
104
  with_options presence: true do
105
- validates :name, :shipping_category
106
- validates :price, if: proc { Spree::Config[:require_master_price] }
105
+ validates :name
106
+ validates :shipping_category, if: :requires_shipping_category?
107
+ validates :price, if: :requires_price?
107
108
  end
108
109
 
109
110
  validates :slug, presence: true, uniqueness: { allow_blank: true, case_sensitive: false }
@@ -485,5 +486,13 @@ module Spree
485
486
  instance_variable_set(:"@#{v}", nil)
486
487
  end
487
488
  end
489
+
490
+ def requires_price?
491
+ Spree::Config[:require_master_price]
492
+ end
493
+
494
+ def requires_shipping_category?
495
+ true
496
+ end
488
497
  end
489
498
  end
@@ -1,5 +1,5 @@
1
1
  module Spree
2
- VERSION = '4.2.3.1'.freeze
2
+ VERSION = '4.2.4'.freeze
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.3.1
4
+ version: 4.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-05-05 00:00:00.000000000 Z
12
+ date: 2021-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemerchant
@@ -1175,9 +1175,9 @@ licenses:
1175
1175
  - BSD-3-Clause
1176
1176
  metadata:
1177
1177
  bug_tracker_uri: https://github.com/spree/spree/issues
1178
- changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.3.1
1178
+ changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.4
1179
1179
  documentation_uri: https://guides.spreecommerce.org/
1180
- source_code_uri: https://github.com/spree/spree/tree/v4.2.3.1
1180
+ source_code_uri: https://github.com/spree/spree/tree/v4.2.4
1181
1181
  post_install_message:
1182
1182
  rdoc_options: []
1183
1183
  require_paths: