NOTE: The guide is a work in progress so please bear with us while it is flushed out. Since this is a wiki feel free to make your own contributions.
Contributors Guide
This guide is meant to serve as an overview for those wishing to contribute to the development of the Spree project. For information on the installation and basic usage of Spree please see the Users Guide. If you are looking for information on how to customize Spree for your own personal projects, please see our Developers Guide
Please make sure you have read the Developers Guide since it covers many of the basics about how the project is organized.
Submitting Changes
TO DO
Code Guidelines
TO DO
Git Synchronization
Github is the official public facing repository for the Spree codebase. A separate copy of the repository is also maintained on git.spreehq.org for backup purposes.
Forking
Get yourself a github account and create a fork by following this instruction
If you have forked, but want to pull in the latest code from the master branch, try the following from where you checked out your fork
git pull git://github.com/schof/spree.git master
and to push those changes back up to your fork try
git push
Release Procedure
Update the Gem Information
1.) Update the version and release notes
- Update the version in
lib/spree.rb
- Update
CHANGELOG
3.) Build and install the gem locally
sudo rake spree:gem:install
_NOTE: You will probably need to run the above command as root or using sudo.
4.) Create a test project
cd ~ spree testapp
5.) Configure database.yml to taste (or do nothing if you have sqlite3 installed already.)
6.) Run the bootstrap task to setup your database
rake db:bootstrap
Accept the defaults when prompted.
7.) Fire up the server and test.
Perform the Release
1.) Once you’re satisfied that the new gem is working you should commit your changes to your local git repository.
2.) Release the Gem
First get rid of local version (so we can make sure we are using the published one)
sudo gem uninstall spree
3.) Perform the release
rake spree:release
4.) Tag the release with your GPG key
git tag -s "v0.0.6" -m "tagging 0.0.6 release"
5.) Verify the release is on ruby forge (http://rubyforge.org/projects/spree)
6.) Wait a few hours for it to propagate and become available via gem install
Demo Server
Restart the Cluster
Login as spreedemo
Use the following to restart the cluster
cd /home/spreedemo/live/spreedemo mongrel_rails cluster::restart
Purge the Test Data
Add the following to crontab
cd /home/spreedemo/live/spreedemo && rake db:migrate VERSION=0 RAILS_ENV=production cd /home/spreedemo/live/spreedemo && rake db:migrate spree:bootstrap spree:sample_data RAILS_ENV=production