2015-09-02 18:00:31 -04:00
|
|
|
# Contributing
|
|
|
|
|
2015-10-31 17:20:16 -04:00
|
|
|
Thanks for your interest in PaperTrail!
|
|
|
|
|
|
|
|
Ask usage questions on Stack Overflow:
|
|
|
|
http://stackoverflow.com/tags/papertrail
|
|
|
|
|
|
|
|
**Please do not use github issues to ask usage questions.**
|
|
|
|
|
|
|
|
On github, we appreciate bug reports, feature
|
2015-09-02 18:00:31 -04:00
|
|
|
suggestions, and especially pull requests.
|
|
|
|
|
2015-10-31 17:20:16 -04:00
|
|
|
Thanks, and happy (paper) trails :)
|
2015-09-02 18:00:31 -04:00
|
|
|
|
2015-11-27 16:33:40 -05:00
|
|
|
## Reporting Bugs
|
|
|
|
|
|
|
|
Please use our [bug report template][1].
|
|
|
|
|
2015-10-31 17:20:16 -04:00
|
|
|
## Development
|
|
|
|
|
2015-10-31 20:29:06 -04:00
|
|
|
Testing is a little awkward because the test suite:
|
|
|
|
|
|
|
|
1. contains a rails app with three databases (test, foo, and bar)
|
|
|
|
1. supports three different RDBMS': sqlite, mysql, and postgres
|
|
|
|
|
2015-10-31 17:20:16 -04:00
|
|
|
Run tests with sqlite:
|
|
|
|
|
|
|
|
```
|
2015-10-31 20:29:06 -04:00
|
|
|
# Create the appropriate database config. file
|
|
|
|
rm test/dummy/config/database.yml
|
|
|
|
DB=sqlite bundle exec rake prepare
|
|
|
|
|
|
|
|
# If this is the first test run ever, create databases
|
|
|
|
cd test/dummy
|
|
|
|
RAILS_ENV=test bundle exec rake db:setup
|
|
|
|
RAILS_ENV=foo bundle exec rake db:setup
|
|
|
|
RAILS_ENV=bar bundle exec rake db:setup
|
|
|
|
cd ../..
|
|
|
|
|
|
|
|
# Run tests
|
|
|
|
DB=sqlite bundle exec rake
|
2015-10-31 17:20:16 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
Run tests with mysql:
|
2015-09-02 18:00:31 -04:00
|
|
|
|
2015-10-31 17:20:16 -04:00
|
|
|
```
|
2015-10-31 20:29:06 -04:00
|
|
|
# Create the appropriate database config. file
|
|
|
|
rm test/dummy/config/database.yml
|
|
|
|
DB=mysql bundle exec rake prepare
|
|
|
|
|
|
|
|
# If this is the first test run ever, create databases
|
2015-10-31 17:20:16 -04:00
|
|
|
cd test/dummy
|
|
|
|
RAILS_ENV=test bundle exec rake db:setup
|
2015-10-31 20:29:06 -04:00
|
|
|
RAILS_ENV=foo bundle exec rake db:setup
|
|
|
|
RAILS_ENV=bar bundle exec rake db:setup
|
2015-10-31 17:20:16 -04:00
|
|
|
cd ../..
|
2015-10-31 20:29:06 -04:00
|
|
|
|
|
|
|
# Run tests
|
2015-10-31 17:20:16 -04:00
|
|
|
DB=mysql bundle exec rake
|
|
|
|
```
|
2015-11-27 16:33:40 -05:00
|
|
|
|
|
|
|
[1]: https://github.com/airblade/paper_trail/blob/master/doc/bug_report_template.rb
|