This is an opinionated template with my personnal preferences of a Ruby on Rails application with Solidus pre-installed and configured for quick use out-of-the-box.
What is included:
- Views are converted to HAML template
- Replaced the frontend with Bulma CSS
- FontAwesome Free is pre-configured
- RSpec is pre-installed
I prefer to override views rather than use deface
, you may expect all plugins
that depend on deface
not to be compatible with my template. This is usually
not too much of a problem if you like getting your hands dirty, as you can
simply take the HTML fragments in overrides
and place them in corresponding
views templates. This is my preference when dealing with Solidus extensions.
This template targets Ruby version 3.0.0 and Rails 6.1 but may work with other versions.
This template targets the PostgreSQL database, ensure you have a working instance of PostgreSQL.
My template is customized to use bulma
and fontawesome
.
Run the following command to install ruby gems and javascript dependencies.
$ bundle install
$ yarn install
A working installation of imagemagick
is required to use Solidus.
Clone the template
$ git clone [email protected]:biximilien/solidus-template.git MyAmazingNewStore
Find and replace the project name.
$ find . -type f -exec sed -i 's/SolidusTemplate/MyAmazingNewStore/g' {} \;
Create a new repository for your awesome new store and update the git remotes.
$ git remote set-url origin [email protected]:biximilien/MyAmazingNewStore.git
To setup the database, run :
$ bundle exec rake db:create
$ bundle exec rake db:migrate
$ bundle exec rake db:seed
To setup the database with sample data just run :
$ bundle exec rake spree_sample:load
To execute the test suite, run :
$ bundle exec rspec
Or to execute individual tests, run :
$ bundle exec rspec spec/model/foobar_spec.rb