solidus_starter_frontend 0.1.0 → 0.2.0

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.
Files changed (301) hide show
  1. checksums.yaml +4 -4
  2. metadata +30 -514
  3. data/.circleci/config.yml +0 -57
  4. data/.erb-lint.yml +0 -22
  5. data/.eslintrc +0 -5
  6. data/.gem_release.yml +0 -5
  7. data/.github/pull_request_template.md +0 -28
  8. data/.github/stale.yml +0 -17
  9. data/.gitignore +0 -17
  10. data/.hound.yml +0 -16
  11. data/.rspec +0 -2
  12. data/.rubocop.yml +0 -19
  13. data/.rubocop_todo.yml +0 -229
  14. data/.scss-lint.yml +0 -4
  15. data/Gemfile +0 -34
  16. data/LICENSE +0 -26
  17. data/README.md +0 -69
  18. data/Rakefile +0 -6
  19. data/app/assets/config/solidus_starter_frontend_manifest.js +0 -2
  20. data/app/assets/javascripts/spree/frontend/cart.js +0 -26
  21. data/app/assets/javascripts/spree/frontend/checkout/address.js +0 -124
  22. data/app/assets/javascripts/spree/frontend/checkout/payment.js +0 -44
  23. data/app/assets/javascripts/spree/frontend/checkout.js +0 -34
  24. data/app/assets/javascripts/spree/frontend/locale_selector.js +0 -9
  25. data/app/assets/javascripts/spree/frontend/product.js +0 -21
  26. data/app/assets/javascripts/spree/frontend/solidus_starter_frontend.js +0 -9
  27. data/app/assets/javascripts/spree/frontend/utils.js.erb +0 -18
  28. data/app/assets/javascripts/spree/frontend.js +0 -6
  29. data/app/assets/stylesheets/spree/frontend/base/_base.scss +0 -29
  30. data/app/assets/stylesheets/spree/frontend/base/_reset.scss +0 -179
  31. data/app/assets/stylesheets/spree/frontend/base/_responsive.scss +0 -21
  32. data/app/assets/stylesheets/spree/frontend/components/account/_account_order.scss +0 -23
  33. data/app/assets/stylesheets/spree/frontend/components/account/_account_summary.scss +0 -17
  34. data/app/assets/stylesheets/spree/frontend/components/auth/_auth_container.scss +0 -11
  35. data/app/assets/stylesheets/spree/frontend/components/auth/_auth_form.scss +0 -5
  36. data/app/assets/stylesheets/spree/frontend/components/brand/_logo.scss +0 -4
  37. data/app/assets/stylesheets/spree/frontend/components/buttons/_button_inline.scss +0 -8
  38. data/app/assets/stylesheets/spree/frontend/components/buttons/_button_primary.scss +0 -26
  39. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_adjustments.scss +0 -6
  40. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_amount_row.scss +0 -11
  41. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_empty.scss +0 -10
  42. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_footer.scss +0 -20
  43. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_header.scss +0 -12
  44. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_item.scss +0 -86
  45. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_link.scss +0 -22
  46. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_page.scss +0 -15
  47. data/app/assets/stylesheets/spree/frontend/components/cart/_cart_secondary_actions.scss +0 -19
  48. data/app/assets/stylesheets/spree/frontend/components/cart/_coupon_code.scss +0 -8
  49. data/app/assets/stylesheets/spree/frontend/components/cart/_item_info.scss +0 -19
  50. data/app/assets/stylesheets/spree/frontend/components/checkout/_checkout.scss +0 -27
  51. data/app/assets/stylesheets/spree/frontend/components/checkout/_checkout_header.scss +0 -19
  52. data/app/assets/stylesheets/spree/frontend/components/checkout/_checkout_summary.scss +0 -31
  53. data/app/assets/stylesheets/spree/frontend/components/checkout/_existing_cards.scss +0 -27
  54. data/app/assets/stylesheets/spree/frontend/components/checkout/_payment_method_controls.scss +0 -5
  55. data/app/assets/stylesheets/spree/frontend/components/checkout/_payment_method_selector.scss +0 -14
  56. data/app/assets/stylesheets/spree/frontend/components/checkout/_progress_steps.scss +0 -38
  57. data/app/assets/stylesheets/spree/frontend/components/checkout/_proposed_shipment.scss +0 -18
  58. data/app/assets/stylesheets/spree/frontend/components/checkout/_shipment_items.scss +0 -50
  59. data/app/assets/stylesheets/spree/frontend/components/checkout/_shipping_methods.scss +0 -9
  60. data/app/assets/stylesheets/spree/frontend/components/checkout/payments/_gateway_payment_method.scss +0 -11
  61. data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_address_step.scss +0 -20
  62. data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_confirm_step.scss +0 -13
  63. data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_delivery_step.scss +0 -13
  64. data/app/assets/stylesheets/spree/frontend/components/checkout/steps/_payment_step.scss +0 -13
  65. data/app/assets/stylesheets/spree/frontend/components/forms/_address_inputs.scss +0 -13
  66. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_checkbox_input.scss +0 -3
  67. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_radio_input.scss +0 -3
  68. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_select_input.scss +0 -27
  69. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_text.scss +0 -32
  70. data/app/assets/stylesheets/spree/frontend/components/forms/inputs/_textarea_input.scss +0 -25
  71. data/app/assets/stylesheets/spree/frontend/components/general/_flash.scss +0 -20
  72. data/app/assets/stylesheets/spree/frontend/components/layout/_aside.scss +0 -4
  73. data/app/assets/stylesheets/spree/frontend/components/layout/_breadcrumbs.scss +0 -16
  74. data/app/assets/stylesheets/spree/frontend/components/layout/_category_navigation.scss +0 -3
  75. data/app/assets/stylesheets/spree/frontend/components/layout/_footer.scss +0 -8
  76. data/app/assets/stylesheets/spree/frontend/components/layout/_header.scss +0 -12
  77. data/app/assets/stylesheets/spree/frontend/components/layout/_horizontal_input_group.scss +0 -7
  78. data/app/assets/stylesheets/spree/frontend/components/layout/_top_bar.scss +0 -44
  79. data/app/assets/stylesheets/spree/frontend/components/navigation/_auth_link.scss +0 -11
  80. data/app/assets/stylesheets/spree/frontend/components/navigation/_categories.scss +0 -29
  81. data/app/assets/stylesheets/spree/frontend/components/navigation/_locale_selector.scss +0 -21
  82. data/app/assets/stylesheets/spree/frontend/components/navigation/_taxonomies.scss +0 -7
  83. data/app/assets/stylesheets/spree/frontend/components/navigation/_taxonomy.scss +0 -28
  84. data/app/assets/stylesheets/spree/frontend/components/orders/_address_overview.scss +0 -27
  85. data/app/assets/stylesheets/spree/frontend/components/orders/_coupon_codes.scss +0 -4
  86. data/app/assets/stylesheets/spree/frontend/components/orders/_line_items.scss +0 -20
  87. data/app/assets/stylesheets/spree/frontend/components/orders/_order_details.scss +0 -18
  88. data/app/assets/stylesheets/spree/frontend/components/orders/_order_item.scss +0 -85
  89. data/app/assets/stylesheets/spree/frontend/components/orders/_order_page.scss +0 -41
  90. data/app/assets/stylesheets/spree/frontend/components/orders/_order_shipments.scss +0 -27
  91. data/app/assets/stylesheets/spree/frontend/components/orders/_payment_info.scss +0 -29
  92. data/app/assets/stylesheets/spree/frontend/components/presentation/_hero.scss +0 -18
  93. data/app/assets/stylesheets/spree/frontend/components/products/_product_card.scss +0 -35
  94. data/app/assets/stylesheets/spree/frontend/components/products/_product_image.scss +0 -7
  95. data/app/assets/stylesheets/spree/frontend/components/products/_product_info.scss +0 -14
  96. data/app/assets/stylesheets/spree/frontend/components/products/_product_page.scss +0 -31
  97. data/app/assets/stylesheets/spree/frontend/components/products/_product_properties.scss +0 -23
  98. data/app/assets/stylesheets/spree/frontend/components/products/_product_submit.scss +0 -9
  99. data/app/assets/stylesheets/spree/frontend/components/products/_product_taxons.scss +0 -27
  100. data/app/assets/stylesheets/spree/frontend/components/products/_product_thumbnails.scss +0 -7
  101. data/app/assets/stylesheets/spree/frontend/components/products/_product_variants.scss +0 -20
  102. data/app/assets/stylesheets/spree/frontend/components/products/_products.scss +0 -13
  103. data/app/assets/stylesheets/spree/frontend/components/products/_products_by_taxon.scss +0 -6
  104. data/app/assets/stylesheets/spree/frontend/components/products/_products_grid.scss +0 -18
  105. data/app/assets/stylesheets/spree/frontend/components/search/_filter.scss +0 -32
  106. data/app/assets/stylesheets/spree/frontend/components/search/_search_bar.scss +0 -34
  107. data/app/assets/stylesheets/spree/frontend/components/typography/_hero_title.scss +0 -6
  108. data/app/assets/stylesheets/spree/frontend/components/typography/_subtitle.scss +0 -7
  109. data/app/assets/stylesheets/spree/frontend/placeholders/main.scss +0 -5
  110. data/app/assets/stylesheets/spree/frontend/screen.scss +0 -89
  111. data/app/assets/stylesheets/spree/frontend/solidus_starter_frontend.css +0 -7
  112. data/app/assets/stylesheets/spree/frontend/variables/_colors.scss +0 -20
  113. data/app/assets/stylesheets/spree/frontend.css +0 -8
  114. data/app/controllers/concerns/solidus_starter_frontend/auth_views.rb +0 -16
  115. data/app/controllers/concerns/solidus_starter_frontend/taxonomies.rb +0 -16
  116. data/app/controllers/spree/checkout_controller.rb +0 -249
  117. data/app/controllers/spree/coupon_codes_controller.rb +0 -35
  118. data/app/controllers/spree/home_controller.rb +0 -13
  119. data/app/controllers/spree/locale_controller.rb +0 -20
  120. data/app/controllers/spree/orders_controller.rb +0 -126
  121. data/app/controllers/spree/products_controller.rb +0 -51
  122. data/app/controllers/spree/store_controller.rb +0 -31
  123. data/app/controllers/spree/taxons_controller.rb +0 -30
  124. data/app/helpers/spree/orders_helper.rb +0 -18
  125. data/app/helpers/spree/taxon_filters_helper.rb +0 -13
  126. data/app/views/spree/address/_form_hidden.html.erb +0 -12
  127. data/app/views/spree/checkout/_terms_and_conditions.en.html.erb +0 -1
  128. data/app/views/spree/checkout/edit.html.erb +0 -16
  129. data/app/views/spree/checkout/existing_payment/_gateway.html.erb +0 -9
  130. data/app/views/spree/checkout/payment/_check.html.erb +0 -0
  131. data/app/views/spree/checkout/payment/_gateway.html.erb +0 -43
  132. data/app/views/spree/components/auth/_change_form.html.erb +0 -40
  133. data/app/views/spree/components/auth/_forgot_form.html.erb +0 -28
  134. data/app/views/spree/components/auth/_guest_form.html.erb +0 -31
  135. data/app/views/spree/components/auth/_login_form.html.erb +0 -42
  136. data/app/views/spree/components/auth/_signup_form.html.erb +0 -48
  137. data/app/views/spree/components/brand/_logo.html.erb +0 -3
  138. data/app/views/spree/components/buttons/_button_inline.html.erb +0 -23
  139. data/app/views/spree/components/buttons/_button_primary.html.erb +0 -29
  140. data/app/views/spree/components/cart/_cart_adjustment.html.erb +0 -15
  141. data/app/views/spree/components/cart/_cart_adjustments.html.erb +0 -47
  142. data/app/views/spree/components/cart/_cart_amount_row.html.erb +0 -12
  143. data/app/views/spree/components/cart/_cart_empty.html.erb +0 -9
  144. data/app/views/spree/components/cart/_cart_footer.html.erb +0 -15
  145. data/app/views/spree/components/cart/_cart_header.html.erb +0 -17
  146. data/app/views/spree/components/cart/_cart_item.html.erb +0 -52
  147. data/app/views/spree/components/cart/_cart_items.html.erb +0 -23
  148. data/app/views/spree/components/cart/_cart_link.html.erb +0 -9
  149. data/app/views/spree/components/cart/_cart_secondary_actions.html.erb +0 -17
  150. data/app/views/spree/components/cart/_item_info.html.erb +0 -26
  151. data/app/views/spree/components/checkout/_checkout_header.html.erb +0 -8
  152. data/app/views/spree/components/checkout/_checkout_step.html.erb +0 -21
  153. data/app/views/spree/components/checkout/_checkout_summary.html.erb +0 -70
  154. data/app/views/spree/components/checkout/_existing_cards.html.erb +0 -39
  155. data/app/views/spree/components/checkout/_payment_method_controls.html.erb +0 -10
  156. data/app/views/spree/components/checkout/_payment_method_selector.html.erb +0 -14
  157. data/app/views/spree/components/checkout/_proposed_shipment.erb +0 -18
  158. data/app/views/spree/components/checkout/_shipment_items.html.erb +0 -22
  159. data/app/views/spree/components/checkout/_shipping_methods.html.erb +0 -20
  160. data/app/views/spree/components/checkout/_unshippable_items.html.erb +0 -7
  161. data/app/views/spree/components/checkout/steps/_address_step.html.erb +0 -60
  162. data/app/views/spree/components/checkout/steps/_confirm_step.html.erb +0 -31
  163. data/app/views/spree/components/checkout/steps/_delivery_step.html.erb +0 -31
  164. data/app/views/spree/components/checkout/steps/_payment_step.html.erb +0 -25
  165. data/app/views/spree/components/forms/_address_inputs.html.erb +0 -152
  166. data/app/views/spree/components/forms/inputs/_checkbox_input.html.erb +0 -29
  167. data/app/views/spree/components/forms/inputs/_collection_select.html.erb +0 -42
  168. data/app/views/spree/components/forms/inputs/_radio_input.html.erb +0 -29
  169. data/app/views/spree/components/forms/inputs/_select_input.html.erb +0 -31
  170. data/app/views/spree/components/forms/inputs/_text.html.erb +0 -54
  171. data/app/views/spree/components/forms/inputs/_textarea_input.html.erb +0 -42
  172. data/app/views/spree/components/layout/_category_navigation.html.erb +0 -3
  173. data/app/views/spree/components/layout/_footer.html.erb +0 -7
  174. data/app/views/spree/components/layout/_header.html.erb +0 -8
  175. data/app/views/spree/components/layout/_top_bar.html.erb +0 -8
  176. data/app/views/spree/components/navigation/_auth_link.html.erb +0 -1
  177. data/app/views/spree/components/navigation/_breadcrumbs.html.erb +0 -47
  178. data/app/views/spree/components/navigation/_categories.html.erb +0 -12
  179. data/app/views/spree/components/navigation/_locale_selector.html.erb +0 -25
  180. data/app/views/spree/components/navigation/_taxonomies.html.erb +0 -17
  181. data/app/views/spree/components/navigation/_taxons.html.erb +0 -17
  182. data/app/views/spree/components/navigation/_taxons_tree.html.erb +0 -29
  183. data/app/views/spree/components/orders/_address_overview.html.erb +0 -40
  184. data/app/views/spree/components/orders/_coupon_code.html.erb +0 -22
  185. data/app/views/spree/components/orders/_line_items.html.erb +0 -55
  186. data/app/views/spree/components/orders/_order_details.html.erb +0 -35
  187. data/app/views/spree/components/orders/_order_item.html.erb +0 -33
  188. data/app/views/spree/components/orders/_order_items.html.erb +0 -5
  189. data/app/views/spree/components/orders/_order_shipments.html.erb +0 -25
  190. data/app/views/spree/components/orders/_payment_info.html.erb +0 -31
  191. data/app/views/spree/components/presentation/_hero.html.erb +0 -14
  192. data/app/views/spree/components/products/_product-card.html.erb +0 -36
  193. data/app/views/spree/components/products/_product_availability.html.erb +0 -19
  194. data/app/views/spree/components/products/_product_form.html.erb +0 -21
  195. data/app/views/spree/components/products/_product_image.html.erb +0 -6
  196. data/app/views/spree/components/products/_product_info.html.erb +0 -9
  197. data/app/views/spree/components/products/_product_promotions.html.erb +0 -25
  198. data/app/views/spree/components/products/_product_properties.html.erb +0 -19
  199. data/app/views/spree/components/products/_product_submit.html.erb +0 -39
  200. data/app/views/spree/components/products/_product_taxons.html.erb +0 -15
  201. data/app/views/spree/components/products/_product_thumbnails.html.erb +0 -19
  202. data/app/views/spree/components/products/_product_variants.html.erb +0 -36
  203. data/app/views/spree/components/products/_products-grid.html.erb +0 -13
  204. data/app/views/spree/components/products/_products.html.erb +0 -28
  205. data/app/views/spree/components/products/_products_by_taxon.html.erb +0 -7
  206. data/app/views/spree/components/products/_variants_list.html.erb +0 -12
  207. data/app/views/spree/components/search/_filter.html.erb +0 -42
  208. data/app/views/spree/components/search/_filters.html.erb +0 -20
  209. data/app/views/spree/components/search/_form.html.erb +0 -12
  210. data/app/views/spree/components/search/_products_search.html.erb +0 -36
  211. data/app/views/spree/components/search/_search_bar.html.erb +0 -36
  212. data/app/views/spree/components/typography/_hero_title.html.erb +0 -11
  213. data/app/views/spree/components/typography/_subtitle.html.erb +0 -11
  214. data/app/views/spree/home/index.html.erb +0 -7
  215. data/app/views/spree/layouts/spree_application.html.erb +0 -27
  216. data/app/views/spree/orders/edit.html.erb +0 -21
  217. data/app/views/spree/orders/show.html.erb +0 -29
  218. data/app/views/spree/products/index.html.erb +0 -22
  219. data/app/views/spree/products/show.html.erb +0 -18
  220. data/app/views/spree/shared/_image.html.erb +0 -12
  221. data/app/views/spree/shared/_link_to_cart.html.erb +0 -1
  222. data/app/views/spree/shared/_login_bar_items.html.erb +0 -1
  223. data/app/views/spree/shared/_shipment_tracking.html.erb +0 -11
  224. data/app/views/spree/shared/unauthorized.html.erb +0 -0
  225. data/app/views/spree/taxons/show.html.erb +0 -17
  226. data/bin/console +0 -17
  227. data/bin/r +0 -13
  228. data/bin/rails +0 -7
  229. data/bin/rake +0 -7
  230. data/bin/rspec +0 -29
  231. data/bin/sandbox +0 -84
  232. data/bin/sandbox_rails +0 -18
  233. data/bin/setup +0 -8
  234. data/bin/solidus_compare +0 -155
  235. data/config/initializers/assets.rb +0 -1
  236. data/config/initializers/canonical_rails.rb +0 -16
  237. data/config/locales/en.yml +0 -5
  238. data/config/routes.rb +0 -33
  239. data/config/solidus_compare.yml +0 -33
  240. data/docs/development.md +0 -28
  241. data/exe/solidus_starter_frontend +0 -9
  242. data/lib/generators/solidus_starter_frontend/install/install_generator.rb +0 -15
  243. data/lib/generators/solidus_starter_frontend/solidus_starter_frontend_generator.rb +0 -30
  244. data/lib/generators/solidus_starter_frontend/views/override_generator.rb +0 -50
  245. data/lib/solidus_starter_frontend/config.rb +0 -7
  246. data/lib/solidus_starter_frontend/engine.rb +0 -34
  247. data/lib/solidus_starter_frontend/factories.rb +0 -4
  248. data/lib/solidus_starter_frontend/solidus_support_extensions.rb +0 -9
  249. data/lib/solidus_starter_frontend/version.rb +0 -5
  250. data/lib/solidus_starter_frontend.rb +0 -12
  251. data/lib/solidus_starter_frontend_configuration.rb +0 -8
  252. data/lib/views/auth/spree/checkout/registration.html.erb +0 -7
  253. data/lib/views/auth/spree/components/navigation/_auth_link.html.erb +0 -5
  254. data/lib/views/auth/spree/user_passwords/edit.html.erb +0 -7
  255. data/lib/views/auth/spree/user_passwords/new.html.erb +0 -5
  256. data/lib/views/auth/spree/user_registrations/new.html.erb +0 -7
  257. data/lib/views/auth/spree/user_sessions/guest.html.erb +0 -5
  258. data/lib/views/auth/spree/user_sessions/new.html.erb +0 -7
  259. data/lib/views/auth/spree/users/edit.html.erb +0 -45
  260. data/lib/views/auth/spree/users/show.html.erb +0 -55
  261. data/solidus_starter_frontend.gemspec +0 -43
  262. data/spec/controllers/controller_helpers_spec.rb +0 -29
  263. data/spec/controllers/locale_controller_spec.rb +0 -57
  264. data/spec/controllers/spree/checkout_controller_spec.rb +0 -563
  265. data/spec/controllers/spree/checkout_controller_with_views_spec.rb +0 -37
  266. data/spec/controllers/spree/current_order_tracking_spec.rb +0 -33
  267. data/spec/controllers/spree/home_controller_spec.rb +0 -29
  268. data/spec/controllers/spree/orders_controller_ability_spec.rb +0 -90
  269. data/spec/controllers/spree/orders_controller_spec.rb +0 -241
  270. data/spec/controllers/spree/orders_controller_transitions_spec.rb +0 -33
  271. data/spec/controllers/spree/products_controller_spec.rb +0 -38
  272. data/spec/controllers/spree/taxons_controller_spec.rb +0 -14
  273. data/spec/fixtures/thinking-cat.jpg +0 -0
  274. data/spec/generators/solidus/views/override_generator_spec.rb +0 -50
  275. data/spec/helpers/base_helper_spec.rb +0 -13
  276. data/spec/helpers/order_helper_spec.rb +0 -14
  277. data/spec/helpers/taxon_filters_helper_spec.rb +0 -12
  278. data/spec/spec_helper.rb +0 -64
  279. data/spec/support/shared_contexts/checkout_setup.rb +0 -12
  280. data/spec/support/shared_contexts/custom_products.rb +0 -28
  281. data/spec/support/shared_contexts/locales.rb +0 -16
  282. data/spec/system/address_spec.rb +0 -87
  283. data/spec/system/automatic_promotion_adjustments_spec.rb +0 -49
  284. data/spec/system/caching/products_spec.rb +0 -48
  285. data/spec/system/caching/taxons_spec.rb +0 -35
  286. data/spec/system/cart_spec.rb +0 -81
  287. data/spec/system/checkout_confirm_insufficient_stock_spec.rb +0 -71
  288. data/spec/system/checkout_spec.rb +0 -699
  289. data/spec/system/checkout_unshippable_spec.rb +0 -37
  290. data/spec/system/coupon_code_spec.rb +0 -267
  291. data/spec/system/currency_spec.rb +0 -20
  292. data/spec/system/first_order_promotion_spec.rb +0 -59
  293. data/spec/system/free_shipping_promotions_spec.rb +0 -60
  294. data/spec/system/locale_spec.rb +0 -26
  295. data/spec/system/order_spec.rb +0 -57
  296. data/spec/system/products_spec.rb +0 -302
  297. data/spec/system/promotion_code_invalidation_spec.rb +0 -54
  298. data/spec/system/quantity_promotions_spec.rb +0 -130
  299. data/spec/system/taxons_spec.rb +0 -158
  300. data/spec/system/template_rendering_spec.rb +0 -20
  301. data/spec/views/spree/checkout/_summary_spec.rb +0 -11
