spree_api 4.0.2 → 4.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/spree/api/v2/base_controller.rb +11 -1
- data/app/controllers/spree/api/v2/storefront/account/addresses_controller.rb +77 -0
- data/app/controllers/spree/api/v2/storefront/account/orders_controller.rb +2 -2
- data/app/controllers/spree/api/v2/storefront/checkout_controller.rb +6 -3
- data/app/controllers/spree/api/v2/storefront/order_status_controller.rb +6 -0
- data/app/controllers/spree/api/v2/storefront/stores_controller.rb +27 -0
- data/app/models/spree/api_dependencies.rb +11 -1
- data/app/serializers/spree/v2/storefront/cart_serializer.rb +9 -5
- data/app/serializers/spree/v2/storefront/line_item_serializer.rb +2 -1
- data/app/serializers/spree/v2/storefront/payment_serializer.rb +1 -1
- data/app/serializers/spree/v2/storefront/shipment_serializer.rb +3 -1
- data/app/serializers/spree/v2/storefront/stock_location_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/store_credit_category_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/store_credit_serializer.rb +1 -1
- data/app/serializers/spree/v2/storefront/store_serializer.rb +13 -0
- data/app/serializers/spree/v2/storefront/taxon_serializer.rb +1 -1
- data/config/routes.rb +3 -1
- data/docs/v2/storefront/index.yaml +28 -0
- data/lib/spree/api/testing_support/v2/base.rb +1 -1
- data/lib/spree/api/testing_support/v2/current_order.rb +6 -0
- data/spree_api.gemspec +10 -3
- metadata +18 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f21f980bf369f842af1f92aa2234dd50a2cb0a771db1006a1b04e2ee477dc543
|
4
|
+
data.tar.gz: 7862b9db952f6e4c5f50076d03ea2baf9d093af4d796a431ad144b801915324a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c8e55ea83744e23cb10361d459f4e0319be8795a238592122138d1bc5e01d2b75a427fb1371cb77077525453852fba12c67f393da31d79c093d3e4f771f4b2f
|
7
|
+
data.tar.gz: a7036f87c3cb6cf2553a1c5ad49f5f3d53c48a2e7e967ef03f88ed9fc5df3f78776a13625e64578ac3551c09a9ceafb68ac48d2cdd73d2bf5047591bc05df72e
|
@@ -6,6 +6,7 @@ module Spree
|
|
6
6
|
include Spree::Core::ControllerHelpers::StrongParameters
|
7
7
|
rescue_from ActiveRecord::RecordNotFound, with: :record_not_found
|
8
8
|
rescue_from CanCan::AccessDenied, with: :access_denied
|
9
|
+
rescue_from Spree::Core::GatewayError, with: :gateway_error
|
9
10
|
|
10
11
|
def content_type
|
11
12
|
Spree::Api::Config[:api_v2_content_type]
|
@@ -55,7 +56,12 @@ module Spree
|
|
55
56
|
end
|
56
57
|
|
57
58
|
def spree_current_user
|
58
|
-
|
59
|
+
return nil unless doorkeeper_token
|
60
|
+
return @spree_current_user if @spree_current_user
|
61
|
+
|
62
|
+
doorkeeper_authorize!
|
63
|
+
|
64
|
+
@spree_current_user ||= Spree.user_class.find_by(id: doorkeeper_token.resource_owner_id)
|
59
65
|
end
|
60
66
|
|
61
67
|
def spree_authorize!(action, subject, *args)
|
@@ -115,6 +121,10 @@ module Spree
|
|
115
121
|
def access_denied(exception)
|
116
122
|
render_error_payload(exception.message, 403)
|
117
123
|
end
|
124
|
+
|
125
|
+
def gateway_error(exception)
|
126
|
+
render_error_payload(exception.message)
|
127
|
+
end
|
118
128
|
end
|
119
129
|
end
|
120
130
|
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module V2
|
4
|
+
module Storefront
|
5
|
+
module Account
|
6
|
+
class AddressesController < ::Spree::Api::V2::BaseController
|
7
|
+
before_action :require_spree_current_user
|
8
|
+
|
9
|
+
def index
|
10
|
+
render_serialized_payload { serialize_collection(collection) }
|
11
|
+
end
|
12
|
+
|
13
|
+
def create
|
14
|
+
result = create_service.call(user: spree_current_user, address_params: address_params)
|
15
|
+
render_result(result)
|
16
|
+
end
|
17
|
+
|
18
|
+
def update
|
19
|
+
result = update_service.call(address: resource, address_params: address_params)
|
20
|
+
render_result(result)
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def collection
|
26
|
+
collection_finder.new(scope: scope, params: params).execute
|
27
|
+
end
|
28
|
+
|
29
|
+
def resource
|
30
|
+
@resource ||= scope.find(params[:id])
|
31
|
+
end
|
32
|
+
|
33
|
+
def scope
|
34
|
+
spree_current_user.addresses
|
35
|
+
end
|
36
|
+
|
37
|
+
def collection_finder
|
38
|
+
Spree::Api::Dependencies.storefront_address_finder.constantize
|
39
|
+
end
|
40
|
+
|
41
|
+
def collection_serializer
|
42
|
+
Spree::Api::Dependencies.storefront_address_serializer.constantize
|
43
|
+
end
|
44
|
+
|
45
|
+
def resource_serializer
|
46
|
+
Spree::Api::Dependencies.storefront_address_serializer.constantize
|
47
|
+
end
|
48
|
+
|
49
|
+
def serialize_collection(collection)
|
50
|
+
collection_serializer.new(collection).serializable_hash
|
51
|
+
end
|
52
|
+
|
53
|
+
def create_service
|
54
|
+
Spree::Api::Dependencies.storefront_account_create_address_service.constantize
|
55
|
+
end
|
56
|
+
|
57
|
+
def update_service
|
58
|
+
Spree::Api::Dependencies.storefront_account_update_address_service.constantize
|
59
|
+
end
|
60
|
+
|
61
|
+
def address_params
|
62
|
+
params.require(:address).permit(permitted_address_attributes)
|
63
|
+
end
|
64
|
+
|
65
|
+
def render_result(result)
|
66
|
+
if result.success?
|
67
|
+
render_serialized_payload { serialize_resource(result.value) }
|
68
|
+
else
|
69
|
+
render_error_payload(result.error)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -35,11 +35,11 @@ module Spree
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def collection_serializer
|
38
|
-
Spree::Api::Dependencies.
|
38
|
+
Spree::Api::Dependencies.storefront_order_serializer.constantize
|
39
39
|
end
|
40
40
|
|
41
41
|
def resource_serializer
|
42
|
-
Spree::Api::Dependencies.
|
42
|
+
Spree::Api::Dependencies.storefront_order_serializer.constantize
|
43
43
|
end
|
44
44
|
|
45
45
|
def collection_finder
|
@@ -65,7 +65,11 @@ module Spree
|
|
65
65
|
def shipping_rates
|
66
66
|
result = shipping_rates_service.call(order: spree_current_order)
|
67
67
|
|
68
|
-
|
68
|
+
if result.success?
|
69
|
+
render_serialized_payload { serialize_shipping_rates(result.value) }
|
70
|
+
else
|
71
|
+
render_error_payload(result.error)
|
72
|
+
end
|
69
73
|
end
|
70
74
|
|
71
75
|
def payment_methods
|
@@ -121,8 +125,7 @@ module Spree
|
|
121
125
|
def serialize_shipping_rates(shipments)
|
122
126
|
shipping_rates_serializer.new(
|
123
127
|
shipments,
|
124
|
-
include: [:shipping_rates]
|
125
|
-
params: { show_rates: true }
|
128
|
+
include: [:shipping_rates, :stock_location]
|
126
129
|
).serializable_hash
|
127
130
|
end
|
128
131
|
end
|
@@ -5,6 +5,8 @@ module Spree
|
|
5
5
|
class OrderStatusController < ::Spree::Api::V2::BaseController
|
6
6
|
include Spree::Api::V2::Storefront::OrderConcern
|
7
7
|
|
8
|
+
before_action :ensure_order_token
|
9
|
+
|
8
10
|
def show
|
9
11
|
render_serialized_payload { serialize_resource(resource) }
|
10
12
|
end
|
@@ -25,6 +27,10 @@ module Spree
|
|
25
27
|
def resource_serializer
|
26
28
|
Spree::Api::Dependencies.storefront_cart_serializer.constantize
|
27
29
|
end
|
30
|
+
|
31
|
+
def ensure_order_token
|
32
|
+
raise ActiveRecord::RecordNotFound unless order_token.present?
|
33
|
+
end
|
28
34
|
end
|
29
35
|
end
|
30
36
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module V2
|
4
|
+
module Storefront
|
5
|
+
class StoresController < ::Spree::Api::V2::BaseController
|
6
|
+
def show
|
7
|
+
render_serialized_payload { serialize_resource(resource) }
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def scope
|
13
|
+
Spree::Store
|
14
|
+
end
|
15
|
+
|
16
|
+
def resource
|
17
|
+
scope.find_by!(code: params[:code])
|
18
|
+
end
|
19
|
+
|
20
|
+
def resource_serializer
|
21
|
+
Spree::Api::Dependencies.storefront_store_serializer.constantize
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -13,7 +13,9 @@ module Spree
|
|
13
13
|
:storefront_country_serializer, :storefront_current_order_finder, :storefront_completed_order_finder, :storefront_order_sorter,
|
14
14
|
:storefront_collection_paginator, :storefront_user_serializer, :storefront_products_sorter, :storefront_products_finder,
|
15
15
|
:storefront_product_serializer, :storefront_taxon_serializer, :storefront_taxon_finder, :storefront_find_by_variant_finder,
|
16
|
-
:storefront_cart_update_service, :storefront_cart_estimate_shipping_rates_service, :storefront_estimated_shipment_serializer
|
16
|
+
:storefront_cart_update_service, :storefront_cart_estimate_shipping_rates_service, :storefront_estimated_shipment_serializer,
|
17
|
+
:storefront_store_serializer, :storefront_address_serializer, :storefront_order_serializer,
|
18
|
+
:storefront_account_create_address_service, :storefront_account_update_address_service, :storefront_address_finder
|
17
19
|
].freeze
|
18
20
|
|
19
21
|
attr_accessor *INJECTION_POINTS
|
@@ -48,7 +50,12 @@ module Spree
|
|
48
50
|
@storefront_checkout_remove_store_credit_service = Spree::Dependencies.checkout_remove_store_credit_service
|
49
51
|
@storefront_checkout_get_shipping_rates_service = Spree::Dependencies.checkout_get_shipping_rates_service
|
50
52
|
|
53
|
+
# account services
|
54
|
+
@storefront_account_create_address_service = Spree::Dependencies.account_create_address_service
|
55
|
+
@storefront_account_update_address_service = Spree::Dependencies.account_update_address_service
|
56
|
+
|
51
57
|
# serializers
|
58
|
+
@storefront_address_serializer = 'Spree::V2::Storefront::AddressSerializer'
|
52
59
|
@storefront_cart_serializer = 'Spree::V2::Storefront::CartSerializer'
|
53
60
|
@storefront_credit_card_serializer = 'Spree::V2::Storefront::CreditCardSerializer'
|
54
61
|
@storefront_country_serializer = 'Spree::V2::Storefront::CountrySerializer'
|
@@ -58,6 +65,8 @@ module Spree
|
|
58
65
|
@storefront_payment_method_serializer = 'Spree::V2::Storefront::PaymentMethodSerializer'
|
59
66
|
@storefront_product_serializer = 'Spree::V2::Storefront::ProductSerializer'
|
60
67
|
@storefront_estimated_shipment_serializer = 'Spree::V2::Storefront::EstimatedShippingRateSerializer'
|
68
|
+
@storefront_store_serializer = 'Spree::V2::Storefront::StoreSerializer'
|
69
|
+
@storefront_order_serializer = 'Spree::V2::Storefront::CartSerializer'
|
61
70
|
|
62
71
|
# sorters
|
63
72
|
@storefront_order_sorter = Spree::Dependencies.order_sorter
|
@@ -67,6 +76,7 @@ module Spree
|
|
67
76
|
@storefront_collection_paginator = Spree::Dependencies.collection_paginator
|
68
77
|
|
69
78
|
# finders
|
79
|
+
@storefront_address_finder = Spree::Dependencies.address_finder
|
70
80
|
@storefront_country_finder = Spree::Dependencies.country_finder
|
71
81
|
@storefront_current_order_finder = Spree::Dependencies.current_order_finder
|
72
82
|
@storefront_completed_order_finder = Spree::Dependencies.completed_order_finder
|
@@ -8,7 +8,9 @@ module Spree
|
|
8
8
|
:updated_at, :completed_at, :included_tax_total, :additional_tax_total, :display_additional_tax_total,
|
9
9
|
:display_included_tax_total, :tax_total, :currency, :state, :token, :email,
|
10
10
|
:display_item_total, :display_ship_total, :display_adjustment_total, :display_tax_total,
|
11
|
-
:promo_total, :display_promo_total, :item_count, :special_instructions, :display_total
|
11
|
+
:promo_total, :display_promo_total, :item_count, :special_instructions, :display_total,
|
12
|
+
:pre_tax_item_amount, :display_pre_tax_item_amount, :pre_tax_total, :display_pre_tax_total,
|
13
|
+
:shipment_state, :payment_state
|
12
14
|
|
13
15
|
has_many :line_items
|
14
16
|
has_many :variants
|
@@ -20,12 +22,14 @@ module Spree
|
|
20
22
|
|
21
23
|
belongs_to :user
|
22
24
|
belongs_to :billing_address,
|
23
|
-
|
24
|
-
|
25
|
+
id_method_name: :bill_address_id,
|
26
|
+
serializer: :address,
|
27
|
+
record_type: :address
|
25
28
|
|
26
29
|
belongs_to :shipping_address,
|
27
|
-
|
28
|
-
|
30
|
+
id_method_name: :ship_address_id,
|
31
|
+
serializer: :address,
|
32
|
+
record_type: :address
|
29
33
|
end
|
30
34
|
end
|
31
35
|
end
|
@@ -9,7 +9,8 @@ module Spree
|
|
9
9
|
:display_adjustment_total, :additional_tax_total,
|
10
10
|
:discounted_amount, :display_discounted_amount,
|
11
11
|
:display_additional_tax_total, :promo_total, :display_promo_total,
|
12
|
-
:included_tax_total, :display_included_tax_total
|
12
|
+
:included_tax_total, :display_included_tax_total,
|
13
|
+
:pre_tax_amount, :display_pre_tax_amount
|
13
14
|
|
14
15
|
belongs_to :variant
|
15
16
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Spree
|
2
|
+
module V2
|
3
|
+
module Storefront
|
4
|
+
class StoreSerializer < BaseSerializer
|
5
|
+
set_type :store
|
6
|
+
|
7
|
+
attributes :name, :url, :meta_description, :meta_keywords, :seo_title, :default_currency, :default, :supported_currencies, :facebook,
|
8
|
+
:twitter, :instagram, :default_locale, :customer_support_email, :default_country_id, :description,
|
9
|
+
:address, :contact_phone, :contact_email
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -4,7 +4,7 @@ module Spree
|
|
4
4
|
class TaxonSerializer < BaseSerializer
|
5
5
|
set_type :taxon
|
6
6
|
|
7
|
-
attributes :name, :pretty_name, :permalink, :seo_title, :meta_title, :meta_description,
|
7
|
+
attributes :name, :pretty_name, :permalink, :seo_title, :description, :meta_title, :meta_description,
|
8
8
|
:meta_keywords, :left, :right, :position, :depth, :updated_at
|
9
9
|
|
10
10
|
attribute :is_root, &:root?
|
data/config/routes.rb
CHANGED
@@ -152,6 +152,7 @@ Spree::Core::Engine.add_routes do
|
|
152
152
|
resource :account, controller: :account, only: %i[show]
|
153
153
|
|
154
154
|
namespace :account do
|
155
|
+
resources :addresses, controller: :addresses, only: %i[index create update]
|
155
156
|
resources :credit_cards, controller: :credit_cards, only: %i[index show]
|
156
157
|
resources :orders, controller: :orders, only: %i[index show]
|
157
158
|
end
|
@@ -160,7 +161,8 @@ Spree::Core::Engine.add_routes do
|
|
160
161
|
get '/countries/:iso', to: 'countries#show', as: :country
|
161
162
|
get '/order_status/:number', to: 'order_status#show', as: :order_status
|
162
163
|
resources :products, only: %i[index show]
|
163
|
-
resources :taxons, only: %i[index show]
|
164
|
+
resources :taxons, only: %i[index show], id: /.+/
|
165
|
+
get '/stores/:code', to: 'stores#show', as: :store
|
164
166
|
end
|
165
167
|
end
|
166
168
|
|
@@ -162,6 +162,8 @@ paths:
|
|
162
162
|
- $ref: '#/components/parameters/OrderParam'
|
163
163
|
- $ref: '#/components/parameters/CartIncludeParam'
|
164
164
|
- $ref: '#/components/parameters/SparseFieldsParam'
|
165
|
+
security:
|
166
|
+
- orderToken: []
|
165
167
|
'/cart':
|
166
168
|
post:
|
167
169
|
description: >-
|
@@ -1121,6 +1123,14 @@ components:
|
|
1121
1123
|
company:
|
1122
1124
|
type: string
|
1123
1125
|
example: 'Google Inc.'
|
1126
|
+
AddressList:
|
1127
|
+
required:
|
1128
|
+
- data
|
1129
|
+
properties:
|
1130
|
+
data:
|
1131
|
+
type: array
|
1132
|
+
items:
|
1133
|
+
$ref: '#/components/schemas/Address'
|
1124
1134
|
Cart:
|
1125
1135
|
required:
|
1126
1136
|
- data
|
@@ -1287,6 +1297,18 @@ components:
|
|
1287
1297
|
display_tax_total:
|
1288
1298
|
type: string
|
1289
1299
|
example: '$10.00'
|
1300
|
+
pre_tax_item_amount:
|
1301
|
+
type: string
|
1302
|
+
example: '17.00'
|
1303
|
+
display_pre_tax_item_amount:
|
1304
|
+
type: string
|
1305
|
+
example: '$17.00'
|
1306
|
+
pre_tax_total:
|
1307
|
+
type: string
|
1308
|
+
example: '20.00'
|
1309
|
+
display_pre_tax_total:
|
1310
|
+
type: string
|
1311
|
+
example: '$20.00'
|
1290
1312
|
item_count:
|
1291
1313
|
type: number
|
1292
1314
|
example: 2
|
@@ -1499,6 +1521,12 @@ components:
|
|
1499
1521
|
display_discounted_amount:
|
1500
1522
|
type: string
|
1501
1523
|
example: '$125.00'
|
1524
|
+
pre_tax_amount:
|
1525
|
+
type: string
|
1526
|
+
example: '125.0'
|
1527
|
+
display_pre_tax_amount:
|
1528
|
+
type: string
|
1529
|
+
example: '$125.00'
|
1502
1530
|
promo_total:
|
1503
1531
|
type: string
|
1504
1532
|
example: '-5.0'
|
@@ -4,7 +4,7 @@ shared_context 'API v2 tokens' do
|
|
4
4
|
let(:headers_order_token) { { 'X-Spree-Order-Token' => order.token } }
|
5
5
|
end
|
6
6
|
|
7
|
-
[200, 201, 400, 404, 403, 422].each do |status_code|
|
7
|
+
[200, 201, 400, 401, 404, 403, 422].each do |status_code|
|
8
8
|
shared_examples "returns #{status_code} HTTP status" do
|
9
9
|
it "returns #{status_code}" do
|
10
10
|
expect(response.status).to eq(status_code)
|
@@ -27,6 +27,8 @@ shared_examples 'returns valid cart JSON' do
|
|
27
27
|
expect(json_response['data']).to have_type('cart')
|
28
28
|
expect(json_response['data']).to have_attribute(:number).with_value(order.number)
|
29
29
|
expect(json_response['data']).to have_attribute(:state).with_value(order.state)
|
30
|
+
expect(json_response['data']).to have_attribute(:payment_state).with_value(order.payment_state)
|
31
|
+
expect(json_response['data']).to have_attribute(:shipment_state).with_value(order.shipment_state)
|
30
32
|
expect(json_response['data']).to have_attribute(:token).with_value(order.token)
|
31
33
|
expect(json_response['data']).to have_attribute(:total).with_value(order.total.to_s)
|
32
34
|
expect(json_response['data']).to have_attribute(:item_total).with_value(order.item_total.to_s)
|
@@ -48,6 +50,10 @@ shared_examples 'returns valid cart JSON' do
|
|
48
50
|
expect(json_response['data']).to have_attribute(:promo_total).with_value(order.promo_total.to_s)
|
49
51
|
expect(json_response['data']).to have_attribute(:display_promo_total).with_value(order.display_promo_total.to_s)
|
50
52
|
expect(json_response['data']).to have_attribute(:display_total).with_value(order.display_total.to_s)
|
53
|
+
expect(json_response['data']).to have_attribute(:pre_tax_item_amount).with_value(order.pre_tax_item_amount.to_s)
|
54
|
+
expect(json_response['data']).to have_attribute(:display_pre_tax_item_amount).with_value(order.display_pre_tax_item_amount.to_s)
|
55
|
+
expect(json_response['data']).to have_attribute(:pre_tax_total).with_value(order.pre_tax_total.to_s)
|
56
|
+
expect(json_response['data']).to have_attribute(:display_pre_tax_total).with_value(order.display_pre_tax_total.to_s)
|
51
57
|
expect(json_response['data']).to have_relationships(:user, :line_items, :variants, :billing_address, :shipping_address, :payments, :shipments, :promotions)
|
52
58
|
end
|
53
59
|
end
|
data/spree_api.gemspec
CHANGED
@@ -2,20 +2,27 @@
|
|
2
2
|
require_relative '../core/lib/spree/core/version.rb'
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
+
s.name = "spree_api"
|
6
|
+
s.version = Spree.version
|
5
7
|
s.authors = ["Ryan Bigg"]
|
6
8
|
s.email = ["ryan@spreecommerce.com"]
|
7
|
-
s.description = %q{Spree's API}
|
8
9
|
s.summary = %q{Spree's API}
|
10
|
+
s.description = %q{Spree's API}
|
9
11
|
s.homepage = 'http://spreecommerce.org'
|
10
12
|
s.license = 'BSD-3-Clause'
|
11
13
|
|
14
|
+
s.metadata = {
|
15
|
+
"bug_tracker_uri" => "https://github.com/spree/spree/issues",
|
16
|
+
"changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",
|
17
|
+
"documentation_uri" => "https://guides.spreecommerce.org/",
|
18
|
+
"source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
|
19
|
+
}
|
20
|
+
|
12
21
|
s.required_ruby_version = '>= 2.5.0'
|
13
22
|
|
14
23
|
s.files = `git ls-files`.split($\).reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
|
15
24
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
16
|
-
s.name = "spree_api"
|
17
25
|
s.require_paths = ["lib"]
|
18
|
-
s.version = Spree.version
|
19
26
|
|
20
27
|
s.add_development_dependency 'jsonapi-rspec'
|
21
28
|
|
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: 4.0.
|
4
|
+
version: 4.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-05 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: 4.0.
|
33
|
+
version: 4.0.7
|
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: 4.0.
|
40
|
+
version: 4.0.7
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rabl
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- app/controllers/spree/api/v1/variants_controller.rb
|
134
134
|
- app/controllers/spree/api/v1/zones_controller.rb
|
135
135
|
- app/controllers/spree/api/v2/base_controller.rb
|
136
|
+
- app/controllers/spree/api/v2/storefront/account/addresses_controller.rb
|
136
137
|
- app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb
|
137
138
|
- app/controllers/spree/api/v2/storefront/account/orders_controller.rb
|
138
139
|
- app/controllers/spree/api/v2/storefront/account_controller.rb
|
@@ -141,6 +142,7 @@ files:
|
|
141
142
|
- app/controllers/spree/api/v2/storefront/countries_controller.rb
|
142
143
|
- app/controllers/spree/api/v2/storefront/order_status_controller.rb
|
143
144
|
- app/controllers/spree/api/v2/storefront/products_controller.rb
|
145
|
+
- app/controllers/spree/api/v2/storefront/stores_controller.rb
|
144
146
|
- app/controllers/spree/api/v2/storefront/taxons_controller.rb
|
145
147
|
- app/helpers/spree/api/api_helpers.rb
|
146
148
|
- app/helpers/spree/api/v2/collection_options_helpers.rb
|
@@ -166,9 +168,12 @@ files:
|
|
166
168
|
- app/serializers/spree/v2/storefront/shipment_serializer.rb
|
167
169
|
- app/serializers/spree/v2/storefront/shipping_rate_serializer.rb
|
168
170
|
- app/serializers/spree/v2/storefront/state_serializer.rb
|
171
|
+
- app/serializers/spree/v2/storefront/stock_location_serializer.rb
|
172
|
+
- app/serializers/spree/v2/storefront/store_credit_category_serializer.rb
|
169
173
|
- app/serializers/spree/v2/storefront/store_credit_event_serializer.rb
|
170
174
|
- app/serializers/spree/v2/storefront/store_credit_serializer.rb
|
171
175
|
- app/serializers/spree/v2/storefront/store_credit_type_serializer.rb
|
176
|
+
- app/serializers/spree/v2/storefront/store_serializer.rb
|
172
177
|
- app/serializers/spree/v2/storefront/taxon_image_serializer.rb
|
173
178
|
- app/serializers/spree/v2/storefront/taxon_serializer.rb
|
174
179
|
- app/serializers/spree/v2/storefront/taxonomy_serializer.rb
|
@@ -300,8 +305,12 @@ files:
|
|
300
305
|
homepage: http://spreecommerce.org
|
301
306
|
licenses:
|
302
307
|
- BSD-3-Clause
|
303
|
-
metadata:
|
304
|
-
|
308
|
+
metadata:
|
309
|
+
bug_tracker_uri: https://github.com/spree/spree/issues
|
310
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.0.7
|
311
|
+
documentation_uri: https://guides.spreecommerce.org/
|
312
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.0.7
|
313
|
+
post_install_message:
|
305
314
|
rdoc_options: []
|
306
315
|
require_paths:
|
307
316
|
- lib
|
@@ -316,8 +325,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
316
325
|
- !ruby/object:Gem::Version
|
317
326
|
version: '0'
|
318
327
|
requirements: []
|
319
|
-
rubygems_version: 3.
|
320
|
-
signing_key:
|
328
|
+
rubygems_version: 3.2.3
|
329
|
+
signing_key:
|
321
330
|
specification_version: 4
|
322
331
|
summary: Spree's API
|
323
332
|
test_files: []
|