solidus_api 2.9.6 → 2.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -2
  3. data/app/controllers/spree/api/addresses_controller.rb +1 -1
  4. data/app/controllers/spree/api/base_controller.rb +10 -10
  5. data/app/controllers/spree/api/checkouts_controller.rb +4 -4
  6. data/app/controllers/spree/api/credit_cards_controller.rb +1 -1
  7. data/app/controllers/spree/api/images_controller.rb +1 -1
  8. data/app/controllers/spree/api/inventory_units_controller.rb +1 -1
  9. data/app/controllers/spree/api/option_types_controller.rb +1 -1
  10. data/app/controllers/spree/api/option_values_controller.rb +1 -1
  11. data/app/controllers/spree/api/orders_controller.rb +10 -5
  12. data/app/controllers/spree/api/payments_controller.rb +1 -1
  13. data/app/controllers/spree/api/product_properties_controller.rb +1 -1
  14. data/app/controllers/spree/api/properties_controller.rb +1 -1
  15. data/app/controllers/spree/api/resource_controller.rb +1 -1
  16. data/app/controllers/spree/api/return_authorizations_controller.rb +1 -1
  17. data/app/controllers/spree/api/shipments_controller.rb +1 -1
  18. data/app/controllers/spree/api/stock_items_controller.rb +1 -1
  19. data/app/controllers/spree/api/stock_locations_controller.rb +1 -1
  20. data/app/controllers/spree/api/stores_controller.rb +1 -1
  21. data/app/controllers/spree/api/taxonomies_controller.rb +4 -2
  22. data/app/controllers/spree/api/taxons_controller.rb +1 -1
  23. data/app/controllers/spree/api/variants_controller.rb +1 -1
  24. data/app/controllers/spree/api/zones_controller.rb +1 -1
  25. data/app/helpers/spree/api/api_helpers.rb +2 -2
  26. data/app/views/spree/api/images/_image.json.jbuilder +2 -2
  27. data/app/views/spree/api/orders/_order.json.jbuilder +1 -1
  28. data/app/views/spree/api/shared/_pagination.json.jbuilder +1 -1
  29. data/lib/spree/api.rb +0 -7
  30. data/lib/spree/api/config.rb +9 -0
  31. data/lib/spree/api/engine.rb +4 -4
  32. data/lib/spree/api/responders.rb +3 -2
  33. data/lib/spree/api/responders/{rabl_template.rb → jbuilder_template.rb} +3 -1
  34. data/{app/models → lib}/spree/api_configuration.rb +0 -0
  35. data/openapi/.stoplight.yml +7 -0
  36. data/openapi/api.oas2.yml +6108 -0
  37. data/openapi/authentication.md +25 -0
  38. data/openapi/checkout-flow.md +50 -0
  39. data/openapi/errors.md +3 -0
  40. data/openapi/lint.yml +1 -0
  41. data/openapi/main.hub.yml +65 -0
  42. data/openapi/pagination.md +7 -0
  43. data/openapi/theme.css +0 -0
  44. data/solidus_api.gemspec +1 -1
  45. data/spec/controllers/spree/api/resource_controller_spec.rb +4 -4
  46. data/spec/lib/spree_api_responders_spec.rb +10 -0
  47. data/spec/requests/api/address_books_spec.rb +2 -2
  48. data/spec/requests/{rabl_cache_spec.rb → jbuilder_cache_spec.rb} +2 -2
  49. data/spec/requests/spree/api/checkouts_controller_spec.rb +2 -2
  50. data/spec/requests/spree/api/classifications_controller_spec.rb +1 -1
  51. data/spec/requests/spree/api/option_types_controller_spec.rb +2 -2
  52. data/spec/requests/spree/api/option_values_controller_spec.rb +2 -2
  53. data/spec/requests/spree/api/orders_controller_spec.rb +15 -15
  54. data/spec/requests/spree/api/payments_controller_spec.rb +3 -3
  55. data/spec/requests/spree/api/products_controller_spec.rb +6 -6
  56. data/spec/requests/spree/api/stock_items_controller_spec.rb +5 -5
  57. data/spec/requests/spree/api/stock_locations_controller_spec.rb +4 -4
  58. data/spec/requests/spree/api/taxons_controller_spec.rb +2 -2
  59. metadata +25 -13
@@ -21,7 +21,7 @@ module Spree
21
21
  end
22
22
 
23
23
  it "cannot see inactive stock locations" do
24
- stock_location.update_attributes!(active: false)
24
+ stock_location.update!(active: false)
25
25
  get spree.api_stock_locations_path
26
26
  expect(response).to be_successful
27
27
  stock_locations = json_response['stock_locations'].map { |sl| sl['name'] }
@@ -37,7 +37,7 @@ module Spree
37
37
  end
38
38
 
39
39
  it "cannot see inactive stock locations" do
40
- stock_location.update_attributes!(active: false)
40
+ stock_location.update!(active: false)
41
41
  get spree.api_stock_location_path(stock_location)
42
42
  expect(response).to be_not_found
43
43
  end
@@ -84,7 +84,7 @@ module Spree
84
84
  end
85
85
 
86
86
  it "can see inactive stock locations" do
87
- stock_location.update_attributes!(active: false)
87
+ stock_location.update!(active: false)
88
88
  get spree.api_stock_locations_path
89
89
  expect(response).to be_successful
90
90
  stock_locations = json_response['stock_locations'].map { |sl| sl['name'] }
@@ -122,7 +122,7 @@ module Spree
122
122
  end
123
123
 
124
124
  it "can see inactive stock locations" do
125
- stock_location.update_attributes!(active: false)
125
+ stock_location.update!(active: false)
126
126
  get spree.api_stock_location_path(stock_location)
