GithubHelp home page GithubHelp logo

jere7 / bummr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thought-driven/bummr

0.0 2.0 0.0 84 KB

Update your gems in separate commits. Automatically remove any that fail your build.

License: MIT License

Ruby 100.00%

bummr's Introduction

Bummr

CircleCI 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 with master as your default branch.

Please note that this gem is alpha stage and may have bugs.

Installation

$ gem install bummr

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.

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

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 master. If you would like to specify a different base branch, see the instructions in the Installation section of this README.

  • After installing, create a new, clean branch off of your master branch.
  • Run bummr update. This may take some time.
  • Bummr will give you the opportunity to interactively rebase your branch before running the tests. Delete any commits for gems which you don't want to update and close the file.
  • At this point, you can leave bummr to work for some time.
  • If your build fails, bummr will attempt to automatically remove breaking commits, until the build passes, logging any failures to /log/bummr.log.
  • Once your build passes, open a pull-request and merge it to your master branch.
bummr update
  • Finds all your outdated gems
  • Updates them each individually, using bundle update --source #{gemname}
  • Commits each gem update separately, with a commit message like:
  • Options:
    • --all to include indirect dependencies (bummr defaults to direct dependencies only)

Update gemname from 0.0.1 to 0.0.2

  • Runs git rebase -i master to allow you the chance to review and make changes.
  • Runs bummr test
bummr test
  • Runs your build script (.bummr-build.sh).
  • If there is a failure, runs bummr bisect.
bummr bisect
  • git bisects against master.
  • Finds the bad commit and attempts to remove it.
  • Logs the bad commit in log/bummr.log.
  • Runs bummr test.

Notes

  • Bummr assumes you have good test coverage and follow a pull-request workflow with master as your default branch.
  • Once the build passes, you can push your branch and create a pull-request!
  • You may wish to tail -f log/bummr.log in a separate terminal window so you can see which commits are being removed.
  • Bummr conservatively updates gems using bundle update --source gemname
  • Bummr automatically rebases out commits which fail the build using an "ours" merge strategy.
  • Bummr may not be able to remove the bad commit due to a merge conflict, in which case you will have to remove it manually, continue the rebase, and run bummr test again.

License

See LICENSE

Developing

rake build to build locally

gem install --local ~/dev/mine/bummr/pkg/bummr-X.X.X.gem in the app you wish to use it with.

rake will run the suite of unit tests.

I'd like to create feature tests, but because Bummr relies on command line manipulations which need to be doubled, I'm waiting on this issue

Thank you!

Thanks to Ryan Sonnek for the Bundler Updater gem.

bummr's People

Contributors

benreyn avatar chytreg avatar jessieay avatar lpender avatar map7 avatar monfresh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.