зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] The `--local` flag to `bundle install` shouldn't hit the network
If the cache was missing, `bundler` would try to re-fetch it. With the `--local` flag, it should just look at installed gems. https://github.com/rubygems/rubygems/commit/630d29c69e
This commit is contained in:
Родитель
7116ec6199
Коммит
0e01ad881a
|
@ -50,6 +50,7 @@ module Bundler
|
|||
return if @allow_cached
|
||||
|
||||
@specs = nil
|
||||
@allow_local = true
|
||||
@allow_cached = true
|
||||
end
|
||||
|
||||
|
|
|
@ -759,4 +759,22 @@ RSpec.describe "bundle install with gem sources" do
|
|||
)
|
||||
end
|
||||
end
|
||||
|
||||
context "with --local flag" do
|
||||
before do
|
||||
system_gems "rack-1.0.0", :path => default_bundle_path
|
||||
end
|
||||
|
||||
it "respects installed gems without fetching any remote sources" do
|
||||
install_gemfile <<-G, :local => true
|
||||
source "#{file_uri_for(gem_repo1)}"
|
||||
|
||||
source "https://not-existing-source" do
|
||||
gem "rack"
|
||||
end
|
||||
G
|
||||
|
||||
expect(last_command).to be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче