gem_maintainer
A tool for keeping your Ruby project's gems up to date, one at a time.
This gem is designed around following a weekly updates process to ensure a gemfile is kept largely up to date and does not fall behind. When updating weekly it's assumed that a lot of gem upgrades wouldn't need any changes, and so they can be batched together quickly. The most time consuming part of this process is finding and checking changelogs, which this gem speeds up greatly.
gem_maintainer walks you through each available upgrade interactively. You can review the changelog link for each gem, decide whether to approve or skip it, and at the end it updates everything you approved in one go.
Installation
Add to your Gemfile:
gem "gem_maintainer"Then run:
bundle installUsage
Run from within your project directory:
gem_maintainYou'll be walked through each outdated gem one by one. For each one you'll see the current and new version, the bump type (patch, minor, or major), and a link to the changelog. You can then choose to:
- approve — queue it for updating
- skip — leave it at the current version
- quit — save your progress and exit
Once you've worked through the list, all approved gems are updated together with a single bundle update. Afterward, a summary is printed showing each updated gem with its version bump and changelog link, which skipped gems were left alone, and any gems that Bundler attempted to update but whose version didn't change (e.g. due to Gemfile constraints).
The intention here is that any gem requiring changes could be skipped, worked on and committed separately. But any gems with no changes can be upgraded all at once in a single commit.
Filtering by version bump type
To only see patch-level upgrades (e.g. 1.2.3 → 1.2.4):
gem_maintain --patchTo only see minor-level upgrades (e.g. 1.2.3 → 1.3.0):
gem_maintain --minorTo only see major-level upgrades (e.g. 1.2.3 → 2.0.0):
gem_maintain --majorInline changelogs
To fetch and render relevant changelog content directly in the terminal for each gem:
gem_maintain --changelogThis shows the changelog entries relevant to the upgrade alongside the changelog URL, so you can review what changed without leaving the terminal.
Resuming a session
If you quit part way through, your progress is saved automatically. Pick up where you left off with:
gem_maintain --resumeIgnoring gems
To permanently skip certain gems (e.g. ones you never want to update), create a .gem_maintainer.yml file in your project root:
ignore:
- rubocop
- bundler-auditGems in this list will be excluded from the outdated check entirely and never appear in the interactive session.
Development
Clone the repo and install dependencies:
git clone git@github.com:WillRogers727/gem_maintainer.git
cd gem_maintainer
bundle installTo build and install the gem locally for testing, use the provided build script:
bin/buildThis builds the gem, installs it, and cleans up the .gem file in one step.
To release a new version, update the version number in lib/gem_maintainer/version.rb, then run bin/build.