summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-04 15:07:58 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-07 09:57:10 +0100
commit0745c69dc175927e621b2cfdc78849b3417b74eb (patch)
tree55d248737bf1d704515c589e05d48bcf039af172
parent0286c16da115dc611ece1f0b18dfbf69e3ee98d7 (diff)
downloadbundler-0745c69dc175927e621b2cfdc78849b3417b74eb.tar.gz
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.
-rw-r--r--spec/install/git_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb
index cc8bf70b03..91958e55dc 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/git_spec.rb
@@ -6,11 +6,11 @@ RSpec.describe "bundle install" do
build_git "foo", "1.0", :path => lib_path("foo")
install_gemfile <<-G
- gem "foo", :git => "#{lib_path("foo")}"
+ gem "foo", :git => "#{file_uri_for(lib_path("foo"))}"
G
bundle! :install
- expect(out).to include("Using foo 1.0 from #{lib_path("foo")} (at master@#{revision_for(lib_path("foo"))[0..6]})")
+ expect(out).to include("Using foo 1.0 from #{file_uri_for(lib_path("foo"))} (at master@#{revision_for(lib_path("foo"))[0..6]})")
expect(the_bundle).to include_gems "foo 1.0", :source => "git@#{lib_path("foo")}"
end
@@ -22,17 +22,17 @@ RSpec.describe "bundle install" do
update_git "foo", "3.0", :path => lib_path("foo"), :gemspec => true
install_gemfile! <<-G
- gem "foo", :git => "#{lib_path("foo")}", :ref => "master~2"
+ gem "foo", :git => "#{file_uri_for(lib_path("foo"))}", :ref => "master~2"
G
bundle! :install
- expect(out).to include("Using foo 1.0 from #{lib_path("foo")} (at master~2@#{rev})")
+ expect(out).to include("Using foo 1.0 from #{file_uri_for(lib_path("foo"))} (at master~2@#{rev})")
expect(the_bundle).to include_gems "foo 1.0", :source => "git@#{lib_path("foo")}"
update_git "foo", "4.0", :path => lib_path("foo"), :gemspec => true
bundle! :update, :all => true
- expect(out).to include("Using foo 2.0 (was 1.0) from #{lib_path("foo")} (at master~2@#{rev2})")
+ expect(out).to include("Using foo 2.0 (was 1.0) from #{file_uri_for(lib_path("foo"))} (at master~2@#{rev2})")
expect(the_bundle).to include_gems "foo 2.0", :source => "git@#{lib_path("foo")}"
end
@@ -71,8 +71,8 @@ RSpec.describe "bundle install" do
install_gemfile <<-G
source "#{file_uri_for(gem_repo2)}"
- gem "foo", :git => "#{lib_path("gems")}", :glob => "foo/*.gemspec"
- gem "zebra", :git => "#{lib_path("gems")}", :glob => "zebra/*.gemspec"
+ gem "foo", :git => "#{file_uri_for(lib_path("gems"))}", :glob => "foo/*.gemspec"
+ gem "zebra", :git => "#{file_uri_for(lib_path("gems"))}", :glob => "zebra/*.gemspec"
G
bundle "info foo"