Contributing to Propshaft
We welcome contributions to Propshaft! Here's how you can help.
Development Setup
-
Fork and Clone: Fork the repository on GitHub and clone it to your local machine.
git clone https://github.com/YOUR-USERNAME/propshaft.git cd propshaft -
Install Dependencies: Propshaft uses Bundler to manage its gem dependencies. Install them with:
bundle install
Running Tests
Propshaft is tested against multiple versions of Ruby and Rails. The test suite can be run using Rake.
To run the tests with your current bundle:
# Using Rake
rake test
# Or using the test script
./bin/test
The project includes different Gemfiles in the gemfiles/ directory to test against specific Rails versions. The continuous integration (CI) setup uses these files to run the full test matrix. You can replicate this locally by setting the BUNDLE_GEMFILE environment variable:
# Example: Run tests against Rails 7.1
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-7.1 bundle install
BUNDLE_GEMFILE=gemfiles/Gemfile.rails-7.1 bundle exec rake test
Pull Request Process
-
Create a Branch: Create a new branch for your feature or bug fix.
git checkout -b my-new-feature -
Make Changes: Make your changes to the code and add corresponding tests.
-
Run Tests: Ensure that the test suite passes with your changes.
-
Commit: Commit your changes with a clear and descriptive message.
-
Push: Push your branch to your fork on GitHub.
git push origin my-new-feature -
Open a Pull Request: Go to the Propshaft repository on GitHub and open a pull request from your branch to the
mainbranch.
Please provide a clear description of the problem and your solution in the pull request description. If it's related to an existing issue, be sure to link it.