• Stars
    star
    194
  • Rank 200,219 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A friendlier CLI for Bundler’s `update` and `outdated` commands.

bundleup

Gem Version Gem Downloads GitHub Workflow Status

Run bundleup on a Ruby project containing a Gemfile to see what gem dependencies need updating. It is a friendlier command-line interface to Bundler’s bundle update and bundle outdated.

You might like bundleup because it:

  • shows you exactly what gems will be updated lets you decide whether to proceed
  • uses color to call your attention to important gem updates (based on Semver)
  • lets you know when a version "pin" in your Gemfile is preventing an update
  • relies on standard Bundler output and does not patch code or use Bundler internals

Here it is in action:

Sample output

Requirements

  • Bundler 1.16 or later
  • Ruby 3.0 or later

Usage

Assuming you have a Ruby environment, all you need to do is install the bundleup gem:

gem install bundleup

Now, within a Ruby project you can run the bundleup command (the project needs to have a Gemfile and Gemfile.lock):

bundleup

That’s it!

Protip: Any extra command-line arguments will be passed along to bundle update. For example:

# Only upgrade development gems
bundleup --group=development

Experimental: --update-gemfile

💡 This is an experimental feature that may be removed or changed in future versions.

Normally bundleup only makes changes to your Gemfile.lock. It honors the version restrictions ("pins") in your Gemfile and will not update your Gemfile.lock to have versions that are not allowed. However with the --update-gemfile flag, bundleup can update the version pins in your Gemfile as well. Consider the following Gemfile:

gem 'sidekiq', '~> 5.2'
gem 'rubocop', '0.89.0'

Normally running bundleup will report that these gems are pinned and therefore cannot be updated to the latest versions. However, if you pass the --update-gemfile option like this:

$ bundleup --update-gemfile

Now bundleup will automatically edit your Gemfile pins as needed to bring those gems up to date. For example, bundleup would change the Gemfile to look like this:

gem 'sidekiq', '~> 6.1'
gem 'rubocop', '0.90.0'

Note that --update-gemfile will not modify Gemfile entries that contain a comment, like this:

gem 'sidekiq', '~> 5.2' # our monkey patch doesn't work on 6.0+

How bundleup works

bundleup starts by making a backup copy of your Gemfile.lock. Next it runs bundle check (and bundle install if any gems are missing in your local environment), bundle list, then bundle update and bundle list again to find what gems versions are being used before and after Bundler does its updating magic. (Since gems are actually being installed into your Ruby environment during these steps, the process may take a few moments to complete, especially if gems with native extensions need to be compiled.)

Finally, bundleup runs bundle outdated to see the gems that were not updated due to Gemfile restrictions.

After displaying its findings, bundleup gives you the option of keeping the changes. If you answer "no", bundleup will restore your original Gemfile.lock from its backup, leaving your project untouched.

Roadmap

bundleup is very simple at this point, but it could be more. Some possibilities:

  • Automatically commit the Gemfile.lock changes with a nice commit message
  • Integrate with bundler-audit to mark upgrades that have important security fixes
  • Display relevant CHANGELOG entries for major upgrades
  • Non-interactive mode

If you have other ideas, open an issue on GitHub!

Contributing

Code contributions are also welcome! Read CONTRIBUTING.md to get started.

More Repositories

1

rails-template

My former app template for Rails 7. All recommendations you see here have been moved to https://github.com/mattbrictson/nextgen
Ruby
1,084
star
2

airbrussh

Airbrussh pretties up your SSHKit and Capistrano output
Ruby
512
star
3

tomo

A friendly and extensible CLI for deploying Rails apps via SSH
Ruby
379
star
4

chandler

[unmaintained] chandler syncs your CHANGELOG entries to GitHub's release notes
Ruby
152
star
5

nextgen

Generate your next Rails app interactively! This template includes production-ready recommendations for testing, security, developer productivity, and modern frontends. Plus optional Vite support! ⚡️
Ruby
132
star
6

capistrano-mb

[unmaintained] Capistrano tasks for deploying Rails from scratch to Ubuntu 16.04 and 18.04
Ruby
119
star
7

bundle_update_interactive

A stylish interactive mode for Bundler, inspired by `yarn upgrade-interactive`
Ruby
101
star
8

rails-starter

I've stopped maintaining this project after reaching Rails 4.1.6. For new versions of Rails, and for my latest Rails configuration suggestions, please use mattbrictson/rails-template.
Ruby
99
star
9

dotfiles

bash, git, rails, Sublime Text 3, homebrew, more...
Ruby
84
star
10

gem

A GitHub template for creating Ruby gems
Ruby
42
star
11

pgcli-rails

Replaces Rails PostgreSQL `dbconsole` with the much nicer `pgcli`
Ruby
33
star
12

minitest-snapshots

Minitest plugin for asserting that strings are the same as a saved snapshot, jest style
Ruby
33
star
13

mighty_test

A modern, TDD-friendly Minitest runner for Ruby projects! Includes a Jest-inspired interactive watch mode, focus mode, CI sharding, fail-fast, and more.
Ruby
6
star
14

jess

Lightweight, unofficial client for the JAMF Software Server (JSS) API
Ruby
5
star
15

tomo-plugin-sidekiq

sidekiq tasks for tomo
Ruby
4
star
16

tomo-plugin

A GitHub template for creating tomo plugins
Ruby
2
star
17

tomo-plugin-nvm

tomo plugin to manage node and yarn via nvm
Ruby
2
star
18

tomo-plugin-rollbar

rollbar tasks for tomo
Ruby
2
star
19

rails-new

Ruby
1
star