Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Fixed a bug that was not properly caching gems from all git repositories. #1253

Merged
merged 6 commits into from
Jun 28, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/bundler/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def git(command)
end

def base_name
File.basename(uri.sub(%r{^(\w+://)?([^/:]+:)},''), ".git")
File.basename(uri.sub(%r{^(\w+://)?([^/:]+:)?(//\w*/)?(\w*/)*},''),".git")
end

def shortref_for_display(ref)
Expand Down
7 changes: 5 additions & 2 deletions spec/cache/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
source = Bundler::Source::Git.new("uri" => "[email protected]:bundler.git")
source.send(:base_name).should == "bundler"
end
end


it "base_name should strip network share paths" do
source = Bundler::Source::Git.new("uri" => "//MachineName/ShareFolder")
source.send(:base_name).should == "ShareFolder"
end
end