spree_api 3.7.11 → 3.7.12

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spree_api might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96fc20e54aac0b2643858fef36f6d0922f95826c5457fb164f49fcb61343a7a1
4
- data.tar.gz: 9f2a7b0f5eeefda89ecba23e00d0aed608b98b993c579db75c7440a301144865
3
+ metadata.gz: 78dc1dfa16b3c5b90ae516fb57c539bc2fbeae3cd0922dcfb16237f4dd02b72c
4
+ data.tar.gz: fa0b91ea7303db2a917ec7ad62a16b2c930a413b011faa142a7a8a0a6f978961
5
5
  SHA512:
6
- metadata.gz: 513ce938dfd546144e0bcdf774730bf7be5075a4818fdcea8b2ec75723af09963ca68f8ffc850ea79f76f283f10ff76a0aed486d40602709b03ce1d674c18613
7
- data.tar.gz: b62499c581685e13be2be4c782b958694924b31de9f06423dece56c43b22eec09fe2739c65cddd68d39273b9b9e12f83e1f61510ae25998901b6a0608638379e
6
+ metadata.gz: 491bad6dc20918b8bf7ad4be15a140e3fe7644f72940c7f9a813def5953b06b8c73da185f86b06d007491bcbc53a7c75493c4f5db272c44e166f90f815df9f50
7
+ data.tar.gz: 376bf9f91f0e116bf3a642fb65f961d9c80ad32fe9e9decaf028270a81bc40bc8a62e2bb12fe5d233962a055d4d3d3ed630bccf44cc5b27bca2e6f6ba44109f1
@@ -13,6 +13,25 @@ module Spree
13
13
 
14
14
  private
15
15
 
16
+ def serialize_collection(collection)
17
+ collection_serializer.new(
18
+ collection,
19
+ collection_options(collection)
20
+ ).serializable_hash
21
+ end
22
+
23
+ def serialize_resource(resource)
24
+ resource_serializer.new(
25
+ resource,
26
+ include: resource_includes,
27
+ fields: sparse_fields
28
+ ).serializable_hash
29
+ end
30
+
31
+ def paginated_collection
32
+ collection_paginator.new(sorted_collection, params).call
33
+ end
34
+
16
35
  def collection_paginator
17
36
  Spree::Api::Dependencies.storefront_collection_paginator.constantize
18
37
  end
@@ -40,14 +40,6 @@ module Spree
40
40
  ).serializable_hash
41
41
  end
42
42
 
43
- def serialize_resource(resource)
44
- resource_serializer.new(
45
- resource,
46
- include: resource_includes,
47
- fields: sparse_fields
48
- ).serializable_hash
49
- end
50
-
51
43
  def scope
52
44
  spree_current_user.credit_cards.accessible_by(current_ability, :read)
53
45
  end
@@ -19,10 +19,6 @@ module Spree
19
19
 
20
20
  private
21
21
 
22
- def paginated_collection
23
- collection_paginator.new(sorted_collection, params).call
24
- end
25
-
26
22
  def sorted_collection
27
23
  collection_sorter.new(collection, params).call
28
24
  end
@@ -38,21 +34,6 @@ module Spree
38
34
  resource
39
35
  end
40
36
 
41
- def serialize_collection(collection)
42
- collection_serializer.new(
43
- collection,
44
- collection_options(collection)
45
- ).serializable_hash
46
- end
47
-
48
- def serialize_resource(resource)
49
- resource_serializer.new(
50
- resource,
51
- include: resource_includes,
52
- sparse_fields: sparse_fields
53
- ).serializable_hash
54
- end
55
-
56
37
  def collection_serializer
57
38
  Spree::Api::Dependencies.storefront_cart_serializer.constantize
58
39
  end
@@ -76,15 +57,6 @@ module Spree
76
57
  def collection_paginator
77
58
  Spree::Api::Dependencies.storefront_collection_paginator.constantize
78
59
  end
79
-
80
- def collection_options(collection)
81
- {
82
- links: collection_links(collection),
83
- meta: collection_meta(collection),
84
- include: resource_includes,
85
- sparse_fields: sparse_fields
86
- }
87
- end
88
60
  end
89
61
  end
90
62
  end
