зеркало из https://github.com/github/ruby.git
[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:
Родитель
f37f357e80
Коммит
7a5df9d0ed
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче