This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The test here is incorrect, but the fix looks good. The test should be modified like this to actually catch the issue: diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb
index 93b90a705..2ce5ddf15 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/git_spec.rb
@@ -64,18 +64,19 @@ RSpec.describe "bundle install" do
it "allows multiple gems from the same git source" do
build_repo2 do
- build_git "foo", "1.0", :path => lib_path("foo")
- build_git "zebra", "2.0", :path => lib_path("zebra")
+ build_lib "foo", "1.0", :path => lib_path("gems/foo")
+ build_lib "zebra", "2.0", :path => lib_path("gems/zebra")
+ build_git "gems", :path => lib_path("gems"), :gemspec => false
end
install_gemfile <<-G
source "#{file_uri_for(gem_repo2)}"
- gem "foo", :git => "#{lib_path("foo")}"
- gem "zebra", :git => "#{lib_path("zebra")}"
+ gem "foo", :git => "#{lib_path("gems")}", :glob => "foo/*.gemspec"
+ gem "zebra", :git => "#{lib_path("gems")}", :glob => "zebra/*.gemspec"
G
- 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 zebra 2.0 from #{lib_path("zebra")} (at master@#{revision_for(lib_path("zebra"))[0..6]})")
+ expect(out).to include("Using foo 1.0 from #{lib_path("gems")} (at master@#{revision_for(lib_path("gems"))[0..6]})")
+ expect(out).to include("Using zebra 2.0 from #{lib_path("gems")} (at master@#{revision_for(lib_path("gems"))[0..6]})")
end
end
end |
fatkodima
force-pushed
the
git-source-uniqueness
branch
from
November 20, 2019 12:07
93db2aa
to
b511734
Compare
@deivid-rodriguez Updated with your suggestion. |
Ok! Now I see that CI is failing in Bundler 3 mode because You can test the same thing in another way with something like: diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb
index 93b90a705..3bc8e1c06 100644
--- a/spec/install/git_spec.rb
+++ b/spec/install/git_spec.rb
@@ -74,8 +74,11 @@ RSpec.describe "bundle install" do
gem "zebra", :git => "#{lib_path("zebra")}"
G
- 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 zebra 2.0 from #{lib_path("zebra")} (at master@#{revision_for(lib_path("zebra"))[0..6]})")
+ bundle "info foo"
+ expect(out).to include("* foo (1.0 #{revision_for(lib_path("foo"))[0..6]})")
+
+ bundle "info zebra"
+ expect(out).to include("* zebra (2.0 #{revision_for(lib_path("zebra"))[0..6]})")
end
end
end On a side note, I think we might want to still print the "Using" messages on the first |
fatkodima
force-pushed
the
git-source-uniqueness
branch
from
November 21, 2019 12:57
b511734
to
5c93791
Compare
@deivid-rodriguez Got it. Updated. |
deivid-rodriguez
approved these changes
Nov 21, 2019
@bundlerbot merge |
ghost
pushed a commit
that referenced
this pull request
Nov 26, 2019
Build succeeded |
This pull request was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #7346