2015-09-02 22:00:31 +00:00
|
|
|
# Contributing
|
|
|
|
|
2015-10-31 21:20:16 +00:00
|
|
|
Thanks for your interest in PaperTrail!
|
|
|
|
|
2018-07-02 17:14:40 +00:00
|
|
|
## Reporting Security Vulnerabilities
|
|
|
|
|
|
|
|
Please email jared@jaredbeck.com and batkinz@gmail.com. Do not mention the
|
|
|
|
vulnerability publicly until there's a fix.
|
|
|
|
|
|
|
|
We will respond as soon as we can. Thank you for responsibly disclosing
|
|
|
|
security vulnerabilities.
|
2015-10-31 21:20:16 +00:00
|
|
|
|
2018-07-02 17:14:40 +00:00
|
|
|
## Usage Questions
|
2015-10-31 21:20:16 +00:00
|
|
|
|
2018-07-02 17:14:40 +00:00
|
|
|
Due to limited volunteers, we cannot answer *usage* questions. Please ask such
|
|
|
|
questions on [StackOverflow](https://stackoverflow.com/tags/paper-trail-gem).
|
2015-09-02 22:00:31 +00:00
|
|
|
|
2015-11-27 21:33:40 +00:00
|
|
|
## Reporting Bugs
|
|
|
|
|
2018-07-02 17:14:40 +00:00
|
|
|
You want to fix a bug, but need some help.
|
2015-11-27 21:33:40 +00:00
|
|
|
|
2018-07-02 17:14:40 +00:00
|
|
|
> You are required to provide a script that reproduces the bug, using our
|
|
|
|
> template. You are required to fix the bug. We're here to help, but no one else
|
|
|
|
> will fix it for you. If you don't fix the bug in a reasonable amount of time,
|
|
|
|
> your issue will be closed.
|
|
|
|
> - From our [issue template][1].
|
2017-12-15 16:47:32 +00:00
|
|
|
|
2018-07-02 17:14:40 +00:00
|
|
|
Due to limited volunteers, we cannot fix everyone's bugs for them. We're happy
|
|
|
|
to help, but we can only accept issues from people committed to working on their
|
|
|
|
own problems.
|
2017-12-15 16:47:32 +00:00
|
|
|
|
2018-07-02 17:14:40 +00:00
|
|
|
Different people use different parts of PaperTrail. You may have found a bug,
|
|
|
|
but you might also be the only person affected by that bug. Don't hesitate to
|
|
|
|
ask for whatever help you need, but it's your job to fix it.
|
2017-12-15 16:47:32 +00:00
|
|
|
|
2015-10-31 21:20:16 +00:00
|
|
|
## Development
|
|
|
|
|
2020-03-03 02:58:33 +00:00
|
|
|
```bash
|
|
|
|
gem install bundler
|
|
|
|
bundle
|
|
|
|
bundle exec appraisal install
|
|
|
|
bundle exec appraisal update # occasionally
|
|
|
|
```
|
2016-08-09 04:09:15 +00:00
|
|
|
|
2015-11-01 00:29:06 +00:00
|
|
|
Testing is a little awkward because the test suite:
|
|
|
|
|
2016-11-30 17:03:22 +00:00
|
|
|
1. Supports multiple versions of rails
|
2016-01-15 04:45:23 +00:00
|
|
|
1. Contains a "dummy" rails app with three databases (test, foo, and bar)
|
2016-01-05 04:53:52 +00:00
|
|
|
1. Supports three different RDBMS': sqlite, mysql, and postgres
|
|
|
|
|
2020-03-03 02:58:33 +00:00
|
|
|
### Test sqlite, AR 6
|
2015-10-31 21:20:16 +00:00
|
|
|
|
|
|
|
```
|
2020-03-03 02:58:33 +00:00
|
|
|
DB=sqlite bundle exec appraisal ar-6.0 rake
|
2016-12-10 18:49:41 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Test sqlite, AR 5
|
|
|
|
|
|
|
|
```
|
2018-05-15 02:31:12 +00:00
|
|
|
DB=sqlite bundle exec appraisal ar-5.2 rake
|
2015-10-31 21:20:16 +00:00
|
|
|
```
|
|
|
|
|
2016-12-10 18:49:41 +00:00
|
|
|
### Test mysql, AR 5
|
2015-09-02 22:00:31 +00:00
|
|
|
|
2015-10-31 21:20:16 +00:00
|
|
|
```
|
2018-05-15 02:31:12 +00:00
|
|
|
DB=mysql bundle exec appraisal ar-5.2 rake
|
2015-10-31 21:20:16 +00:00
|
|
|
```
|
2015-11-27 21:33:40 +00:00
|
|
|
|
2016-12-10 18:49:41 +00:00
|
|
|
### Test postgres, AR 5
|
2015-12-20 01:53:36 +00:00
|
|
|
|
|
|
|
```
|
2018-06-04 02:49:23 +00:00
|
|
|
createuser --superuser postgres
|
2018-05-15 02:31:12 +00:00
|
|
|
DB=postgres bundle exec appraisal ar-5.2 rake
|
2015-12-20 01:53:36 +00:00
|
|
|
```
|
|
|
|
|
2018-06-04 02:49:23 +00:00
|
|
|
## Adding new schema
|
2017-02-06 01:57:54 +00:00
|
|
|
|
2018-06-04 02:49:23 +00:00
|
|
|
Edit `spec/dummy_app/db/migrate/20110208155312_set_up_test_tables.rb`. Migration
|
2018-08-13 04:57:08 +00:00
|
|
|
will be performed by `rake`, so you can just run it as shown above. Also,
|
|
|
|
`spec/dummy_app/db/schema.rb` is deliberately `.gitignore`d, we don't use it.
|
2017-02-06 01:57:54 +00:00
|
|
|
|
2018-03-16 22:42:36 +00:00
|
|
|
## Documentation
|
|
|
|
|
|
|
|
### Generate the Table of Contents
|
|
|
|
|
|
|
|
```
|
|
|
|
yarn global add markdown-toc
|
|
|
|
markdown-toc -i --maxdepth 3 --bullets='-' README.md
|
|
|
|
```
|
|
|
|
|
2016-11-30 17:03:22 +00:00
|
|
|
## Releases
|
2016-05-02 16:19:18 +00:00
|
|
|
|
2019-04-09 20:24:06 +00:00
|
|
|
1. Prepare the appropriate "stable" branch for release, eg. `10-stable`
|
|
|
|
1. git checkout 10-stable
|
|
|
|
1. Checkout a new branch, eg. `release-10.3.0`
|
|
|
|
1. Merge the relevant changes from `master`. This could be a plain merge, or
|
|
|
|
it could be cherry-picking. The later is more common in backports.
|
|
|
|
1. Set the version in `lib/paper_trail/version_number.rb`
|
|
|
|
1. In the changelog,
|
|
|
|
- Replace "Unreleased" with the date in ISO-8601 format
|
|
|
|
- Add a new "Unreleased" section
|
|
|
|
1. In the readme, update references to version number, including
|
|
|
|
- documentation links table
|
|
|
|
- compatability table, if necessary
|
|
|
|
1. git commit -am 'Release 10.3.0'
|
|
|
|
1. git push origin release-10.3.0
|
|
|
|
1. Pull request into `10-stable`, CI pass, merge PR
|
|
|
|
1. Release
|
|
|
|
1. git checkout 10-stable && git pull
|
|
|
|
1. gem build paper_trail.gemspec
|
|
|
|
1. gem push paper_trail-10.3.0.gem
|
|
|
|
1. git tag -a -m "v10.3.0" "v10.3.0" # or whatever number
|
|
|
|
1. git push --tags origin
|
|
|
|
1. Cleanup
|
|
|
|
1. git checkout master
|
|
|
|
1. cherry-pick the "Release 10.3.0" commit from the `10-stable` branch
|
|
|
|
1. git push origin master
|
2016-05-02 16:19:18 +00:00
|
|
|
|
2018-07-02 17:14:40 +00:00
|
|
|
[1]: https://github.com/paper-trail-gem/paper_trail/blob/master/.github/ISSUE_TEMPLATE/bug_report.md
|