From 5f8ee14b9bc550394541a78046ce43b5ba59d924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Sun, 14 Jun 2020 18:21:09 +0200 Subject: [rubygems/rubygems] Make sure to pass URI's to `:git` Passing paths should work in most cases, but on Windows the driver letter is interpreted as the scheme and causes some case mismatches because ``` irb> URI.parse("E:").to_s => "e:" ``` We fix this by passing file URI's instead. https://github.com/rubygems/rubygems/commit/b6bc517628 --- spec/bundler/update/git_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'spec') diff --git a/spec/bundler/update/git_spec.rb b/spec/bundler/update/git_spec.rb index 303593631f..8d42c2fcc3 100644 --- a/spec/bundler/update/git_spec.rb +++ b/spec/bundler/update/git_spec.rb @@ -28,7 +28,7 @@ RSpec.describe "bundle update" do end install_gemfile <<-G - gem "rails", :git => "#{lib_path("rails")}" + gem "rails", :git => "#{file_uri_for(lib_path("rails"))}" G bundle "update rails" @@ -61,7 +61,7 @@ RSpec.describe "bundle update" do end install_gemfile <<-G - gem "foo", :git => "#{lib_path("foo")}" + gem "foo", :git => "#{file_uri_for(lib_path("foo"))}" gem "bar" G @@ -79,17 +79,17 @@ RSpec.describe "bundle update" do build_git "foo", :path => lib_path("foo_two") install_gemfile <<-G - gem "foo", "1.0", :git => "#{lib_path("foo_one")}" + gem "foo", "1.0", :git => "#{file_uri_for(lib_path("foo_one"))}" G FileUtils.rm_rf lib_path("foo_one") install_gemfile <<-G - gem "foo", "1.0", :git => "#{lib_path("foo_two")}" + gem "foo", "1.0", :git => "#{file_uri_for(lib_path("foo_two"))}" G expect(err).to be_empty - expect(out).to include("Fetching #{lib_path}/foo_two") + expect(out).to include("Fetching #{file_uri_for(lib_path)}/foo_two") expect(out).to include("Bundle complete!") end @@ -184,7 +184,7 @@ RSpec.describe "bundle update" do build_git "foo", "1.0" install_gemfile <<-G - gem "foo", :git => "#{lib_path("foo-1.0")}" + gem "foo", :git => "#{file_uri_for(lib_path("foo-1.0"))}" G lib_path("foo-1.0").join(".git").rmtree @@ -203,7 +203,7 @@ RSpec.describe "bundle update" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" - gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master" + gem "rack", :git => "#{file_uri_for(lib_path("rack-0.8"))}", :branch => "master" G bundle %(config set local.rack #{lib_path("local-rack")}) @@ -215,13 +215,13 @@ RSpec.describe "bundle update" do build_git "rails", "2.3.2", :path => lib_path("rails") install_gemfile <<-G - gem "rails", :git => "#{lib_path("rails")}" + gem "rails", :git => "#{file_uri_for(lib_path("rails"))}" G update_git "rails", "3.0", :path => lib_path("rails"), :gemspec => true bundle "update", :all => true - expect(out).to include("Using rails 3.0 (was 2.3.2) from #{lib_path("rails")} (at master@#{revision_for(lib_path("rails"))[0..6]})") + expect(out).to include("Using rails 3.0 (was 2.3.2) from #{file_uri_for(lib_path("rails"))} (at master@#{revision_for(lib_path("rails"))[0..6]})") end end -- cgit v1.2.3