This is a starting point for all Spree/Rails related projects at Spark Solutions, it contains:
- Ruby on Rails
- Spree Commerce
- Webpack via Webpacker gem
- React with Redux
- Docker
- bundler
- yarn
bin/setup
docker-compose run web rails c
Before running the test suite remember to fire up docker-compose (if it's not running already):
docker-compose run web bash
And after that you can just use plain normal rspec:
bundle exec rspec
Update Gemfile
and run:
bundle install
docker-compose build
You will need to restart the server if running:
docker-compose restart
bundle update spree
docker-compose build
Spree
- Spree-specific models, controllers, servicesSparkStarterKit
- all custom-made models, controllers, services specifically for SparkStarterKit application
Rather than writing decorators for Services please use dependency injecton.
All decorators should use Module.prepend
pattern.
-
Controllers
Place them in
app/controllers/spark_starter_kit/spree/home_controller_decorator.rb
, eg.module SparkStarterKit module Spree module HomeControllerDecorator # ... end end end ::Spree::HomeController.prepend(SparkStarterKit::Spree::HomneControllerDecorator)
-
Models
Place them in
app/models/spark_starter_kit/spree/product_decorator.rb
, eg.module SparkStarterKit module Spree module ProductDecorator # ... end end end ::Spree::Product.prepend(SparkStarterKit::Spree::ProductDecorator)
Spark Starter Kit is copyright © 2015-2020 Spark Solutions Sp. z o.o.. It is free software, and may be redistributed under the terms specified in the LICENSE file.
Spark Starter Kit is maintained and funded by Spark Solutions Sp. z o.o. The names and logos are trademarks of Spark Solutions Sp. z o.o.
We are passionate about open source software. We are available for hire.