solidus_backend 3.4.2 → 4.0.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: 17837f45af5eca410007017b8197f53b25748fdf9dfdd4d09235745e1c92e930
4
- data.tar.gz: 28a418a03810e78c9e25e50b053c5027efbfce4eaaf7ad0586d7973dde7f40ff
3
+ metadata.gz: 61dda9dcfdb524b8845d70ac171f6e93a627312e75cfe0d9419086e7341a4f42
4
+ data.tar.gz: fc050671e822baa25c6a99538bd9b3144779664c16e91f2ac74a6f02f29f1eda
5
5
  SHA512:
6
- metadata.gz: 8a8eca9b9fe217589fd3bc4177575614a76a91cee1f5b5e53658f8b4a352f23e6443fc2afedaa012834bd07c8074fd65fdb8067c7d1f83c400c2b14647abee72
7
- data.tar.gz: a40d957176333f436255b20890274044d927b66da86c2e81ca513abb69f0ff6204d896b132be072c827b8cea38f92d993b6c6351fe415d90c6c1af3aa3f3069f
6
+ metadata.gz: 591fe52b3000187dc0c3f9e9cc76ce0cf946c5b9f361dc1bdfb06594362287cdec29c5b04b22b25f6c4fa2d5897307901e5b5eacfb2c62018ea307199411e904
7
+ data.tar.gz: 1c47ec65f6ce9fea90f29bf6bec266b4c8094d00dfe353a1acd4661d352ea8f47c0a0e4c53989a0fe052f8687949a27384820cf59a3d650687c284d5d018710f
@@ -17,27 +17,8 @@
17
17
  * you need to ensure that the attributes are allowed to be Ransacked.
18
18
  */
19
19
  $.fn.variantAutocomplete = function(options) {
20
- function extraParameters(term) {
21
- if (typeof(options) === 'object') {
22
- if (typeof(options['searchParameters']) === 'function') {
23
- return options['searchParameters'](term)
24
- } else {
25
- console.warn(
26
- "Solidus deprecation: Passing an object of parameters to variantAutocomplete is deprecated. Instead, on the options object, please declare `searchParameters` as a function returning the parameters.\n\n",
27
- "Deprecated usage:\n",
28
- "$('#id').variantAutocomplete({\n",
29
- " suppliable_only: true\n",
30
- "})",
31
- "\n\nNew usage:\n",
32
- "$('#id').variantAutocomplete({\n",
33
- " searchParameters: function (_selectSearchTerm) { return { suppliable_only: true } }\n",
34
- "})"
35
- )
36
- }
37
- }
38
-
39
- return {}
40
- }
20
+ // Default options
21
+ options = options || {}
41
22
 
42
23
  this.select2({
43
24
  placeholder: Spree.translations.variant_placeholder,
@@ -58,14 +39,15 @@
58
39
  }
59
40
  },
60
41
  data: function(term, page) {
61
- var searchData = {
42
+ const extraParameters = options["searchParameters"] ? options["searchParameters"](term) : {}
43
+
44
+ return {
62
45
  variant_search_term: term,
63
46
  token: Spree.api_key,
64
- page: page
65
- };
66
- return _.extend(searchData, extraParameters(term));
47
+ page: page,
48
+ ...extraParameters,
49
+ }
67
50
  },
68
-
69
51
  results: function(data, page) {
70
52
  window.variants = data["variants"];
71
53
  return {
@@ -18,11 +18,6 @@
18
18
  }
19
19
  }
20
20
 
21
- #promotion-policy-select {
22
- overflow: auto;
23
- margin-bottom: 1.5rem;
24
- }
25
-
26
21
  .promotion-block {
27
22
  padding: 0 1.25rem 0.5rem;
28
23
  background-color: lighten($color-border, 5);
@@ -22,13 +22,6 @@ module Spree
22
22
  safe_join(links, " ".html_safe)
23
23
  end
24
24
 
25
- # @deprecated use `Spree::LineItem#display_amount` instead
26
- def line_item_shipment_price(line_item, quantity)
27
- Spree::Money.new(line_item.price * quantity, { currency: line_item.currency })
28
- end
29
- deprecate deprecator: Spree::Deprecation,
30
- line_item_shipment_price: "use Spree::LineItem#display_amount instead"
31
-
32
25
  # Addresss Verification System response code
33
26
  #
34
27
  # @see https://en.wikipedia.org/wiki/Address_verification_service
@@ -18,16 +18,6 @@
18
18
 
19
19
  <%= form_for @promotion, url: object_url, method: :put do |f| %>
20
20
  <fieldset class="no-border-top">
21
- <% if Spree::Config.allow_promotions_any_match_policy %>
22
- <div id="promotion-policy-select" class="align-center row">
23
- <% Spree::Promotion::MATCH_POLICIES.each do |policy| %>
24
- <div class="col-6">
25
- <label><%= f.radio_button :match_policy, policy %> <%= t "spree.promotion_form.match_policies.#{policy}" %></label>
26
- </div>
27
- <% end %>
28
- </div>
29
- <% end %>
30
-
31
21
  <div id="rules" class="filter_list">
32
22
  <% if @promotion.rules.any? %>
33
23
  <div class="col-12">
@@ -98,10 +98,10 @@
98
98
  <%= promotion.usage_count %>
99
99
  </td>
100
100
  <td>
101
- <%= Spree::RailsCompatibility.to_fs(promotion.starts_at, :long) if promotion.starts_at %>
101
+ <%= promotion.starts_at.to_fs(:long) if promotion.starts_at %>
102
102
  </td>
103
103
  <td>
104
- <%= Spree::RailsCompatibility.to_fs(promotion.expires_at, :long) if promotion.expires_at %>
104
+ <%= promotion.expires_at.to_fs(:long) if promotion.expires_at %>
105
105
  </td>
106
106
  <td class="actions">
107
107
  <% if can?(:edit, promotion) %>
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  f.match(%r{^(spec|script)/})
21
21
  end
22
22
 
23
- s.required_ruby_version = '>= 2.7.0'
23
+ s.required_ruby_version = '>= 3.0.0'
24
24
  s.required_rubygems_version = '>= 1.8.23'
25
25
 
26
26
  s.add_dependency 'solidus_api', s.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.2
4
+ version: 4.0.1
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-05-04 00:00:00.000000000 Z
11
+ date: 2023-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.2
19
+ version: 4.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.4.2
26
+ version: 4.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: solidus_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.4.2
33
+ version: 4.0.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.4.2
40
+ version: 4.0.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: font-awesome-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -896,7 +896,7 @@ licenses:
896
896
  - BSD-3-Clause
897
897
  metadata:
898
898
  rubygems_mfa_required: 'true'
899
- post_install_message:
899
+ post_install_message:
900
900
  rdoc_options: []
901
901
  require_paths:
902
902
  - lib
@@ -904,15 +904,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
904
904
  requirements:
905
905
  - - ">="
906
906
  - !ruby/object:Gem::Version
907
- version: 2.7.0
907
+ version: 3.0.0
908
908
  required_rubygems_version: !ruby/object:Gem::Requirement
909
909
  requirements:
910
910
  - - ">="
911
911
  - !ruby/object:Gem::Version
912
912
  version: 1.8.23
913
913
  requirements: []
914
- rubygems_version: 3.4.9
915
- signing_key:
914
+ rubygems_version: 3.3.7
915
+ signing_key:
916
916
  specification_version: 4
917
917
  summary: Admin interface for the Solidus e-commerce framework.
918
918
  test_files: []