127
127
  expect(response).to be_successful
128
128
  expect(json_response['name']).to eq stock_location.name
@@ -93,9 +93,9 @@ module Spree
93
93
  it 'returns only requested ids' do
94
94
  # We need a completly new branch to avoid having parent that can be preloaded from the rails ancestors
95
95
  python = create(:taxon, name: "Python", parent: taxonomy.root, taxonomy: taxonomy)
96
- python_3 = create(:taxon, name: "3.0", parent: python, taxonomy: taxonomy)
96
+ python_three = create(:taxon, name: "3.0", parent: python, taxonomy: taxonomy)
97
97
 
98
- get spree.api_taxons_path, params: { ids: [rails_v3_2_2.id, python_3.id] }
98
+ get spree.api_taxons_path, params: { ids: [rails_v3_2_2.id, python_three.id] }
99
99
 
100
100
  expect(json_response['taxons'].size).to eq 2
101
101
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.6
4
+ version: 2.10.3
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: 2020-07-16 00:00:00.000000000 Z
11
+ date: 2020-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jbuilder
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 2.9.6
61
+ version: 2.10.3
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 2.9.6
68
+ version: 2.10.3
69
69
  description: REST API for the Solidus e-commerce framework.
70
70
  email: contact@solidus.io
71
71
  executables: []
@@ -111,7 +111,6 @@ files:
111
111
  - app/controllers/spree/api/variants_controller.rb
112
112
  - app/controllers/spree/api/zones_controller.rb
113
113
  - app/helpers/spree/api/api_helpers.rb
114
- - app/models/spree/api_configuration.rb
115
114
  - app/views/.rubocop.yml
116
115
  - app/views/spree/api/address_books/show.json.jbuilder
117
116
  - app/views/spree/api/addresses/_address.json.jbuilder
@@ -230,22 +229,34 @@ files:
230
229
  - db/migrate/20131017162334_add_index_to_user_spree_api_key.rb
231
230
  - lib/solidus_api.rb
232
231
  - lib/spree/api.rb
232
+ - lib/spree/api/config.rb
233
233
  - lib/spree/api/engine.rb
234
234
  - lib/spree/api/responders.rb
235
- - lib/spree/api/responders/rabl_template.rb
235
+ - lib/spree/api/responders/jbuilder_template.rb
236
236
  - lib/spree/api/testing_support/caching.rb
237
237
  - lib/spree/api/testing_support/helpers.rb
238
238
  - lib/spree/api/testing_support/setup.rb
239
+ - lib/spree/api_configuration.rb
239
240
  - lib/spree_api.rb
241
+ - openapi/.stoplight.yml
242
+ - openapi/api.oas2.yml
243
+ - openapi/authentication.md
244
+ - openapi/checkout-flow.md
245
+ - openapi/errors.md
246
+ - openapi/lint.yml
247
+ - openapi/main.hub.yml
248
+ - openapi/pagination.md
249
+ - openapi/theme.css
240
250
  - script/rails
241
251
  - solidus_api.gemspec
242
252
  - spec/controllers/spree/api/base_controller_spec.rb
243
253
  - spec/controllers/spree/api/resource_controller_spec.rb
244
254
  - spec/features/checkout_spec.rb
245
255
  - spec/fixtures/thinking-cat.jpg
256
+ - spec/lib/spree_api_responders_spec.rb
246
257
  - spec/models/spree/legacy_user_spec.rb
247
258
  - spec/requests/api/address_books_spec.rb
248
- - spec/requests/rabl_cache_spec.rb
259
+ - spec/requests/jbuilder_cache_spec.rb
249
260
  - spec/requests/ransackable_attributes_spec.rb
250
261
  - spec/requests/spree/api/addresses_controller_spec.rb
251
262
  - spec/requests/spree/api/checkouts_controller_spec.rb
@@ -294,7 +305,7 @@ homepage: http://solidus.io/
294
305
  licenses:
295
306
  - BSD-3-Clause
296
307
  metadata: {}
297
- post_install_message:
308
+ post_install_message:
298
309
  rdoc_options: []
299
310
  require_paths:
300
311
  - lib
@@ -302,15 +313,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
302
313
  requirements:
303
314
  - - ">="
304
315
  - !ruby/object:Gem::Version
305
- version: 2.2.2
316
+ version: 2.4.0
306
317
  required_rubygems_version: !ruby/object:Gem::Requirement
307
318
  requirements:
308
319
  - - ">="
309
320
  - !ruby/object:Gem::Version
310
321
  version: 1.8.23
311
322
  requirements: []
312
- rubygems_version: 3.0.3
313
- signing_key:
323
+ rubygems_version: 3.1.4
324
+ signing_key:
314
325
  specification_version: 4
315
326
  summary: REST API for the Solidus e-commerce framework.
316
327
  test_files:
@@ -318,9 +329,10 @@ test_files:
318
329
  - spec/controllers/spree/api/resource_controller_spec.rb
319
330
  - spec/features/checkout_spec.rb
320
331
  - spec/fixtures/thinking-cat.jpg
332
+ - spec/lib/spree_api_responders_spec.rb
321
333
  - spec/models/spree/legacy_user_spec.rb
322
334
  - spec/requests/api/address_books_spec.rb
323
- - spec/requests/rabl_cache_spec.rb
335
+ - spec/requests/jbuilder_cache_spec.rb
324
336
  - spec/requests/ransackable_attributes_spec.rb
325
337
  - spec/requests/spree/api/addresses_controller_spec.rb
326
338
  - spec/requests/spree/api/checkouts_controller_spec.rb