Contributing to Rubyzen
Setup
git clone https://github.com/perrystreetsoftware/Rubyzen.git
cd Rubyzen
bundle install
Running Tests
Rubyzen includes both an RSpec adapter and a Minitest adapter, each with its own unit test suite.
# Rubyzen's unit tests (both test suites)
bundle exec rake
# Or run them individually
bundle exec rspec spec
bundle exec rake test
# Sample project lint rules (expected to fail — intentional violations)
# Using RSpec adapter
bundle exec rspec sample_project/spec/
# Using Minitest adapter
cd sample_project && for f in test/**/*_test.rb; do bundle exec ruby -Itest "$f"; done
Project Structure
lib/rubyzen/— Source code (declarations, collections, providers, matchers, assertions, parsers, cache).core.rbis the framework-agnostic core loaded byrequire 'rubyzen'; the adapters arerubyzen/rspec.rb(RSpec matchers) andrubyzen/minitest.rb(Minitest assertions).spec/— RSpec unit tests for Rubyzen's own APItest/— Minitest unit tests for Rubyzen's own APIsample_project/— Sample app with intentional violations and lint rules (RSpec inspec/, Minitest intest/) demonstrating Rubyzen
Making Changes
- Fork the repository
- Create a branch (
git checkout -b my-change) - Make your changes
- Run the tests (
bundle exec rake— runs both the RSpec and Minitest test suites) - Commit and push
- Open a Pull Request
Guidelines
- Follow existing code patterns (Declarations, Collections, Providers architecture)
- Add tests for new features
- Keep the API surface minimal and consistent
- Use YARD comments on public methods