Adding a New Gavel Implementation
- Fork the [gavel-spec][https://github.com/apiaryio/gavel-spec] repository.
- Assign new implementation-specific Cucumber tag (e.g.
@python). - Add the specification to your project:
- Add your forked repository as a [git submodule][] to the directory where your Cucumber features live in your project. - Setup your Cucumber test runner to only use the language tag relevant for your implementation (`-t` option). - As you implement, tag features with your language tag. Do not forget to add Cucumber features for code examples in your language.
- Implement Cucumber step definitions (implementation-specific glue code between Cucumber steps and your code).
- Run Cucumber and see it failing.
- Implement scenarios in your code. Iteratively run Cucumber until the tests are passing.
- Once your implementation works and you have language-specific Cucumber features ready, you can send them back to upstream
gavel-specin a Pull Request. Don't forget to add your implementation to the list above. - Once it gets merged, new [npm package][] of
gavel-specwill be released. Then it's up to you if you prefer to add the specification to your project as git submodule of the upstreamgavel-specor if it's convenient for you to install it as npm dependency. - Publish your project! Be sure to have it tested against the specification (e.g. by [Travis CI][])
If you get lost, don't hesitate to ask in [issues][] or inspect [existing implementations][index.md#implementations].
Guidelines for Cucumber Tags
- Untagged features and scenarios are considered mandatory in all implementations.
- General tags
- **@proposal** - Proposal for stabilization, SHOULD be implemented - **@draft** - Feature sketch, thoughts aggregation, MAY be implemented See [RFC Requirement Levels][]. - Implementation-specific tags
- **@javascript** - Implemented in JavaScript, tested - **@javascript-pending** - Planned to implement in JavaScript, _NOT_ tested
[git submodule]: https://git-scm.com/book/en/v2/Git-Tools-Submodules [npm package]: https://www.npmjs.com/package/gavel-spec [issues]: https://github.com/apiaryio/gavel-spec/issues [Travis CI]: https://travis-ci.org/ [RFC Requirement Levels]: http://www.ietf.org/rfc/rfc2119.txt
Source: features/add-implementation.md at v4.1.0, Gavel (MIT license).