@@ -15,14 +15,6 @@ module Spree
15
15
  spree_current_user
16
16
  end
17
17
 
18
- def serialize_resource(resource)
19
- resource_serializer.new(
20
- resource,
21
- include: resource_includes,
22
- fields: sparse_fields
23
- ).serializable_hash
24
- end
25
-
26
18
  def resource_serializer
27
19
  Spree::Api::Dependencies.storefront_user_serializer.constantize
28
20
  end
@@ -20,14 +20,6 @@ module Spree
20
20
  resource
21
21
  end
22
22
 
23
- def serialize_resource(resource)
24
- resource_serializer.new(
25
- resource,
26
- include: resource_includes,
27
- sparse_fields: sparse_fields
28
- ).serializable_hash
29
- end
30
-
31
23
  def resource_finder
32
24
  Spree::Api::Dependencies.storefront_completed_order_finder.constantize
33
25
  end
@@ -15,25 +15,6 @@ module Spree
15
15
 
16
16
  private
17
17
 
18
- def serialize_collection(collection)
19
- collection_serializer.new(
20
- collection,
21
- collection_options(collection)
22
- ).serializable_hash
23
- end
24
-
25
- def serialize_resource(resource)
26
- resource_serializer.new(
27
- resource,
28
- include: resource_includes,
29
- fields: sparse_fields
30
- ).serializable_hash
31
- end
32
-
33
- def paginated_collection
34
- collection_paginator.new(sorted_collection, params).call
35
- end
36
-
37
18
  def sorted_collection
38
19
  collection_sorter.new(collection, params, current_currency).call
39
20
  end
@@ -62,15 +43,6 @@ module Spree
62
43
  Spree::Api::Dependencies.storefront_product_serializer.constantize
63
44
  end
64
45
 
65
- def collection_options(collection)
66
- {
67
- links: collection_links(collection),
68
- meta: collection_meta(collection),
69
- include: resource_includes,
70
- fields: sparse_fields
71
- }
72
- end
73
-
74
46
  def scope
75
47
  Spree::Product.accessible_by(current_ability, :read).includes(scope_includes)
76
48
  end
@@ -15,21 +15,6 @@ module Spree
15
15
 
16
16
  private
17
17
 
18
- def serialize_collection(collection)
19
- collection_serializer.new(
20
- collection,
21
- collection_options(collection)
22
- ).serializable_hash
23
- end
24
-
25
- def serialize_resource(resource)
26
- resource_serializer.new(
27
- resource,
28
- include: resource_includes,
29
- fields: sparse_fields
30
- ).serializable_hash
31
- end
32
-
33
18
  def collection_serializer
34
19
  Spree::Api::Dependencies.storefront_taxon_serializer.constantize
35
20
  end
@@ -42,15 +27,6 @@ module Spree
42
27
  Spree::Api::Dependencies.storefront_taxon_finder.constantize
43
28
  end
44
29
 
45
- def collection_options(collection)
46
- {
47
- links: collection_links(collection),
48
- meta: collection_meta(collection),
49
- include: resource_includes,
50
- fields: sparse_fields
51
- }
52
- end
53
-
54
30
  def paginated_collection
55
31
  collection_paginator.new(collection, params).call
56
32
  end
@@ -31,6 +31,15 @@ module Spree
31
31
  def pagination_url(page)
32
32
  url_for(collection_permitted_params.merge(page: page))
33
33
  end
34
+
35
+ def collection_options(collection)
36
+ {
37
+ links: collection_links(collection),
38
+ meta: collection_meta(collection),
39
+ include: resource_includes,
40
+ fields: sparse_fields
41
+ }
42
+ end
34
43
  end
35
44
  end
36
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.11
4
+ version: 3.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Bigg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-15 00:00:00.000000000 Z
11
+ date: 2020-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsonapi-rspec
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.7.11
33
+ version: 3.7.12
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.7.11
40
+ version: 3.7.12
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rabl
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -329,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  - !ruby/object:Gem::Version
330
330
  version: '0'
331
331
  requirements: []
332
- rubygems_version: 3.1.4
332
+ rubygems_version: 3.1.2
333
333
  signing_key:
334
334
  specification_version: 4
335
335
  summary: Spree's API