summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-07-31 15:39:45 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit0e01ad881a94d0195dcea36783f0bb525d054e7a (patch)
tree50f1509181852f0839a525dad3f3c8d968ee03fd /spec
parent7116ec6199ea55756154167676bb0c8296f8a391 (diff)
[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
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/commands/install_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb
index 412000341f..babb0c602f 100644
--- a/spec/bundler/commands/install_spec.rb
+++ b/spec/bundler/commands/install_spec.rb
@@ -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