[rubygems/rubygems] Fix bundle update --redownload

It now does the redownloading/installing just like bundle install --redownload

https://github.com/rubygems/rubygems/commit/3b058e5eca
This commit is contained in:
Samuel Giddins 2023-08-28 18:31:52 -07:00 коммит произвёл git
Родитель f37f357e80
Коммит 7a5df9d0ed
2 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -63,6 +63,7 @@ module Bundler
opts = options.dup
opts["update"] = true
opts["local"] = options[:local]
opts["force"] = options[:redownload]
Bundler.settings.set_command_option_if_given :jobs, opts["jobs"]

Просмотреть файл

@ -30,5 +30,15 @@ RSpec.describe "bundle update" do
bundle "update rack --no-color --redownload"
expect(err).not_to include "[DEPRECATED] The `--force` option has been renamed to `--redownload`"
end
it "re-installs installed gems" do
rack_lib = default_bundle_path("gems/rack-1.0.0/lib/rack.rb")
rack_lib.open("w") {|f| f.write("blah blah blah") }
bundle :update, :redownload => true
expect(out).to include "Installing rack 1.0.0"
expect(rack_lib.open(&:read)).to eq("RACK = '1.0.0'\n")
expect(the_bundle).to include_gems "rack 1.0.0"
end
end
end