After checking out the repo, run bundle install
to install dependencies. Then, run bundle exec rake spec
to run the tests. To install this gem onto your local machine, run bundle exec rake install
.
You can use Guard to automatically run the tests every time a file in the lib
or spec
folder changes.
Run Guard through Bundler with:
bundle exec guard
Although this gem supports Ruby 2.0.0, in order to use the latest development dependencies you have to use at least Ruby 2.2.2.
The 100% code coverage requirement must be met before submitting new code. This can be checked by opening the generated SimpleCov files:
open coverage/index.html
The Ruby style guide is configured in the rubocop.yml file and can be checked by running:
bundle exec rake rubocop
The documentation uses the Yard format. Please ensure all new classes and methods are fully documented.
There are a few Rake tasks to handle documentation:
bundle exec rake measurement
Verifies the documentation with Yardstick and generates the measurement/report.txt
file, containing tips on how to improve the documentation coverage.
bundle exec rake yard
Generates YARD documentation in the ./yardoc
folder.
Commit messages should ideally start with one of the following verbs:
- Add
- Merge
- Fix
- Remove
- Improve
- Use
rake build
gem push pkg/yoti-[version].gem
- Fork the repository.
- Create a topic branch.
- Add specs for your unimplemented feature or bug fix.
- Run
bundle exec rake spec
. If your specs pass, return to step 3. - Implement your feature or bug fix.
- Run
bundle exec rake
. If your specs fail, return to step 5. - Run
open coverage/index.html
. If your changes are not completely covered by your tests, return to step 3. - If Rubocop warns you about styling errors, correct them based on the guidelines and run
bundle exec rake rubocop
to make sure all offences are gone. - Add documentation for your feature or bug fix.
- Commit and push your changes.
- Submit a pull request.