diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-01-17 20:53:52 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-03-17 18:50:55 +0900 |
commit | ddc4fd5644ae40e6b817fc534f0de0f9c867e7b7 (patch) | |
tree | 6555d7277c3afbfb4f66bd2eb0dc243ee90798f2 /spec/bundler | |
parent | 7800d4eeb5cfcd367a596044c183c547642066e2 (diff) | |
download | ruby-ddc4fd5644ae40e6b817fc534f0de0f9c867e7b7.tar.gz |
Normalize git sources
Just like gem sources, a "style-only" change, like adding a trailing
slash, should not expire them.
Diffstat (limited to 'spec/bundler')
-rw-r--r-- | spec/bundler/commands/lock_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/bundler/commands/lock_spec.rb b/spec/bundler/commands/lock_spec.rb index 8663cda643..160a17bf55 100644 --- a/spec/bundler/commands/lock_spec.rb +++ b/spec/bundler/commands/lock_spec.rb @@ -140,6 +140,24 @@ RSpec.describe "bundle lock" do expect(read_lockfile).to eq(@lockfile) end + it "does not unlock git sources when only uri shape changes" do + build_git("foo") + + install_gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem "foo", :git => "#{file_uri_for(lib_path("foo-1.0"))}" + G + + # Change uri format to end with "/" and reinstall + install_gemfile <<-G, :verbose => true + source "#{file_uri_for(gem_repo1)}" + gem "foo", :git => "#{file_uri_for(lib_path("foo-1.0"))}/" + G + + expect(out).to include("using resolution from the lockfile") + expect(out).not_to include("re-resolving dependencies because the list of sources changed") + end + it "errors when updating a missing specific gems using --update" do lockfile @lockfile |