From c955f1bb9bb5116a84c401d5b8da8b98efe9c7e7 Mon Sep 17 00:00:00 2001 From: Damian Legawiec Date: Mon, 29 Feb 2016 20:01:53 +0100 Subject: [PATCH] spree extension generator: updated README.md --- .../spree_cmd/templates/extension/README.md | 40 +++++++++++++------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/cmd/lib/spree_cmd/templates/extension/README.md b/cmd/lib/spree_cmd/templates/extension/README.md index c70a31058f5..456d6996340 100644 --- a/cmd/lib/spree_cmd/templates/extension/README.md +++ b/cmd/lib/spree_cmd/templates/extension/README.md @@ -3,24 +3,31 @@ Introduction goes here. -Installation ------------- +## Installation -Add <%= file_name %> to your Gemfile: +1. Add this extension to your Gemfile with this line: + ```ruby + gem '<%= file_name %>', github: '[your-github-handle]/<%= file_name %>', branch: 'X-X-stable' + ``` -```ruby -gem '<%= file_name %>' -``` + The `branch` option is important: it must match the version of Spree you're using. + For example, use `3-1-stable` if you're using Spree `3-1-stable` or any `3.1.x` version. -Bundle your dependencies and run the installation generator: +2. Install the gem using Bundler: + ```ruby + bundle install + ``` -```shell -bundle -bundle exec rails g <%= file_name %>:install -``` +3. Copy & run migrations + ```ruby + bundle exec rails g <%= file_name %>:install + ``` -Testing -------- +4. Restart your server + + If your server was running, restart it so that it can find the assets properly. + +## Testing First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using `rake test_app`. @@ -36,4 +43,11 @@ Simply add this require statement to your spec_helper: require '<%= file_name %>/factories' ``` + +## Contributing + +If you'd like to contribute, please take a look at the +[instructions](CONTRIBUTING.md) for installing dependencies and crafting a good +pull request. + Copyright (c) <%= Time.now.year %> [name of extension creator], released under the New BSD License