solidus_api 2.3.1 → 2.4.0.beta1

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

Potentially problematic release.


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

Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/spree/api/base_controller.rb +9 -12
  3. data/app/controllers/spree/api/checkouts_controller.rb +3 -5
  4. data/app/controllers/spree/api/orders_controller.rb +2 -12
  5. data/app/controllers/spree/api/payments_controller.rb +0 -1
  6. data/app/controllers/spree/api/resource_controller.rb +2 -0
  7. data/app/controllers/spree/api/shipments_controller.rb +17 -6
  8. data/app/controllers/spree/api/stock_items_controller.rb +6 -0
  9. data/app/helpers/spree/api/api_helpers.rb +3 -4
  10. data/app/views/.rubocop.yml +4 -0
  11. data/app/views/spree/api/address_books/show.json.jbuilder +11 -0
  12. data/app/views/spree/api/addresses/_address.json.jbuilder +17 -0
  13. data/app/views/spree/api/addresses/show.json.jbuilder +1 -0
  14. data/app/views/spree/api/adjustments/_adjustment.json.jbuilder +4 -0
  15. data/app/views/spree/api/config/money.json.jbuilder +1 -0
  16. data/app/views/spree/api/config/show.json.jbuilder +2 -0
  17. data/app/views/spree/api/countries/index.json.jbuilder +2 -0
  18. data/app/views/spree/api/countries/show.json.jbuilder +4 -0
  19. data/app/views/spree/api/credit_cards/_credit_card.json.jbuilder +10 -0
  20. data/app/views/spree/api/credit_cards/index.json.jbuilder +4 -0
  21. data/app/views/spree/api/credit_cards/show.json.jbuilder +1 -0
  22. data/app/views/spree/api/errors/delete_restriction.json.jbuilder +1 -0
  23. data/app/views/spree/api/errors/gateway_error.json.jbuilder +1 -0
  24. data/app/views/spree/api/errors/invalid_api_key.json.jbuilder +1 -0
  25. data/app/views/spree/api/errors/invalid_resource.json.jbuilder +2 -0
  26. data/app/views/spree/api/errors/must_specify_api_key.json.jbuilder +1 -0
  27. data/app/views/spree/api/errors/not_found.json.jbuilder +1 -0
  28. data/app/views/spree/api/errors/unauthorized.json.jbuilder +1 -0
  29. data/app/views/spree/api/errors/variant_not_in_stock_transfer.json.jbuilder +1 -0
  30. data/app/views/spree/api/images/_image.json.jbuilder +5 -0
  31. data/app/views/spree/api/images/index.json.jbuilder +3 -0
  32. data/app/views/spree/api/images/show.json.jbuilder +1 -0
  33. data/app/views/spree/api/inventory_units/show.json.jbuilder +1 -0
  34. data/app/views/spree/api/line_items/_line_item.json.jbuilder +16 -0
  35. data/app/views/spree/api/line_items/new.json.jbuilder +2 -0
  36. data/app/views/spree/api/line_items/show.json.jbuilder +1 -0
  37. data/app/views/spree/api/option_types/_option_type.json.jbuilder +4 -0
  38. data/app/views/spree/api/option_types/index.json.jbuilder +3 -0
  39. data/app/views/spree/api/option_types/show.json.jbuilder +1 -0
  40. data/app/views/spree/api/option_values/_option_value.json.jbuilder +1 -0
  41. data/app/views/spree/api/option_values/index.json.jbuilder +3 -0
  42. data/app/views/spree/api/option_values/show.json.jbuilder +1 -0
  43. data/app/views/spree/api/orders/_big.json.jbuilder +49 -0
  44. data/app/views/spree/api/orders/_order.json.jbuilder +10 -0
  45. data/app/views/spree/api/orders/could_not_apply_coupon.json.jbuilder +1 -0
  46. data/app/views/spree/api/orders/could_not_transition.json.jbuilder +2 -0
  47. data/app/views/spree/api/orders/expected_total_mismatch.json.jbuilder +1 -0
  48. data/app/views/spree/api/orders/index.json.jbuilder +4 -0
  49. data/app/views/spree/api/orders/invalid_shipping_method.json.jbuilder +1 -0
  50. data/app/views/spree/api/orders/mine.json.jbuilder +4 -0
  51. data/app/views/spree/api/orders/show.json.jbuilder +1 -0
  52. data/app/views/spree/api/payments/credit_over_limit.json.jbuilder +1 -0
  53. data/app/views/spree/api/payments/index.json.jbuilder +2 -0
  54. data/app/views/spree/api/payments/new.json.jbuilder +4 -0
  55. data/app/views/spree/api/payments/show.json.jbuilder +1 -0
  56. data/app/views/spree/api/payments/update_forbidden.json.jbuilder +1 -0
  57. data/app/views/spree/api/product_properties/index.json.jbuilder +4 -0
  58. data/app/views/spree/api/product_properties/new.json.jbuilder +2 -0
  59. data/app/views/spree/api/product_properties/show.json.jbuilder +1 -0
  60. data/app/views/spree/api/products/_product.json.jbuilder +34 -0
  61. data/app/views/spree/api/products/index.json.jbuilder +4 -0
  62. data/app/views/spree/api/products/new.json.jbuilder +2 -0
  63. data/app/views/spree/api/products/show.json.jbuilder +1 -0
  64. data/app/views/spree/api/promotions/handler.json.jbuilder +4 -0
  65. data/app/views/spree/api/promotions/show.json.jbuilder +1 -0
  66. data/app/views/spree/api/properties/index.json.jbuilder +4 -0
  67. data/app/views/spree/api/properties/new.json.jbuilder +2 -0
  68. data/app/views/spree/api/properties/show.json.jbuilder +1 -0
  69. data/app/views/spree/api/return_authorizations/index.json.jbuilder +4 -0
  70. data/app/views/spree/api/return_authorizations/new.json.jbuilder +2 -0
  71. data/app/views/spree/api/return_authorizations/show.json.jbuilder +1 -0
  72. data/app/views/spree/api/shared/_pagination.json.jbuilder +5 -0
  73. data/app/views/spree/api/shipments/_big.json.jbuilder +51 -0
  74. data/app/views/spree/api/shipments/_small.json.jbuilder +32 -0
  75. data/app/views/spree/api/shipments/cannot_ready_shipment.json.jbuilder +1 -0
  76. data/app/views/spree/api/shipments/mine.json.jbuilder +4 -0
  77. data/app/views/spree/api/shipments/show.json.jbuilder +31 -0
  78. data/app/views/spree/api/shipping_rates/_shipping_rate.json.jbuilder +2 -0
  79. data/app/views/spree/api/states/index.json.jbuilder +5 -0
  80. data/app/views/spree/api/states/show.json.jbuilder +1 -0
  81. data/app/views/spree/api/stock_items/_stock_item.json.jbuilder +4 -0
  82. data/app/views/spree/api/stock_items/index.json.jbuilder +4 -0
  83. data/app/views/spree/api/stock_items/show.json.jbuilder +1 -0
  84. data/app/views/spree/api/stock_locations/_stock_location.json.jbuilder +15 -0
  85. data/app/views/spree/api/stock_locations/index.json.jbuilder +4 -0
  86. data/app/views/spree/api/stock_locations/show.json.jbuilder +1 -0
  87. data/app/views/spree/api/stock_movements/_stock_movement.json.jbuilder +4 -0
  88. data/app/views/spree/api/stock_movements/index.json.jbuilder +4 -0
  89. data/app/views/spree/api/stock_movements/show.json.jbuilder +1 -0
  90. data/app/views/spree/api/stock_transfers/receive.json.jbuilder +4 -0
  91. data/app/views/spree/api/store_credit_events/mine.json.jbuilder +5 -0
  92. data/app/views/spree/api/stores/index.json.jbuilder +1 -0
  93. data/app/views/spree/api/stores/show.json.jbuilder +1 -0
  94. data/app/views/spree/api/taxonomies/_nested.json.jbuilder +8 -0
  95. data/app/views/spree/api/taxonomies/_taxonomy.json.jbuilder +11 -0
  96. data/app/views/spree/api/taxonomies/index.json.jbuilder +4 -0
  97. data/app/views/spree/api/taxonomies/jstree.json.jbuilder +6 -0
  98. data/app/views/spree/api/taxonomies/new.json.jbuilder +2 -0
  99. data/app/views/spree/api/taxonomies/show.json.jbuilder +1 -0
  100. data/app/views/spree/api/taxons/_taxon.json.jbuilder +2 -0
  101. data/app/views/spree/api/taxons/_taxons.json.jbuilder +4 -0
  102. data/app/views/spree/api/taxons/index.json.jbuilder +7 -0
  103. data/app/views/spree/api/taxons/jstree.json.jbuilder +8 -0
  104. data/app/views/spree/api/taxons/new.json.jbuilder +2 -0
  105. data/app/views/spree/api/taxons/show.json.jbuilder +1 -0
  106. data/app/views/spree/api/transfer_items/_transfer_item.json.jbuilder +5 -0
  107. data/app/views/spree/api/transfer_items/show.json.jbuilder +1 -0
  108. data/app/views/spree/api/users/_user.json.jbuilder +15 -0
  109. data/app/views/spree/api/users/index.json.jbuilder +4 -0
  110. data/app/views/spree/api/users/new.json.jbuilder +2 -0
  111. data/app/views/spree/api/users/show.json.jbuilder +1 -0
  112. data/app/views/spree/api/variants/_big.json.jbuilder +13 -0
  113. data/app/views/spree/api/variants/_small.json.jbuilder +16 -0
  114. data/app/views/spree/api/variants/index.json.jbuilder +4 -0
  115. data/app/views/spree/api/variants/new.json.jbuilder +2 -0
  116. data/app/views/spree/api/variants/show.json.jbuilder +1 -0
  117. data/app/views/spree/api/zones/_zone.json.jbuilder +4 -0
  118. data/app/views/spree/api/zones/index.json.jbuilder +4 -0
  119. data/app/views/spree/api/zones/show.json.jbuilder +1 -0
  120. data/config/locales/en.yml +1 -0
  121. data/lib/spree/api/engine.rb +0 -14
  122. data/lib/spree/api.rb +1 -1
  123. data/lib/spree_api.rb +1 -0
  124. data/solidus_api.gemspec +3 -1
  125. data/spec/controllers/spree/api/base_controller_spec.rb +0 -56
  126. data/spec/requests/spree/api/checkouts_controller_spec.rb +8 -13
  127. data/spec/requests/spree/api/orders_controller_spec.rb +7 -60
  128. data/spec/requests/spree/api/payments_controller_spec.rb +0 -11
  129. data/spec/requests/spree/api/shipments_controller_spec.rb +16 -1
  130. data/spec/requests/spree/api/states_controller_spec.rb +1 -0
  131. data/spec/requests/spree/api/taxons_controller_spec.rb +25 -0
  132. data/spec/requests/spree/api/users_controller_spec.rb +1 -1
  133. data/spec/support/be_paginated_matcher.rb +7 -0
  134. data/spec/test_views/spree/api/widgets/_widget.json.jbuilder +1 -0
  135. data/spec/test_views/spree/api/widgets/index.json.jbuilder +7 -0
  136. data/spec/test_views/spree/api/widgets/new.json.jbuilder +1 -0
  137. data/spec/test_views/spree/api/widgets/show.json.jbuilder +1 -0
  138. metadata +166 -111
  139. data/app/views/spree/api/address_books/show.v1.rabl +0 -7
  140. data/app/views/spree/api/addresses/show.v1.rabl +0 -10
  141. data/app/views/spree/api/adjustments/show.v1.rabl +0 -4
  142. data/app/views/spree/api/config/money.v1.rabl +0 -2
  143. data/app/views/spree/api/config/show.v1.rabl +0 -3
  144. data/app/views/spree/api/countries/index.v1.rabl +0 -7
  145. data/app/views/spree/api/countries/show.v1.rabl +0 -5
  146. data/app/views/spree/api/credit_cards/index.v1.rabl +0 -7
  147. data/app/views/spree/api/credit_cards/show.v1.rabl +0 -7
  148. data/app/views/spree/api/errors/gateway_error.v1.rabl +0 -2
  149. data/app/views/spree/api/errors/invalid_api_key.v1.rabl +0 -2
  150. data/app/views/spree/api/errors/invalid_resource.v1.rabl +0 -3
  151. data/app/views/spree/api/errors/must_specify_api_key.v1.rabl +0 -2
  152. data/app/views/spree/api/errors/not_found.v1.rabl +0 -2
  153. data/app/views/spree/api/errors/unauthorized.v1.rabl +0 -2
  154. data/app/views/spree/api/errors/variant_not_in_stock_transfer.v1.rabl +0 -2
  155. data/app/views/spree/api/images/index.v1.rabl +0 -4
  156. data/app/views/spree/api/images/show.v1.rabl +0 -6
  157. data/app/views/spree/api/inventory_units/show.rabl +0 -2
  158. data/app/views/spree/api/line_items/new.v1.rabl +0 -3
  159. data/app/views/spree/api/line_items/show.v1.rabl +0 -15
  160. data/app/views/spree/api/option_types/index.v1.rabl +0 -3
  161. data/app/views/spree/api/option_types/show.v1.rabl +0 -5
  162. data/app/views/spree/api/option_values/index.v1.rabl +0 -3
  163. data/app/views/spree/api/option_values/show.v1.rabl +0 -2
  164. data/app/views/spree/api/orders/could_not_apply_coupon.v1.rabl +0 -2
  165. data/app/views/spree/api/orders/could_not_transition.v1.rabl +0 -3
  166. data/app/views/spree/api/orders/expected_total_mismatch.v1.rabl +0 -2
  167. data/app/views/spree/api/orders/index.v1.rabl +0 -7
  168. data/app/views/spree/api/orders/invalid_shipping_method.v1.rabl +0 -2
  169. data/app/views/spree/api/orders/mine.v1.rabl +0 -9
  170. data/app/views/spree/api/orders/order.v1.rabl +0 -9
  171. data/app/views/spree/api/orders/show.v1.rabl +0 -53
  172. data/app/views/spree/api/payments/credit_over_limit.v1.rabl +0 -2
  173. data/app/views/spree/api/payments/index.v1.rabl +0 -7
  174. data/app/views/spree/api/payments/new.v1.rabl +0 -5
  175. data/app/views/spree/api/payments/show.v1.rabl +0 -2
  176. data/app/views/spree/api/payments/update_forbidden.v1.rabl +0 -2
  177. data/app/views/spree/api/product_properties/index.v1.rabl +0 -7
  178. data/app/views/spree/api/product_properties/new.v1.rabl +0 -2
  179. data/app/views/spree/api/product_properties/show.v1.rabl +0 -2
  180. data/app/views/spree/api/products/index.v1.rabl +0 -9
  181. data/app/views/spree/api/products/new.v1.rabl +0 -3
  182. data/app/views/spree/api/products/product.v1.rabl +0 -1
  183. data/app/views/spree/api/products/show.v1.rabl +0 -42
  184. data/app/views/spree/api/promotions/handler.v1.rabl +0 -5
  185. data/app/views/spree/api/promotions/show.v1.rabl +0 -2
  186. data/app/views/spree/api/properties/index.v1.rabl +0 -7
  187. data/app/views/spree/api/properties/new.v1.rabl +0 -2
  188. data/app/views/spree/api/properties/show.v1.rabl +0 -2
  189. data/app/views/spree/api/return_authorizations/index.v1.rabl +0 -7
  190. data/app/views/spree/api/return_authorizations/new.v1.rabl +0 -3
  191. data/app/views/spree/api/return_authorizations/show.v1.rabl +0 -2
  192. data/app/views/spree/api/shipments/big.v1.rabl +0 -55
  193. data/app/views/spree/api/shipments/cannot_ready_shipment.v1.rabl +0 -2
  194. data/app/views/spree/api/shipments/mine.v1.rabl +0 -9
  195. data/app/views/spree/api/shipments/show.v1.rabl +0 -32
  196. data/app/views/spree/api/shipments/small.v1.rabl +0 -37
  197. data/app/views/spree/api/shipping_rates/show.v1.rabl +0 -2
  198. data/app/views/spree/api/states/index.v1.rabl +0 -14
  199. data/app/views/spree/api/states/show.v1.rabl +0 -2
  200. data/app/views/spree/api/stock_items/index.v1.rabl +0 -7
  201. data/app/views/spree/api/stock_items/show.v1.rabl +0 -5
  202. data/app/views/spree/api/stock_locations/index.v1.rabl +0 -7
  203. data/app/views/spree/api/stock_locations/show.v1.rabl +0 -8
  204. data/app/views/spree/api/stock_movements/index.v1.rabl +0 -7
  205. data/app/views/spree/api/stock_movements/show.v1.rabl +0 -5
  206. data/app/views/spree/api/stock_transfers/receive.v1.rabl +0 -5
  207. data/app/views/spree/api/store_credit_events/mine.v1.rabl +0 -10
  208. data/app/views/spree/api/stores/index.v1.rabl +0 -4
  209. data/app/views/spree/api/stores/show.v1.rabl +0 -2
  210. data/app/views/spree/api/taxonomies/index.v1.rabl +0 -7
  211. data/app/views/spree/api/taxonomies/jstree.rabl +0 -8
  212. data/app/views/spree/api/taxonomies/nested.v1.rabl +0 -11
  213. data/app/views/spree/api/taxonomies/new.v1.rabl +0 -3
  214. data/app/views/spree/api/taxonomies/show.v1.rabl +0 -15
  215. data/app/views/spree/api/taxons/index.v1.rabl +0 -12
  216. data/app/views/spree/api/taxons/jstree.rabl +0 -8
  217. data/app/views/spree/api/taxons/new.v1.rabl +0 -3
  218. data/app/views/spree/api/taxons/show.v1.rabl +0 -6
  219. data/app/views/spree/api/taxons/taxons.v1.rabl +0 -5
  220. data/app/views/spree/api/transfer_items/show.v1.rabl +0 -6
  221. data/app/views/spree/api/users/index.v1.rabl +0 -7
  222. data/app/views/spree/api/users/new.v1.rabl +0 -3
  223. data/app/views/spree/api/users/show.v1.rabl +0 -10
  224. data/app/views/spree/api/variants/big.v1.rabl +0 -20
  225. data/app/views/spree/api/variants/index.v1.rabl +0 -9
  226. data/app/views/spree/api/variants/new.v1.rabl +0 -2
  227. data/app/views/spree/api/variants/show.v1.rabl +0 -3
  228. data/app/views/spree/api/variants/small.v1.rabl +0 -17
  229. data/app/views/spree/api/zones/index.v1.rabl +0 -7
  230. data/app/views/spree/api/zones/show.v1.rabl +0 -6
  231. data/config/initializers/rails5_rabl_hacks.rb +0 -12
  232. data/spec/test_views/spree/api/widgets/index.v1.rabl +0 -7
  233. data/spec/test_views/spree/api/widgets/new.v1.rabl +0 -2
  234. data/spec/test_views/spree/api/widgets/show.v1.rabl +0 -2
