solidus_backend 3.4.6 → 4.0.0

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: c0c5de23272ca9f19ce24fe9b098adf54571d8fedc674bc07b04ab6e26279cbb
4
- data.tar.gz: b11dc6f5a3ea33da9757df9eaec8038fb12fc1c55bdf40ecc83d1cbcac0b8e6f
3
+ metadata.gz: 2202f63de288c8136a2ab58c767ece0c0ea53b75c8a5c28471bb8d438feb1f01
4
+ data.tar.gz: 3b656bcb71b1f02cf8427930cca7b29581965ddeb730b6f2e2005e8e8a6d3e0a
5
5
  SHA512:
6
- metadata.gz: 4db05f08ab435d66783aa658183116408a46e587b90cc8d94c303b07ec84f633fe75e9d53c514d08f9a30494523f0e0bf2a0ae16e960e5d1ef8bdf1c9901aa53
7
- data.tar.gz: b0262243e7b5d2bb26c0d325a72fb9a54c8468c3ec568d5d1df6cfb3f11be422bd51a6b75d74b2ad914515fe863214ccff6472d7facf335369b52f31cda2fbee
6
+ metadata.gz: 3c98a8dc12d30a38582517aa506c6af966ca08861e8d14b6ee885bd99c4f7431830fb63b9a207774daa78f62af4fce81c63bd830bd7381372f37882c35223d06
7
+ data.tar.gz: fcbf9ce1234507ea551ac98fb0fe0eac2a70fbc4cfd1113aeea42b658fd92d92fb359a6c78e8fd8bca09a3e287b37127839cb9634a2240bb97cb05c6bc16c13e
data/Rakefile CHANGED
@@ -4,7 +4,6 @@ require 'rubygems'
4
4
  require 'rake'
5
5
  require 'rake/testtask'
6
6
  require 'rspec/core/rake_task'
7
- require 'bundler/gem_tasks'
8
7
 
9
8
  require 'solidus_backend'
10
9
  require 'spree/testing_support/dummy_app/rake_tasks'
@@ -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.6
4
+ version: 4.0.0
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-11-02 00:00:00.000000000 Z
11
+ date: 2023-05-08 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.6
19
+ version: 4.0.0
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.6
26
+ version: 4.0.0
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.6
33
+ version: 4.0.0
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.6
40
+ version: 4.0.0
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.17
915
- signing_key:
914
+ rubygems_version: 3.4.9
915
+ signing_key:
916
916
  specification_version: 4
917
917
  summary: Admin interface for the Solidus e-commerce framework.
918
918
  test_files: []