thought-driven / bummr

Update your gems in separate commits. Identify any that fail your build.
MIT License
234 stars 23 forks source link

Bummr

Code Climate Test Coverage

Updating Gems one by one is a bumm(e)r: especially when one gem causes your build to fail.

Gems should be updated in separate commits.

The bummr gem allows you to automatically update all gems which pass your build in separate commits, and logs the name and sha of each gem that fails.

Bummr assumes you have good test coverage and follow a pull-request workflow.

By default, bummr will assume your base branch is named main. If you would like to designate a different base branch, you can set the BASE_BRANCH environment variable: export BASE_BRANCH='main'

Compatibility

Bundler Version Bummr Version
<= 2.1 <= 0.6.0
>= 2.2 >= 1.0.0

Setup

$ gem install bummr

To run headless (skip interactive rebasing/confirmation), use BUMMR_HEADLESS=true bundle exec bummr update.

By default, bummr will use bundle exec rake to run your build.

To customize your build command, export BUMMR_TEST="./bummr-build.sh"

If you prefer, you can run the build more than once, to protect against brittle tests and false positives.

Usage

Using bummr can take anywhere from a few minutes to several hours, depending on the number of outdated gems you have and the number of tests in your test suite.

For the purpose of these instructions, we are assuming that your base branch is main. If you would like to specify a different base branch, see the instructions in the Installation section of this README.

bummr update
Update gemname from 0.0.1 to 0.0.2
bummr test
bummr bisect

Notes

License

See LICENSE

Developing

Set version in lib/bummr/version.rb

rake build to build locally

gem install --local ./pkg/bummr-X.X.X.gem with the ruby version of the app you'd like to use it with.

rake will run the suite of unit tests.

gem push ./pkg/bummr-x.x.x.gem to publish new versions.

The suite relies on Oliver Peate's jet black testing library for command line feature tests.

Thank you!

Thanks to Ryan Sonnek for the Bundler Updater gem.