Skip to content

Commit

Permalink
Adapt README file
Browse files Browse the repository at this point in the history
  • Loading branch information
mamhoff committed Oct 25, 2024
1 parent 7555730 commit 3d89ee3
Showing 1 changed file with 4 additions and 41 deletions.
45 changes: 4 additions & 41 deletions promotions/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Solidus Friendly Promotions
# Solidus Promotions

[![CircleCI](https://circleci.com/gh/friendlycart/solidus_promotions.svg?style=shield)](https://circleci.com/gh/friendlycart/solidus_promotions)
This gem contains Solidus' recommended promotion system. It is slated to replace the promotion system in the `legacy_promotions` gem.

This extension replaces Solidus core's promotion system. It is intended as both a research project and a working alternative to how promotions work in core.

The basic architecture is very similar to the one in core Solidus, but with a few decisive tweaks, which I'll explain in the coming sections.
The basic architecture is very similar to the legacy promotion system, but with a few decisive tweaks, which I'll explain in the coming sections.

## Architecture

Expand Down Expand Up @@ -111,49 +109,14 @@ In the admin screen, you can set a number of attributes on your promotion:

## Development

### Testing the extension

First bundle your dependencies, then run `bin/rake`. `bin/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
`bin/rake extension:test_app`.

```shell
bin/rake
```

To run [Rubocop](https://github.com/bbatsov/rubocop) static code analysis run

```shell
bundle exec rubocop
```

When testing your application's integration with this extension you may use its factories.
You can load Solidus core factories along with this extension's factories using this statement:

```ruby
SolidusDevSupport::TestingSupport::Factories.load_for(SolidusPromotions::Engine)
```

### Running the sandbox

To run this extension in a sandboxed Solidus application, you can run `bin/sandbox`. The path for
the sandbox app is `./sandbox` and `bin/rails` will forward any Rails commands to
`sandbox/bin/rails`.

Here's an example:

```
$ bin/rails server
=> Booting Puma
=> Rails 6.0.2.1 application starting in development
* Listening on tcp://127.0.0.1:3000
Use Ctrl-C to stop
```

### Releasing new versions

Please refer to the [dedicated page](https://github.com/solidusio/solidus/wiki/How-to-release-extensions) in the Solidus wiki.

## License

Copyright (c) 2023 Martin Meyerhoff, released under the New BSD License.
Copyright (c) 2024 Martin Meyerhoff, Solidus Team, released under the New BSD License.

0 comments on commit 3d89ee3

Please sign in to comment.