Bug reports and pull requests are welcome on GitLab at https://gitlab.com/appraisal-rb/appraisal2 . This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
To submit a patch, please fork the project and create a patch with tests. Once you're happy with it send a pull request.
Remember to if you make changes.
Simply follow these instructions:
- Join the Discord:
- Fork the repository
- Create your feature branch (
git checkout -b my-new-feature) - Make some fixes.
- Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Make sure to add tests for it. This is important, so it doesn't break in a future release.
- Run the at least one workflow of tests via
act, e.g.,:NOTE: Because there are so many workflows, runningact -W '.github/workflows/ruby-3-3.yml'actnaked might grind your machine to a halt. - Create new Pull Request.
- Announce it in the channel for this org in the Discord!
NOTE: Run tests with act to have confidence they will pass in CI.
Also, because the spec run makes many changes to local bundle config,
many specs will fail locally in subsequent runs unless run via act.
The spec suite is not idempotent. This is a goal for the future, if you'd like to work on it.
From time to time the appraisal2 gemfiles in gemfiles/ will need to be updated.
They are created and updated with the commands:
bin/rake appraisal:updateIf you need to reset all gemfiles/*.gemfile.lock files:
bin/rake appraisal:resetWhen adding an appraisal to CI, check the runner tool cache to see which runner to use.
Take a look at the reek list which is the file called REEK and find something to improve.
To refresh the reek list:
bundle exec reek > REEKTo run all tests against the current Ruby release:
bundle exec rake actOr the equivalent:
act -W '.github/workflows/current.yml'NOTE: Because there are so many workflows, running act naked might grind your machine to a halt.
Run all the default tasks, which includes running the gradually autocorrecting linter, rubocop-gradual.
bundle exec rakeOr just run the linter.
bundle exec rake rubocop_gradual:autocorrectYour picture could be here!
Made with contributors-img.
Also see GitLab Contributors: https://gitlab.com/appraisal-rb/appraisal2/-/graphs/main
IMPORTANT: To sign a build,
a public key for signing gems will need to be picked up by the line in the
gemspec defining the spec.cert_chain (check the relevant ENV variables there).
All releases are signed releases.
See: RubyGems Security Guide
NOTE: To build without signing the gem you must set SKIP_GEM_SIGNING to some value in your environment.
- Update version.rb to contain the correct version-to-be-released.
- Run
bundle exec kettle-changelog. - Run
bundle exec kettle-release. - Stay awake and monitor the release process for any errors, and answer any prompts.
- Run
bin/setup && bin/rakeas a "test, coverage, & linting" sanity check - Update the version number in
version.rb, and ensureCHANGELOG.mdreflects changes - Run
bin/setup && bin/rakeagain as a secondary check, and to updateGemfile.lock - Run
git commit -am "🔖 Prepare release v<VERSION>"to commit the changes - Run
git pushto trigger the final CI pipeline before release, and merge PRs- NOTE: Remember to check the build.
- Run
export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME - Run
git checkout $GIT_TRUNK_BRANCH_NAME - Run
git pull origin $GIT_TRUNK_BRANCH_NAMEto ensure latest trunk code - Optional for older Bundler (< 2.7.0): Set
SOURCE_DATE_EPOCHsorake buildandrake releaseuse the same timestamp and generate the same checksums- If your Bundler is >= 2.7.0, you can skip this; builds are reproducible by default.
- Run
export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH - If the echo above has no output, then it didn't work.
- Note:
zsh/datetimemodule is needed, if runningzsh. - In older versions of
bashyou can usedate +%sinstead, i.e.export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH
- Run
bundle exec rake build - Run
bin/gem_checksums(more context 1, 2) to create SHA-256 and SHA-512 checksums. This functionality is provided by thestone_checksumsgem.- The script automatically commits but does not push the checksums
- Sanity check the SHA256, comparing with the output from the
bin/gem_checksumscommand:sha256sum pkg/<gem name>-<version>.gem
- Run
bundle exec rake releasewhich will create a git tag for the version, push git commits and tags, and push the.gemfile to the gem host configured in the gemspec.