@@ -1,8 +0,0 @@
1
- object false
2
- node(:data) { @taxonomy.root.name }
3
- node(:attr) do
4
- { :id => @taxonomy.root.id,
5
- :name => @taxonomy.root.name
6
- }
7
- end
8
- node(:state) { "closed" }
@@ -1,11 +0,0 @@
1
- attributes *taxonomy_attributes
2
-
3
- child :root => :root do
4
- attributes *taxon_attributes
5
-
6
- child :children => :taxons do
7
- attributes *taxon_attributes
8
-
9
- extends "spree/api/taxons/taxons"
10
- end
11
- end
@@ -1,3 +0,0 @@
1
- object false
2
- node(:attributes) { [*taxonomy_attributes] }
3
- node(:required_attributes) { required_fields_for(Spree::Taxonomy) }
@@ -1,15 +0,0 @@
1
- object @taxonomy
2
-
3
- if params[:set] == 'nested'
4
- extends "spree/api/taxonomies/nested"
5
- else
6
- attributes *taxonomy_attributes
7
-
8
- child :root => :root do
9
- attributes *taxon_attributes
10
-
11
- child :children => :taxons do
12
- attributes *taxon_attributes
13
- end
14
- end
15
- end
@@ -1,12 +0,0 @@
1
- object false
2
- node(:count) { @taxons.count }
3
- node(:total_count) { @taxons.total_count }
4
- node(:current_page) { @taxons.current_page }
5
- node(:per_page) { @taxons.limit_value }
6
- node(:pages) { @taxons.total_pages }
7
- child @taxons => :taxons do
8
- attributes *taxon_attributes
9
- unless params[:without_children]
10
- extends "spree/api/taxons/taxons"
11
- end
12
- end
@@ -1,8 +0,0 @@
1
- collection @taxon.children, :object_root => false
2
- node(:data) { |taxon| taxon.name }
3
- node(:attr) do |taxon|
4
- { :id => taxon.id,
5
- :name => taxon.name
6
- }
7
- end
8
- node(:state) { "closed" }
@@ -1,3 +0,0 @@
1
- object false
2
- node(:attributes) { [*taxon_attributes] }
3
- node(:required_attributes) { required_fields_for(Spree::Taxon) }
@@ -1,6 +0,0 @@
1
- object @taxon
2
- attributes *taxon_attributes
3
-
4
- child :children => :taxons do
5
- attributes *taxon_attributes
6
- end
@@ -1,5 +0,0 @@
1
- child :children => :taxons do
2
- attributes *taxon_attributes
3
-
4
- extends "spree/api/taxons/taxons"
5
- end
@@ -1,6 +0,0 @@
1
- object @transfer_item
2
- attributes *transfer_item_attributes
3
- child(:variant) do
4
- extends "spree/api/variants/small"
5
- attributes *transfer_item_variant_attributes
6
- end
@@ -1,7 +0,0 @@
1
- object false
2
- child(@users => :users) do
3
- extends "spree/api/users/show"
4
- end
5
- node(:count) { @users.count }
6
- node(:current_page) { @users.current_page }
7
- node(:pages) { @users.total_pages }
@@ -1,3 +0,0 @@
1
- object false
2
- node(:attributes) { [*user_attributes] }
3
- node(:required_attributes) { required_fields_for(Spree.user_class) }
@@ -1,10 +0,0 @@
1
- object @user
2
-
3
- attributes *user_attributes
4
- child(:bill_address => :bill_address) do
5
- extends "spree/api/addresses/show"
6
- end
7
-
8
- child(:ship_address => :ship_address) do
9
- extends "spree/api/addresses/show"
10
- end
@@ -1,20 +0,0 @@
1
- object @variant
2
- attributes *variant_attributes
3
-
4
- cache [I18n.locale, Spree::StockLocation.accessible_by(current_ability).pluck(:id).sort.join(":"), 'big_variant', root_object]
5
-
6
- extends "spree/api/variants/small"
7
-
8
- node :total_on_hand do
9
- root_object.total_on_hand
10
- end
11
-
12
- child :variant_properties => :variant_properties do
13
- attributes *variant_property_attributes
14
- end
15
-
16
- child(root_object.stock_items.accessible_by(current_ability) => :stock_items) do
17
- attributes :id, :count_on_hand, :stock_location_id, :backorderable
18
- attribute :available? => :available
19
- node(:stock_location_name) { |si| si.stock_location.name }
20
- end
@@ -1,9 +0,0 @@
1
- object false
2
- node(:count) { @variants.count }
3
- node(:total_count) { @variants.total_count }
4
- node(:current_page) { @variants.current_page }
5
- node(:pages) { @variants.total_pages }
6
-
7
- child(@variants => :variants) do
8
- extends "spree/api/variants/big"
9
- end
@@ -1,2 +0,0 @@
1
- node(:attributes) { [*variant_attributes] }
2
- node(:required_attributes) { [] }
@@ -1,3 +0,0 @@
1
- object @variant
2
- cache [I18n.locale, @current_user_roles.include?('admin'), 'show', root_object]
3
- extends "spree/api/variants/big"
@@ -1,17 +0,0 @@
1
- cache [I18n.locale, 'small_variant', root_object]
2
-
3
- attributes *variant_attributes
4
-
5
- node(:display_price) { |p| p.display_price.to_s }
6
- node(:options_text) { |v| v.options_text }
7
- node(:track_inventory) { |v| v.should_track_inventory? }
8
- node(:in_stock) { |v| v.in_stock? }
9
- node(:is_backorderable) { |v| v.is_backorderable? }
10
- node(:total_on_hand) { |v| v.total_on_hand }
11
- node(:is_destroyed) { |v| v.destroyed? }
12
-
13
- child :option_values => :option_values do
14
- attributes *option_value_attributes
15
- end
16
-
17
- child(:images => :images) { extends "spree/api/images/show" }
@@ -1,7 +0,0 @@
1
- object false
2
- child(@zones => :zones) do
3
- extends 'spree/api/zones/show'
4
- end
5
- node(:count) { @zones.count }
6
- node(:current_page) { @zones.current_page }
7
- node(:pages) { @zones.total_pages }
@@ -1,6 +0,0 @@
1
- object @zone
2
- attributes :id, :name, :description
3
-
4
- child :zone_members => :zone_members do
5
- attributes :id, :name, :zoneable_type, :zoneable_id
6
- end
@@ -1,12 +0,0 @@
1
- # As of 2016-08-17 rabl is broken on rails 5.
2
- # This prevents errors when caching is enabled
3
- if Rabl::VERSION == "0.13.0"
4
- # Remove the broken redefinition of digest
5
- Rabl::Digestor.class_eval do
6
- class << self
7
- remove_method :digest
8
- end
9
- end
10
- else
11
- raise "Remove this monkey patch"
12
- end
@@ -1,7 +0,0 @@
1
- object false
2
- child(@collection => :widgets) do
3
- extends "spree/api/widgets/show"
4
- end
5
- node(:count) { @collection.count }
6
- node(:current_page) { params[:page] || 1 }
7
- node(:pages) { @collection.total_pages }
@@ -1,2 +0,0 @@
1
- object false
2
- node(:attributes) { [:name] }
@@ -1,2 +0,0 @@
1
- object @object
2
- attributes :id, :name, :position