-
Notifications
You must be signed in to change notification settings - Fork 0
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
Warn if bundler version older than in lockfile #8
base: 2-0-dev
Are you sure you want to change the base?
Warn if bundler version older than in lockfile #8
Conversation
looking good! Next you probably need to add the Bundler version ( |
@indirect created a new branch and added changes https://github.com/RGSoCBundler/bundler/compare/warn-outdated |
…install on machine
…t Bundler version that is doing the bundle installing
…er version doing the bundle install
…r directory - /Users/joyce/ror/rails/bundler/bundler/tmp/bundled_app/Gemfile.lock (Errno::ENOENT)
…_bundler_version method
the old code was just using the version of Bundler that was running, not actually reading the version of Bundler that was in the lockfile.
we actually want to warn people that they should upgrade, not force them to always have to upgrade if they want to install.
it's not actually a list of locked gems, it's the LockfileParser that has parsed the current lock. so let's just call it a lock.
we already have a LockfileParser in Bundler.lock, so we can just use that one to get the locking Bundler version, instead of writing a new method that just gets us the Bundler version.
running the installer will write out a new lock file, because that is what installing does. so we save the bundler version before the installer runs, so we can check it later to print a warning about being out of date.
6:39 Jessica Suttles lots of failing specs though since bundler version is in lockfile now lockfile_should_be() is in spec/support/matchers.rb |
@jlsuttles @indirect I added the BUNDLER section to the lockfile_should_be(). I'm down to 3 failing specs on my machine (2, 3, 5 on TravisCI). I think 2,3 doesn't work now...because the matcher is |
Your persistence is to be commended 🎉, and I will review this very soon, I swear. :P |
end | ||
|
||
if !options[:all] && gems.empty? && sources.empty? | ||
return Bundler.ui.info("Are you sure you want to update every single gem in your bundle?!\n\nIf yes, run bundle update --all.\nIf you want to update an individual gem, run bundle update <gem_name>.\nIf not, have a good day!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these lines need to come back for bundle update to keep working
@indirect ahh this is still open, and growing stale. I haven't gotten to it. |
at least it doesn't get moldy 🌾 |
rubygems/bundler-features#17
indirect: This probably requires adding the version of Bundler that generated the lockfile to the lockfile. Since that is a change to the format of the lockfile, this change can't happen until 2.0. That said, I think that this is really important to do for 2.0, especially so that we can ask people to upgrade their old Bundler versions.
Goes on the 2-0-dev branch