Contribution Guidelines
November 6, 2018 ยท View on GitHub
Suggest changes
- Create a feature branch with your changes.
- Please add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, we need a test!
- Make all the tests pass against
ActiveRecordandMongoid. - Issue a Pull Request.
I will grant you commit access if you send quality pull requests.
Run the tests
Prepare by installing and migrating the database:
- Clone this repo
- Run
bundle install - Run
bundle exec rake db:migrate - Run
RAILS_ENV=test bundle exec rake db:migrate
Now your environment is ready to run tests.
To run the full test suite with the guard test runner:
bundle exec guard
Guard will re-run each test suite when changes are made to its corresponding files.
To run just one test: Flavio Castelli blogged about how to execute a single unit test (or even a single test method) instead of running the complete unit test suite.
To run the full test suite with the guard and the appraisal against ActiveRecord:
bundle exec appraisal rails-5-1 guard
# the same
DEVISE_TOKEN_AUTH_ORM=active_record DB=sqlite bundle exec appraisal
DB environment variable can take sqlite, mysql, and postgresql values.
against Mongoid:
DEVISE_TOKEN_AUTH_ORM=mongoid bundle exec appraisal rails-5-1-mongoid-7 guard