diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-06-14 18:21:09 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-18 19:14:15 +0900 |
commit | 5f8ee14b9bc550394541a78046ce43b5ba59d924 (patch) | |
tree | b6ec428204d1ec5b68791a1d7aa3248aaa335b58 /spec | |
parent | f217faf1da7dd38a5f110162adfb94c94782e06b (diff) |
[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
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3212
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/update/git_spec.rb | 18 |
1 files changed, 9 insertions, 9 deletions
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 |