data/bin/r DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails gems
3
- # installed from the root of your application.
4
-
5
- ENGINE_ROOT = File.expand_path('..', __dir__)
6
- ENGINE_PATH = File.expand_path('../lib/solidus_starter_frontend/engine', __dir__)
7
-
8
- # Set up gems listed in the Gemfile.
9
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
10
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
11
-
12
- require 'rails/all'
13
- require 'rails/engine/commands'
data/bin/rails DELETED
@@ -1,7 +0,0 @@
1
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
2
-
3
- ENGINE_ROOT = File.expand_path('../..', __FILE__)
4
- ENGINE_PATH = File.expand_path('../../lib/solidus_starter_frontend/engine', __FILE__)
5
-
6
- require 'rails/all'
7
- require 'rails/engine/commands'
data/bin/rake DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "rubygems"
5
- require "bundler/setup"
6
-
7
- load Gem.bin_path("rake", "rake")
data/bin/rspec DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rspec' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("rspec-core", "rspec")
data/bin/sandbox DELETED
@@ -1,84 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -e
4
-
5
- case "$DB" in
6
- postgres|postgresql)
7
- RAILSDB="postgresql"
8
- ;;
9
- mysql)
10
- RAILSDB="mysql"
11
- ;;
12
- sqlite|'')
13
- RAILSDB="sqlite3"
14
- ;;
15
- *)
16
- echo "Invalid DB specified: $DB"
17
- exit 1
18
- ;;
19
- esac
20
-
21
- if [ ! -z $SOLIDUS_BRANCH ]
22
- then
23
- BRANCH=$SOLIDUS_BRANCH
24
- else
25
- BRANCH="master"
26
- fi
27
-
28
- extension_name="solidus_starter_frontend"
29
-
30
- # Stay away from the bundler env of the containing extension.
31
- function unbundled {
32
- ruby -rbundler -e'b = proc {system *ARGV}; Bundler.respond_to?(:with_unbundled_env) ? Bundler.with_unbundled_env(&b) : Bundler.with_clean_env(&b)' -- $@
33
- }
34
-
35
- rm -rf ./sandbox
36
- unbundled bundle exec rails new sandbox --database="$RAILSDB" \
37
- --skip-bundle \
38
- --skip-git \
39
- --skip-keeps \
40
- --skip-rc \
41
- --skip-spring \
42
- --skip-test \
43
- --skip-javascript
44
-
45
- if [ ! -d "sandbox" ]; then
46
- echo 'sandbox rails application failed'
47
- exit 1
48
- fi
49
-
50
- cd ./sandbox
51
- cat <<RUBY >> Gemfile
52
- gem 'solidus', github: 'solidusio/solidus', branch: '$BRANCH'
53
- gem 'solidus_auth_devise', '>= 2.1.0'
54
- gem 'rails-i18n'
55
- gem 'solidus_i18n'
56
-
57
- gem '$extension_name', path: '..'
58
-
59
- group :test, :development do
60
- platforms :mri do
61
- gem 'pry-byebug'
62
- end
63
- end
64
- RUBY
65
-
66
- unbundled bundle install --gemfile Gemfile
67
-
68
- unbundled bundle exec rake db:drop db:create
69
-
70
- unbundled bundle exec rails generate spree:install \
71
- --auto-accept \
72
- --user_class=Spree::User \
73
- --enforce_available_locales=true \
74
- --with-authentication=false \
75
- $@
76
-
77
- unbundled bundle exec rails generate solidus:auth:install
78
-
79
- echo
80
- echo "🚀 Sandbox app successfully created for $extension_name!"
81
- echo "🚀 Using $RAILSDB and Solidus $BRANCH"
82
- echo "🚀 Use 'export DB=[postgres|mysql|sqlite]' to control the DB adapter"
83
- echo "🚀 Use 'export SOLIDUS_BRANCH=<BRANCH-NAME>' to control the Solidus version"
84
- echo "🚀 This app is intended for test purposes."
data/bin/sandbox_rails DELETED
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # frozen_string_literal: true
4
-
5
- app_root = 'sandbox'
6
-
7
- unless File.exist? "#{app_root}/bin/rails"
8
- warn 'Creating the sandbox app...'
9
- Dir.chdir "#{__dir__}/.." do
10
- system "#{__dir__}/sandbox" or begin # rubocop:disable Style/AndOr
11
- warn 'Automatic creation of the sandbox app failed'
12
- exit 1
13
- end
14
- end
15
- end
16
-
17
- Dir.chdir app_root
18
- exec 'bin/rails', *ARGV
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- gem install bundler --conservative
7
- bundle update
8
- bin/rake clobber
data/bin/solidus_compare DELETED
@@ -1,155 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # frozen_string_literal: true
4
-
5
- require 'json'
6
- require 'pathname'
7
- require 'time'
8
- require 'yaml'
9
- require 'zlib'
10
-
11
- CONFIG_PATH = 'config/solidus_compare.yml'
12
-
13
- @config = {}
14
- @cmd_options = {}
15
- ARGV.each do |arg|
16
- case arg
17
- when '-h', '--help'
18
- puts <<~HELP
19
- Solidus Compare: a tool to detect changes between 2 repositories
20
-
21
- Options:
22
- -h or --help : show this help
23
- -s or --summary : generate an XML summary of the files changed (used in CI)
24
- -u or --update-ignore : update the config file setting the current hashes to ignore
25
- HELP
26
- exit 0
27
- when '-s', '--summary'
28
- @cmd_options[:summary] = true
29
- when '-u', '--update-ignore'
30
- @cmd_options[:update] = true
31
- end
32
- end
33
-
34
- # ---------------------------------------------------------------------------- #
35
-
36
- def generate_comparison(report)
37
- report.each do |data|
38
- conf = @config['ignore'].find { |cfg| cfg['path'] == data['path'] }
39
- diffs = conf ? (conf['diffs'] || []) : []
40
- data['diffs'].each do |result|
41
- info = diffs.find { |diff| diff['file'] == result['file'] } || {}
42
- if info['skip']
43
- result['skip'] = true
44
- result.delete 'hash'
45
- next
46
- elsif info['hash'] == result['hash']
47
- next
48
- end
49
-
50
- puts result['diff']
51
- end
52
- end
53
- update_ignore(report) if @cmd_options[:update]
54
- end
55
-
56
- def generate_summary(report) # rubocop:disable Metrics/MethodLength
57
- summary = {}
58
- report.each do |data|
59
- path = data['path']
60
- conf = @config['ignore'].find { |cfg| cfg['path'] == path }
61
- diffs = conf ? (conf['diffs'] || []) : []
62
- data['diffs'].each do |result|
63
- info = diffs.find { |diff| diff['file'] == result['file'] } || {}
64
- next if info['skip'] || info['hash'] == result['hash']
65
-
66
- (summary[path] ||= {})[result['hash']] = result['file']
67
- end
68
- end
69
-
70
- count = 0
71
- testcases = summary.map do |file_path, value|
72
- value.map do |hash, file|
73
- count += 1
74
- full_path = Pathname.new(file_path).join(file).to_s
75
- "<testcase name=\"#{file}\" file=\"#{full_path}\" time=\"0\"><failure>hash: #{hash}\nfile: #{file}</failure></testcase>"
76
- end
77
- end.join("\n")
78
-
79
- output = <<~SUMMARY
80
- <?xml version="1.0" encoding="UTF-8"?>
81
- <testsuite name="solidus_compare" tests="#{count}" skipped="0" failures="#{count}" errors="#{count}" time="1" timestamp="#{Time.now.iso8601}">
82
- #{testcases}
83
- </testsuite>
84
- SUMMARY
85
- puts output
86
-
87
- exit 1 if count.positive?
88
- end
89
-
90
- def load_config
91
- @config = YAML.load_file(CONFIG_PATH) if File.exist?(CONFIG_PATH)
92
- @config ||= {}
93
- @config['ignore'] ||= []
94
- @config['project_paths'] ||= []
95
- @config['source_repo'] ||= 'https://github.com/solidusio/solidus.git'
96
- @config['source_name'] ||= 'solidus'
97
- @config['source_branch'] ||= 'master'
98
- @config['source_base_path'] ||= 'frontend/'
99
- end
100
-
101
- def solidus_compare
102
- report = @config['project_paths'].map do |path|
103
- remote_source = "remotes/#{@config['source_name']}/#{@config['source_branch']}"
104
- remote_path = "#{@config['source_base_path']}#{path}"
105
- result = `git diff "#{remote_source}" -- "#{remote_path}" "#{path}"`
106
- puts("error with git diff #{path}") & exit if $?.exitstatus != 0
107
-
108
- result.gsub!(/index\s[\w\d]+\.\.[\w\d]+\s[\w\d]+\n/, '')
109
- diffs = result.split(/diff --git /)[1..-1]
110
- next unless diffs
111
-
112
- {
113
- 'path' => path,
114
- 'diffs' => diffs.map do |diff|
115
- next if diff.include? 'similarity index 100%'
116
-
117
- {
118
- 'hash' => Zlib.crc32(diff),
119
- 'file' => diff.match(%r{a/([^\s]+)})&.send(:[], 1),
120
- 'diff' => 'diff --git ' + diff
121
- }
122
- end.compact
123
- }
124
-
125
- # end
126
- end.compact
127
-
128
- @cmd_options[:summary] ? generate_summary(report) : generate_comparison(report)
129
- end
130
-
131
- def update_ignore(report)
132
- report.each do |data|
133
- data['diffs'].each do |result|
134
- result.delete('diff')
135
- end
136
- end.compact
137
- @config['ignore'] = report
138
- File.open(CONFIG_PATH, 'w') { |f| f.puts(@config.to_yaml) }
139
- end
140
-
141
- def update_source
142
- if `git remote`.split("\n").none? @config['source_name']
143
- `git remote add -f #{@config['source_name']} #{@config['source_repo']}`
144
- puts('error with git remote add') & exit if $?.exitstatus != 0
145
- end
146
-
147
- `git remote update > /dev/null 2>&1`
148
- puts('error with git remote update') & exit if $?.exitstatus != 0
149
- end
150
-
151
- # ---------------------------------------------------------------------------- #
152
-
153
- load_config
154
- update_source
155
- solidus_compare
@@ -1 +0,0 @@
1
- Rails.application.config.assets.precompile << 'solidus_starter_frontend_manifest.js'
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- CanonicalRails.setup do |config|
4
- # http://en.wikipedia.org/wiki/URL_normalization
5
- # Trailing slash represents semantics of a directory, ie a collection view - implying an :index get route;
6
- # otherwise we have to assume semantics of an instance of a resource type, a member view - implying a :show get route
7
- #
8
- # Acts as a whitelist for routes to have trailing slashes
9
-
10
- config.collection_actions # = [:index]
11
-
12
- # Parameter spamming can cause index dilution by creating seemingly different URLs with identical or near-identical content.
13
- # Unless whitelisted, these parameters will be omitted
14
-
15
- config.whitelisted_parameters = [:keywords, :page, :search, :taxon]
16
- end
@@ -1,5 +0,0 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- hello: Hello world
data/config/routes.rb DELETED
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Spree::Core::Engine.routes.draw do
4
- root to: 'home#index'
5
-
6
- resources :products, only: [:index, :show]
7
-
8
- get '/locale/set', to: 'locale#set'
9
- post '/locale/set', to: 'locale#set', as: :select_locale
10
-
11
- # non-restful checkout stuff
12
- patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
13
- get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
14
- get '/checkout', to: 'checkout#edit', as: :checkout
15
-
16
- get '/orders/populate', to: 'orders#populate_redirect'
17
- get '/orders/:id/token/:token' => 'orders#show', as: :token_order
18
-
19
- resources :orders, except: [:index, :new, :create, :destroy] do
20
- post :populate, on: :collection
21
- resources :coupon_codes, only: :create
22
- end
23
-
24
- get '/cart', to: 'orders#edit', as: :cart
25
- patch '/cart', to: 'orders#update', as: :update_cart
26
- put '/cart/empty', to: 'orders#empty', as: :empty_cart
27
-
28
- # route globbing for pretty nested taxon and product paths
29
- get '/t/*id', to: 'taxons#show', as: :nested_taxons
30
-
31
- get '/unauthorized', to: 'home#unauthorized', as: :unauthorized
32
- get '/cart_link', to: 'store#cart_link', as: :cart_link
33
- end
@@ -1,33 +0,0 @@
1
- ---
2
- project_paths:
3
- - app/controllers
4
- - app/helpers
5
- source_repo: https://github.com/solidusio/solidus.git
6
- source_name: solidus
7
- source_branch: master
8
- source_base_path: frontend/
9
- ignore:
10
- - path: app/controllers
11
- diffs:
12
- - file: app/controllers/concerns/solidus_starter_frontend/auth_views.rb
13
- skip: true
14
- - file: app/controllers/concerns/solidus_starter_frontend/taxonomies.rb
15
- skip: true
16
- - hash: 2722004413
17
- file: frontend/app/controllers/spree/checkout_controller.rb
18
- - hash: 1422395649
19
- file: frontend/app/controllers/spree/coupon_codes_controller.rb
20
- - hash: 2175977023
21
- file: frontend/app/controllers/spree/home_controller.rb
22
- - hash: 2194836599
23
- file: frontend/app/controllers/spree/orders_controller.rb
24
- - hash: 61096156
25
- file: frontend/app/controllers/spree/products_controller.rb
26
- - hash: 2154899617
27
- file: frontend/app/controllers/spree/store_controller.rb
28
- - hash: 910927973
29
- file: frontend/app/controllers/spree/taxons_controller.rb
30
- - hash: 3582561552
31
- file: frontend/app/controllers/spree/content_controller.rb
32
- - path: app/helpers
33
- diffs: []
data/docs/development.md DELETED
@@ -1,28 +0,0 @@
1
- # Solidus Starter Frontend development information
2
- This document aims to give some extra information for developers that are going
3
- to contribute to our `solidus_starter_frontend` component.
4
-
5
- ## Solidus Compare tool
6
- `solidus_compare` is a tool that we created to keep track of the changes made to
7
- [solidus_frontend](https://github.com/solidusio/solidus/tree/master/frontend),
8
- which we used as source project in the beginning.
9
-
10
- It is connected to our CI; when a new PR is opened, if a change is detected on
11
- Solidus Frontend, the workflow will fail and it will report the files changed.
12
-
13
- In that case, it is needed to evaluate those changes and eventually apply them
14
- to our component. After this step, it is possible to mark those changes as
15
- "managed".
16
-
17
- In practical terms:
18
- - run locally `bin/solidus_compare` in any branch;
19
- - evaluate the diff of the changes shown in the console;
20
- - apply the required changes (if they are useful to the project);
21
- - run `bin/solidus_compare -u` which will update the hashes in the config file;
22
- - commit the changes and check the CI.
23
-
24
- The tool internally works in this way:
25
- - configuration file is loaded (`config/solidus_compare.yml`);
26
- - remote GIT source is updated using the parameters provided by the config file;
27
- - compare process is executed and a hash for each file is calculated;
28
- - if they match the hashes saved in the configuration there are no differences.
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # frozen_string_literal: true
4
-
5
- require 'active_support'
6
- require 'rails/generators'
7
- require 'solidus_starter_frontend'
8
-
9
- Rails::Generators.invoke('solidus_starter_frontend')
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SolidusStarterFrontend
4
- module Generators
5
- class InstallGenerator < Rails::Generators::Base
6
- def add_javascripts
7
- append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/solidus_starter_frontend\n"
8
- end
9
-
10
- def add_stylesheets
11
- inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/solidus_starter_frontend\n", before: %r{\*/}, verbose: true
12
- end
13
- end
14
- end
15
- end
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class SolidusStarterFrontendGenerator < Rails::Generators::Base
4
- source_root File.expand_path('../../..', __dir__)
5
-
6
- def install
7
- # Copy directories
8
- directory 'app', 'app'
9
- directory 'lib/views', 'lib/views'
10
-
11
- # Copy files
12
- copy_file 'lib/solidus_starter_frontend/config.rb', 'lib/solidus_starter_frontend/config.rb'
13
- copy_file 'lib/solidus_starter_frontend_configuration.rb', 'lib/solidus_starter_frontend_configuration.rb'
14
-
15
- # Routes
16
- copy_file 'config/routes.rb', 'tmp/routes.rb'
17
- prepend_file 'config/routes.rb', File.read('tmp/routes.rb')
18
-
19
- # Gems
20
- gem 'canonical-rails'
21
- gem 'truncate_html'
22
-
23
- # Text updates
24
- append_file 'config/initializers/assets.rb', "Rails.application.config.assets.precompile += ['solidus_starter_frontend_manifest.js']"
25
- append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/solidus_starter_frontend\n"
26
- inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/solidus_starter_frontend\n", before: %r{\*/}, verbose: true
27
- inject_into_file 'config/initializers/spree.rb', "require_relative Rails.root.join('lib/solidus_starter_frontend/config')\n", before: /Spree.config do/, verbose: true
28
- gsub_file 'app/assets/stylesheets/application.css', '*= require_tree', '* OFF require_tree'
29
- end
30
- end
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rails'
4
- require 'rails/generators'
5
-
6
- module SolidusStarterFrontend
7
- module Views
8
- class OverrideGenerator < ::Rails::Generators::Base
9
- def self.views_folder
10
- Engine.root.join('app', 'views', 'spree')
11
- end
12
-
13
- VIEWS = Dir.glob(views_folder.join('**', '*'))
14
-
15
- desc "Override solidus frontend views in your app. You can either provide single files or complete folders."
16
-
17
- class_option :only,
18
- type: :string,
19
- default: nil,
20
- desc: "Name of file or folder to copy exclusively. Can be a substring."
21
-
22
- source_root views_folder
23
-
24
- def copy_views
25
- views_to_copy.each do |file|
26
- next if File.directory?(file)
27
-
28
- dest_file = Pathname.new(file).relative_path_from(source_dir)
29
- copy_file file, Rails.root.join('app', 'views', 'spree', dest_file)
30
- end
31
- end
32
-
33
- private
34
-
35
- def views_to_copy
36
- if @options['only']
37
- VIEWS.select do |view|
38
- Pathname.new(view).relative_path_from(source_dir).to_s.include?(@options['only'])
39
- end
40
- else
41
- VIEWS
42
- end
43
- end
44
-
45
- def source_dir
46
- self.class.views_folder
47
- end
48
- end
49
- end
50
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'solidus_starter_frontend_configuration'
4
-
5
- module SolidusStarterFrontend
6
- Config = SolidusStarterFrontendConfiguration.new
7
- end
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spree/core'
4
- require 'solidus_starter_frontend'
5
-
6
- module SolidusStarterFrontend
7
- class Engine < Rails::Engine
8
- isolate_namespace ::Spree
9
-
10
- engine_name 'solidus_starter_frontend'
11
-
12
- # use rspec for tests
13
- config.generators do |g|
14
- g.test_framework :rspec
15
- end
16
-
17
- config.to_prepare do
18
- if defined?(Spree::Auth::Engine)
19
- [
20
- Spree::UserConfirmationsController,
21
- Spree::UserPasswordsController,
22
- Spree::UserRegistrationsController,
23
- Spree::UserSessionsController,
24
- Spree::UsersController
25
- ].each do |auth_controller|
26
- auth_controller.include SolidusStarterFrontend::Taxonomies
27
- auth_controller.include SolidusStarterFrontend::AuthViews
28
- end
29
-
30
- Spree::StoreController.include SolidusStarterFrontend::AuthViews
31
- end
32
- end
33
- end
34
- end
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- FactoryBot.define do
4
- end
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'solidus_support'
4
-
5
- module SolidusSupport
6
- def self.frontend_available?
7
- true
8
- end
9
- end
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SolidusStarterFrontend
4
- VERSION = '0.1.0'
5
- end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rails/all'
4
- require 'canonical-rails'
5
-
6
- require 'solidus_core'
7
- require 'solidus_support'
8
-
9
- require 'solidus_starter_frontend/solidus_support_extensions'
10
- require 'solidus_starter_frontend/version'
11
- require 'solidus_starter_frontend/config'
12
- require 'solidus_starter_frontend/engine'
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class SolidusStarterFrontendConfiguration < Spree::Preferences::Configuration
4
- preference :locale, :string, default: I18n.default_locale
5
-
6
- # Add your terms and conditions in app/views/spree/checkout/_terms_and_conditions.en.html.erb
7
- preference :require_terms_and_conditions_acceptance, :boolean, default: false
8
- end
@@ -1,7 +0,0 @@
1
- <%= render partial: 'spree/shared/error_messages', locals: { target: @user } %>
2
-
3
- <%= render template: 'spree/user_sessions/new' %>
4
-
5
- <% if Spree::Config[:allow_guest_checkout] %>
6
- <%= render template: 'spree/user_sessions/guest' %>
7
- <% end %>
@@ -1,5 +0,0 @@
1
- <% if spree_current_user %>
2
- <%= link_to I18n.t('spree.my_account'), spree.account_path, class: 'auth-link' %>
3
- <% else %>
4
- <%= link_to I18n.t('spree.login'), spree.login_path, class: 'auth-link' %>
5
- <% end %>