Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gem and bundler? #13

Open
jaredbeck opened this issue Apr 28, 2021 · 4 comments
Open

Update gem and bundler? #13

jaredbeck opened this issue Apr 28, 2021 · 4 comments

Comments

@jaredbeck
Copy link
Contributor

Before running bundle outdated, it's desirable to have the latest gem and bundler.

gem update --system
bundle update --bundler
# commit -m "bundler x (was y)"

Should this be automatic? If so, should there be a CLI option to disable it?

@shanecav84
Copy link
Member

bunup operates in the context of a Gemfile, so this would step out of those bounds. Not against the idea though, we do a similar thing in libyear where we also check for the Ruby version (maybe we should check the gem and bundler versions there as well).

Given that this change would be out the bounds of a Gemfile, we could either/or add flags to enable/disable, and also add a confirmation step like we do with major release semver updates.

@jaredbeck
Copy link
Contributor Author

Thanks for the quick feedback!

My motivation here is that bunup depends on bundle outdated to be correct. Some recent bundler versions have bugs in outdated, like rubygems/rubygems#4451.

So, at a minimum, I think a warning is warranted, but I think it'd be convenient to automatically update gem and bundler. For experts who must use old versions, we could have CLI options like --no-update-rubygems, and --no-update-bundler. I'd suggest we avoid interactive prompts, so that bunup can be used from non-interactive scripts.

@shanecav84
Copy link
Member

That all sounds good. I think the interactive prompt should be the default because the primary use case is updating a project's dependencies which should require some interactivity for some semver updates. We do have the -y --yes --assume-yes for bypassing the prompts.

I can look into adding this soon. I've been meaning to give the bunup a good once-over.

@jaredbeck
Copy link
Contributor Author

We do have the -y --yes --assume-yes for bypassing the prompts.

Oh right, there's a prompt about major-version updates, isn't there? I forgot about that.

We'd phrase the prompt so that --yes would automatically update gem and bundler?

I can look into adding this soon.

It's not urgent, just a random thought I had, but if it interests you, go for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants