Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #1782. Don't remove duplicate PATH sources

When using specifying version number, you can have multiple PATH
sections for the same source.

We were over eager in
bundler@e31a1c7#L1R51.
We should only remove the duplicate GIT sources, so let's explicitly
check for that.
  • Loading branch information...
commit d24e788a9fbe84d632bad4b185aa09ccd7a4d919 1 parent b8d0a41
@hone hone authored
Showing with 15 additions and 1 deletion.
  1. +1 −1  lib/bundler/lockfile_parser.rb
  2. +14 −0 spec/install/deploy_spec.rb
View
2  lib/bundler/lockfile_parser.rb
@@ -49,7 +49,7 @@ def parse_source(line)
@current_source = TYPES[@type].from_lock(@opts)
# Strip out duplicate GIT sections
- if @sources.include?(@current_source)
+ if @sources.include?(@current_source) && @current_source.is_a?(Bundler::Source::Git)
@current_source = @sources.find { |s| s == @current_source }
end
View
14 spec/install/deploy_spec.rb
@@ -53,6 +53,20 @@
exitstatus.should == 0
end
+ it "works when using path gems from the same path and the version is specified" do
+ build_lib "foo", :path => lib_path("nested/foo")
+ build_lib "bar", :path => lib_path("nested/bar")
+ gemfile <<-G
+ gem "foo", "1.0", :path => "#{lib_path("nested")}"
+ gem "bar", :path => "#{lib_path("nested")}"
+ G
+
+ bundle :install
+ bundle "install --deployment", :exitstatus => true
+
+ exitstatus.should == 0
+ end
+
describe "with an existing lockfile" do
before do
bundle "install"
Please sign in to comment.
Something went wrong with that request. Please try again.