README.md in spree-1.0.0.rc1 vs README.md in spree-1.0.0.rc2
- old
+ new
@@ -19,34 +19,52 @@
All of the gems are designed to work together to provide a fully functional e-commerce platform. It is also possible,
however, to use only the pieces you are interested in. So for example, you could use just the barebones spree\_core gem
and perhaps combine it with your own custom authorization scheme instead of using spree_auth.
[![Build Status](https://secure.travis-ci.org/spree/spree.png)](http://travis-ci.org/spree/spree)
+[![Dependency Status](https://gemnasium.com/spree/spree.png)](https://gemnasium.com/spree/spree)
+Installation
+------------
+
+The fastest way to get started is by using the spree command line tool
+available in the spree gem. It will add Spree to an existing Rails
+application.
+
+ $ gem install spree
+ $ rails new my_store
+ $ spree install my_store
+
+This will add the Spree gem, create intitializers, copy migrations and
+optionally generate sample products and orders.
+
+To auto accept all prompts while running the install generator, pass -A as an option
+
+ $ spree install my_store -A
+
Using the Gem
-------------
-Start by adding the gem to your existing Rails 3.x application's Gemfile
+You can manually add Spree to your Rails 3.x application. Add Spree to
+your Gemfile.
gem 'spree'
Update your bundle
$ bundle install
-Use the install generator to do the basic setup. The install generator will prompt you to run migrations, setup some
-basic data, and load sample products, orders, etc.
+Use the install generator to copy migrations, intializers and generate
+sample data.
- $ rails g spree:site
+ $ rails g spree:install
-To auto accept all prompts while running the install generator, pass -A as an option
+You can avoid running migrations or generating seed and sample data
- $ rails g spree:site -A
+ $ rails g spree:install --migrate=false --sample=false --seed=false
-If you chose to ignore the prompts while running the basic install
-generator you can manually run migrations and load basic data with the following
-commands
+You can always perform the steps later.
$ bundle exec rake db:migrate
$ bundle exec rake db:seed
To manually load sample products, orders, etc., run the following rake task
@@ -78,20 +96,20 @@
-----------------------------------------------------------
The source code is essentially a collection of gems. Spree is meant to be run within the context of Rails application. You can easily create a sandbox application inside of your cloned source directory for testing purposes.
-1. Clone the git repo
+1. Clone the Git repo
git clone git://github.com/spree/spree.git spree
cd spree
2. Install the gem dependencies
bundle install
-3. Create a sandbox rails application for testing purposes (and automatically perform all necessary database setup)
+3. Create a sandbox Rails application for testing purposes (and automatically perform all necessary database setup)
bundle exec rake sandbox
6. Start the server
@@ -103,34 +121,42 @@
You may noticed that your Spree store runs slowly in development mode. This is a side-effect of how Rails works in development mode which is to continuous reload your Ruby objects on each request. The introduction of the asset pipeline in Rails 3.1 made default performance in development mode significantly worse. There are, however, a few tricks to speeding up performance.
You can recompile your assets as follows:
- $ bundle exec rake assets:precompile RAILS_ENV=development
+ $ bundle exec rake assets:precompile RAILS_ENV=development
-If you want to remove precompiled assets (recommended before you commit to git and push your changes) use the following rake task:
+If you want to remove precompiled assets (recommended before you commit to Git and push your changes) use the following rake task:
- $ bundle exec rake assets:clean
+ $ bundle exec rake assets:clean
Running Tests
-------------
If you want to run all the tests across all the gems then
$ cd spree
- $ bundle exec rake #=> 'this will run rspec tests for all the gems'
+ $ bundle exec rake
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
-You can run all of the tests with a single command
+If you're working on multiple facets of Spree, you may want
+to run this command at the root of the Spree project to
+generate test applications for all the facets:
+ $ bundle exec rake test_app
+
+You can run all of the tests inside a facet by also running
+this command:
+
+ $ cd core
$ bundle exec rake
If you want to run specs for only a single spec file
$ bundle exec rspec spec/models/state_spec.rb