Spree Sandbox

Spree is a complete open source e-commerce solution built with Ruby on Rails. It
was originally developed by Sean Schofield and is now maintained by developers from Spark Solutions and Vinsol. We're open to contributions and accepting new Core Team members.

Spree consists of several different gems, each of which are maintained
in a single repository and documented in a single set of
online documentation.

spree_api (RESTful API)

spree_frontend (Customer frontend)

spree_backend (Admin panel)

spree_cmd (Command-line tools)

spree_core (Models & Mailers, the basic components of Spree that it can't run without)

spree_sample (Sample data)

Demo

Try Spree with direct deployment on Heroku:

If you have want to run demo spree application on your machine, you can use our docker image with command below. It will
download and run sample Spree application on http://localhost:3000

Note: The master branch is not guaranteed to ever be in a fully functioning
state. It is unwise to use this branch in a production system you care deeply
about.

By default, the installation generator (rails g spree:install) will run
migrations as well as adding seed and sample data and will copy frontend views
for easy customization (if spree_frontend available). This can be disabled using

Performance

You may notice that your Spree store runs slowly in development environment. This can be because in development each asset (css and javascript) is loaded separately. You can disable it by adding the following line to config/environments/development.rb.

config.assets.debug =false

Developing Spree

Spree is meant to be run within the context of Rails application and the source code is essentially a collection of gems. You can easily create a sandbox
application inside of your cloned source directory for testing purposes.

Running Tests

Each gem contains its own series of tests, and for each directory, you need to
do a quick one-time creation of a test application and then you can use it to run
the tests. For example, to run the tests for the core project.

cd core
bundle exec rake test_app
bundle exec rspec spec

If you would like to run specs against a particular database you may specify the
dummy app's database, which defaults to sqlite3.

DB=postgres bundle exec rake test_app

If you want to run specs for only a single spec file

bundle exec rspec spec/models/spree/state_spec.rb

If you want to run a particular line of spec

bundle exec rspec spec/models/spree/state_spec.rb:7

You can also enable fail fast in order to stop tests at the first failure

FAIL_FAST=true bundle exec rspec spec/models/state_spec.rb

If you want to run the simplecov code coverage report

COVERAGE=true bundle exec rspec spec

If you're working on multiple facets of Spree to test,
please ensure that you have a postgres user: