spree_api 3.6.6 → 3.7.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/api/main.js +36 -0
- data/app/assets/javascripts/spree/api/storefront/cart.js +49 -0
- data/app/controllers/concerns/spree/api/v2/storefront/order_concern.rb +48 -0
- data/app/controllers/spree/api/errors_controller.rb +9 -0
- data/app/controllers/spree/api/v1/checkouts_controller.rb +12 -0
- data/app/controllers/spree/api/v1/customer_returns_controller.rb +1 -0
- data/app/controllers/spree/api/v1/line_items_controller.rb +11 -10
- data/app/controllers/spree/api/v1/orders_controller.rb +6 -6
- data/app/controllers/spree/api/v1/product_properties_controller.rb +1 -0
- data/app/controllers/spree/api/v1/products_controller.rb +6 -6
- data/app/controllers/spree/api/v1/promotions_controller.rb +1 -0
- data/app/controllers/spree/api/v1/reimbursements_controller.rb +1 -0
- data/app/controllers/spree/api/v1/shipments_controller.rb +12 -3
- data/app/controllers/spree/api/v1/variants_controller.rb +5 -3
- data/app/controllers/spree/api/v2/base_controller.rb +94 -0
- data/app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb +55 -0
- data/app/controllers/spree/api/v2/storefront/account_controller.rb +33 -0
- data/app/controllers/spree/api/v2/storefront/cart_controller.rb +124 -0
- data/app/controllers/spree/api/v2/storefront/checkout_controller.rb +108 -0
- data/app/controllers/spree/api/v2/storefront/countries_controller.rb +57 -0
- data/app/controllers/spree/api/v2/storefront/products_controller.rb +87 -0
- data/app/controllers/spree/api/v2/storefront/taxons_controller.rb +82 -0
- data/app/helpers/spree/api/api_helpers.rb +1 -1
- data/app/helpers/spree/api/v2/collection_options_helpers.rb +37 -0
- data/app/models/doorkeeper/access_grant_decorator.rb +3 -0
- data/app/models/doorkeeper/access_token_decorator.rb +3 -0
- data/app/models/doorkeeper/application_decorator.rb +3 -0
- data/app/serializers/spree/v2/storefront/account/credit_card_serializer.rb +16 -0
- data/app/serializers/spree/v2/storefront/account_serializer.rb +29 -0
- data/app/serializers/spree/v2/storefront/address_serializer.rb +14 -0
- data/app/serializers/spree/v2/storefront/base_serializer.rb +9 -0
- data/app/serializers/spree/v2/storefront/cart_serializer.rb +40 -0
- data/app/serializers/spree/v2/storefront/country_serializer.rb +18 -0
- data/app/serializers/spree/v2/storefront/image_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/line_item_serializer.rb +17 -0
- data/app/serializers/spree/v2/storefront/option_type_serializer.rb +13 -0
- data/app/serializers/spree/v2/storefront/option_value_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/payment_method_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/payment_serializer.rb +12 -0
- data/app/serializers/spree/v2/storefront/product_property_serializer.rb +14 -0
- data/app/serializers/spree/v2/storefront/product_serializer.rb +35 -0
- data/app/serializers/spree/v2/storefront/promotion_serializer.rb +12 -0
- data/app/serializers/spree/v2/storefront/shipment_serializer.rb +16 -0
- data/app/serializers/spree/v2/storefront/shipping_rate_serializer.rb +14 -0
- data/app/serializers/spree/v2/storefront/state_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/taxon_image_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/taxon_serializer.rb +28 -0
- data/app/serializers/spree/v2/storefront/taxonomy_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/user_serializer.rb +11 -0
- data/app/serializers/spree/v2/storefront/variant_serializer.rb +21 -0
- data/app/views/spree/api/v1/orders/order.v1.rabl +1 -1
- data/config/initializers/doorkeeper.rb +20 -0
- data/config/locales/en.yml +4 -0
- data/config/routes.rb +51 -3
- data/db/migrate/20180320110726_create_doorkeeper_tables.rb +69 -0
- data/docs/oauth/index.yml +77 -0
- data/docs/v2/storefront/index.yaml +2444 -0
- data/lib/spree/api/engine.rb +9 -2
- data/lib/spree_api.rb +2 -0
- data/spree_api.gemspec +5 -1
- metadata +92 -7
data/lib/spree/api/engine.rb
CHANGED
@@ -20,7 +20,7 @@ module Spree
|
|
20
20
|
initializer 'spree.api.versioncake' do |_app|
|
21
21
|
VersionCake.setup do |config|
|
22
22
|
config.resources do |r|
|
23
|
-
r.resource %r{.*}, [], [], [1]
|
23
|
+
r.resource %r{.*}, [], [], [1, 2]
|
24
24
|
end
|
25
25
|
|
26
26
|
config.missing_version = 1
|
@@ -28,6 +28,13 @@ module Spree
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
# sets the manifests / assets to be precompiled, even when initialize_on_precompile is false
|
32
|
+
initializer 'spree.assets.precompile', group: :all do |app|
|
33
|
+
app.config.assets.precompile += %w[
|
34
|
+
spree/api/all*
|
35
|
+
]
|
36
|
+
end
|
37
|
+
|
31
38
|
initializer 'spree.api.environment', before: :load_config_initializers do |_app|
|
32
39
|
Spree::Api::Config = Spree::ApiConfiguration.new
|
33
40
|
end
|
@@ -40,7 +47,7 @@ module Spree
|
|
40
47
|
config.to_prepare &method(:activate).to_proc
|
41
48
|
|
42
49
|
def self.root
|
43
|
-
@root ||= Pathname.new(File.expand_path('
|
50
|
+
@root ||= Pathname.new(File.expand_path('../../..', __dir__))
|
44
51
|
end
|
45
52
|
end
|
46
53
|
end
|
data/lib/spree_api.rb
CHANGED
data/spree_api.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.homepage = 'http://spreecommerce.org'
|
10
10
|
s.license = 'BSD-3-Clause'
|
11
11
|
|
12
|
-
s.required_ruby_version = '>= 2.
|
12
|
+
s.required_ruby_version = '>= 2.3.0'
|
13
13
|
|
14
14
|
s.files = `git ls-files`.split($\).reject { |f| f.match(/^spec/) && !f.match(/^spec\/fixtures/) }
|
15
15
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -17,7 +17,11 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
s.version = Spree.version
|
19
19
|
|
20
|
+
s.add_development_dependency 'jsonapi-rspec'
|
21
|
+
|
20
22
|
s.add_dependency 'spree_core', s.version
|
21
23
|
s.add_dependency 'rabl', '~> 0.13.1'
|
22
24
|
s.add_dependency 'versioncake', '~> 3.4.0'
|
25
|
+
s.add_dependency 'fast_jsonapi', '~> 1.5'
|
26
|
+
s.add_dependency 'doorkeeper', '~> 5.0'
|
23
27
|
end
|
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jsonapi-rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: spree_core
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - '='
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
33
|
+
version: 3.7.0.rc1
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - '='
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
40
|
+
version: 3.7.0.rc1
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rabl
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +66,34 @@ dependencies:
|
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: 3.4.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: fast_jsonapi
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.5'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.5'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: doorkeeper
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '5.0'
|
55
97
|
description: Spree's API
|
56
98
|
email:
|
57
99
|
- ryan@spreecommerce.com
|
@@ -63,7 +105,11 @@ files:
|
|
63
105
|
- Gemfile
|
64
106
|
- LICENSE
|
65
107
|
- Rakefile
|
108
|
+
- app/assets/javascripts/spree/api/main.js
|
109
|
+
- app/assets/javascripts/spree/api/storefront/cart.js
|
110
|
+
- app/controllers/concerns/spree/api/v2/storefront/order_concern.rb
|
66
111
|
- app/controllers/spree/api/base_controller.rb
|
112
|
+
- app/controllers/spree/api/errors_controller.rb
|
67
113
|
- app/controllers/spree/api/v1/addresses_controller.rb
|
68
114
|
- app/controllers/spree/api/v1/checkouts_controller.rb
|
69
115
|
- app/controllers/spree/api/v1/classifications_controller.rb
|
@@ -95,10 +141,45 @@ files:
|
|
95
141
|
- app/controllers/spree/api/v1/users_controller.rb
|
96
142
|
- app/controllers/spree/api/v1/variants_controller.rb
|
97
143
|
- app/controllers/spree/api/v1/zones_controller.rb
|
144
|
+
- app/controllers/spree/api/v2/base_controller.rb
|
145
|
+
- app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb
|
146
|
+
- app/controllers/spree/api/v2/storefront/account_controller.rb
|
147
|
+
- app/controllers/spree/api/v2/storefront/cart_controller.rb
|
148
|
+
- app/controllers/spree/api/v2/storefront/checkout_controller.rb
|
149
|
+
- app/controllers/spree/api/v2/storefront/countries_controller.rb
|
150
|
+
- app/controllers/spree/api/v2/storefront/products_controller.rb
|
151
|
+
- app/controllers/spree/api/v2/storefront/taxons_controller.rb
|
98
152
|
- app/helpers/spree/api/api_helpers.rb
|
153
|
+
- app/helpers/spree/api/v2/collection_options_helpers.rb
|
99
154
|
- app/models/concerns/spree/user_api_authentication.rb
|
100
155
|
- app/models/concerns/spree/user_api_methods.rb
|
156
|
+
- app/models/doorkeeper/access_grant_decorator.rb
|
157
|
+
- app/models/doorkeeper/access_token_decorator.rb
|
158
|
+
- app/models/doorkeeper/application_decorator.rb
|
101
159
|
- app/models/spree/api_configuration.rb
|
160
|
+
- app/serializers/spree/v2/storefront/account/credit_card_serializer.rb
|
161
|
+
- app/serializers/spree/v2/storefront/account_serializer.rb
|
162
|
+
- app/serializers/spree/v2/storefront/address_serializer.rb
|
163
|
+
- app/serializers/spree/v2/storefront/base_serializer.rb
|
164
|
+
- app/serializers/spree/v2/storefront/cart_serializer.rb
|
165
|
+
- app/serializers/spree/v2/storefront/country_serializer.rb
|
166
|
+
- app/serializers/spree/v2/storefront/image_serializer.rb
|
167
|
+
- app/serializers/spree/v2/storefront/line_item_serializer.rb
|
168
|
+
- app/serializers/spree/v2/storefront/option_type_serializer.rb
|
169
|
+
- app/serializers/spree/v2/storefront/option_value_serializer.rb
|
170
|
+
- app/serializers/spree/v2/storefront/payment_method_serializer.rb
|
171
|
+
- app/serializers/spree/v2/storefront/payment_serializer.rb
|
172
|
+
- app/serializers/spree/v2/storefront/product_property_serializer.rb
|
173
|
+
- app/serializers/spree/v2/storefront/product_serializer.rb
|
174
|
+
- app/serializers/spree/v2/storefront/promotion_serializer.rb
|
175
|
+
- app/serializers/spree/v2/storefront/shipment_serializer.rb
|
176
|
+
- app/serializers/spree/v2/storefront/shipping_rate_serializer.rb
|
177
|
+
- app/serializers/spree/v2/storefront/state_serializer.rb
|
178
|
+
- app/serializers/spree/v2/storefront/taxon_image_serializer.rb
|
179
|
+
- app/serializers/spree/v2/storefront/taxon_serializer.rb
|
180
|
+
- app/serializers/spree/v2/storefront/taxonomy_serializer.rb
|
181
|
+
- app/serializers/spree/v2/storefront/user_serializer.rb
|
182
|
+
- app/serializers/spree/v2/storefront/variant_serializer.rb
|
102
183
|
- app/views/spree/api/errors/gateway_error.v1.rabl
|
103
184
|
- app/views/spree/api/errors/invalid_api_key.v1.rabl
|
104
185
|
- app/views/spree/api/errors/invalid_resource.v1.rabl
|
@@ -196,6 +277,7 @@ files:
|
|
196
277
|
- app/views/spree/api/v1/variants/small.v1.rabl
|
197
278
|
- app/views/spree/api/v1/zones/index.v1.rabl
|
198
279
|
- app/views/spree/api/v1/zones/show.v1.rabl
|
280
|
+
- config/initializers/doorkeeper.rb
|
199
281
|
- config/initializers/metal_load_paths.rb
|
200
282
|
- config/initializers/user_class_extensions.rb
|
201
283
|
- config/locales/en.yml
|
@@ -204,6 +286,9 @@ files:
|
|
204
286
|
- db/migrate/20120411123334_resize_api_key_field.rb
|
205
287
|
- db/migrate/20120530054546_rename_api_key_to_spree_api_key.rb
|
206
288
|
- db/migrate/20131017162334_add_index_to_user_spree_api_key.rb
|
289
|
+
- db/migrate/20180320110726_create_doorkeeper_tables.rb
|
290
|
+
- docs/oauth/index.yml
|
291
|
+
- docs/v2/storefront/index.yaml
|
207
292
|
- lib/spree/api.rb
|
208
293
|
- lib/spree/api/controller_setup.rb
|
209
294
|
- lib/spree/api/engine.rb
|
@@ -228,12 +313,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
228
313
|
requirements:
|
229
314
|
- - ">="
|
230
315
|
- !ruby/object:Gem::Version
|
231
|
-
version: 2.
|
316
|
+
version: 2.3.0
|
232
317
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
318
|
requirements:
|
234
|
-
- - "
|
319
|
+
- - ">"
|
235
320
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
321
|
+
version: 1.3.1
|
237
322
|
requirements: []
|
238
323
|
rubyforge_project:
|
239
324
|
rubygems_version: 2.7.6
|