Skip to content

Commit

Permalink
spree extension generator: updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
damianlegawiec authored and Mafi88 committed Mar 14, 2016
1 parent e492c7e commit c955f1b
Showing 1 changed file with 27 additions and 13 deletions.
40 changes: 27 additions & 13 deletions cmd/lib/spree_cmd/templates/extension/README.md
Expand Up @@ -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`.
Expand All @@ -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

0 comments on commit c955f1b

Please sign in to comment.