First off, thank you for considering contributing to ParseKit Ruby! It's people like you that make ParseKit Ruby such a great tool.
This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [your.email@example.com].
Before creating bug reports, please check existing issues as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title for the issue to identify the problem
- Describe the exact steps which reproduce the problem in as many details as possible
- Provide specific examples to demonstrate the steps
- Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior
- Explain which behavior you expected to see instead and why
- Include details about your configuration and environment:
- Ruby version (run
ruby -v) - Rust version (run
rustc --version) - Operating system and version
- ParseKit Ruby version
- Ruby version (run
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title for the issue to identify the suggestion
- Provide a step-by-step description of the suggested enhancement in as many details as possible
- Provide specific examples to demonstrate the steps or provide code snippets
- Describe the current behavior and explain which behavior you expected to see instead and why
- Explain why this enhancement would be useful to most ParseKit Ruby users
Please follow these steps to have your contribution considered by the maintainers:
- Follow all instructions in the template
- Follow the styleguides
- After you submit your pull request, verify that all status checks are passing
-
Fork and clone the repository
git clone https://github.com/your-username/parsekit.git cd parsekit -
Install Ruby dependencies
bundle install
-
Install Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup component add rustfmt clippy
-
Compile the extension
bundle exec rake compile -
Run tests
bundle exec rake spec
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- Consider starting the commit message with an applicable emoji:
- 🎨
:art:when improving the format/structure of the code - 🐎
:racehorse:when improving performance - 📝
:memo:when writing docs - 🐛
:bug:when fixing a bug - 🔥
:fire:when removing code or files - 💚
:green_heart:when fixing the CI build - ✅
:white_check_mark:when adding tests - 🔒
:lock:when dealing with security - ⬆️
:arrow_up:when upgrading dependencies - ⬇️
:arrow_down:when downgrading dependencies
- 🎨
- Follow the Ruby Style Guide
- Use RuboCop to check your code:
bundle exec rubocop - Write RSpec tests for new functionality
- Maintain test coverage above 90%
- Follow the Rust Style Guide
- Use rustfmt to format your code:
cd ext/parsekit cargo fmt - Use clippy to lint your code:
cd ext/parsekit cargo clippy - Write tests for new Rust functionality
- Document public APIs with rustdoc comments
- Use YARD for Ruby documentation
- Use rustdoc for Rust documentation
- Include examples in documentation
- Keep README.md up to date with new features
Run all tests:
bundle exec rake specRun specific test file:
bundle exec rspec spec/parsekit_spec.rbRun with coverage:
COVERAGE=true bundle exec rake specRun Rust tests:
bundle exec rake rust:testOr directly:
cd ext/parsekit
cargo testThe gem includes integration tests that verify Ruby-Rust interaction:
bundle exec rspec spec/integration/Run benchmarks:
bundle exec rake benchmarkCompare with pure Ruby implementation:
bundle exec ruby benchmark/comparison.rbReleases are managed by maintainers. The process is:
- Update version in
lib/parsekit/version.rb - Update CHANGELOG.md
- Commit changes:
git commit -am "Release version X.Y.Z" - Create tag:
git tag -a vX.Y.Z -m "Release version X.Y.Z" - Push changes:
git push origin main --tags - GitHub Actions will automatically build and publish to RubyGems
Feel free to open an issue with the question label or start a discussion in the GitHub Discussions area.