Commit cdecb637 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Rename more path_with_namespace -> full_path or disk_path

parent 8fe3fa13
...@@ -979,8 +979,9 @@ class Project < ActiveRecord::Base ...@@ -979,8 +979,9 @@ class Project < ActiveRecord::Base
# Expires various caches before a project is renamed. # Expires various caches before a project is renamed.
def expire_caches_before_rename(old_path) def expire_caches_before_rename(old_path)
repo = Repository.new(old_path, self) # TODO: if we start using UUIDs for cache, we don't need to do this HACK anymore
wiki = Repository.new("#{old_path}.wiki", self) repo = Repository.new(old_path, old_path, self)
wiki = Repository.new("#{old_path}.wiki", "#{old_path}.wiki", self)
if repo.exists? if repo.exists?
repo.before_delete repo.before_delete
......
...@@ -54,7 +54,7 @@ class ProjectWiki ...@@ -54,7 +54,7 @@ class ProjectWiki
# No need to have a Kerberos Web url. Kerberos URL will be used only to clone # No need to have a Kerberos Web url. Kerberos URL will be used only to clone
def kerberos_url_to_repo def kerberos_url_to_repo
[Gitlab.config.build_gitlab_kerberos_url, "/", path_with_namespace, ".git"].join('') [Gitlab.config.build_gitlab_kerberos_url, '/', full_path, '.git'].join('')
end end
def wiki_base_path def wiki_base_path
......
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
= render "projects/settings/head" = render "projects/settings/head"
%h3.page-title Project Audit Events %h3.page-title Project Audit Events
%p.light Events in #{@project.path_with_namespace} %p.light Events in #{@project.full_path}
= render 'shared/audit_events/event_table', events: @events = render 'shared/audit_events/event_table', events: @events
...@@ -99,13 +99,13 @@ describe Banzai::Filter::UploadLinkFilter do ...@@ -99,13 +99,13 @@ describe Banzai::Filter::UploadLinkFilter do
it 'rebuilds relative URL for a link' do it 'rebuilds relative URL for a link' do
doc = filter(link('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg')) doc = filter(link('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg'))
expect(doc.at_css('a')['href']) expect(doc.at_css('a')['href'])
.to eq "#{geo_url}/#{project.path_with_namespace}/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg" .to eq "#{geo_url}/#{project.full_path}/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg"
end end
it 'rebuilds relative URL for an image' do it 'rebuilds relative URL for an image' do
doc = filter(link('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg')) doc = filter(link('/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg'))
expect(doc.at_css('a')['href']) expect(doc.at_css('a')['href'])
.to eq "#{geo_url}/#{project.path_with_namespace}/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg" .to eq "#{geo_url}/#{project.full_path}/uploads/e90decf88d8f96fe9e1389afc2e4a91f/test.jpg"
end end
it 'does not modify absolute URL' do it 'does not modify absolute URL' do
......
...@@ -55,7 +55,7 @@ describe ProjectWiki do ...@@ -55,7 +55,7 @@ describe ProjectWiki do
describe "#kerberos_url_to_repo" do describe "#kerberos_url_to_repo" do
it 'returns valid kerberos url for this repo' do it 'returns valid kerberos url for this repo' do
gitlab_kerberos_url = Gitlab.config.build_gitlab_kerberos_url gitlab_kerberos_url = Gitlab.config.build_gitlab_kerberos_url
repo_kerberos_url = "#{gitlab_kerberos_url}/#{subject.path_with_namespace}.git" repo_kerberos_url = "#{gitlab_kerberos_url}/#{subject.full_path}.git"
expect(subject.kerberos_url_to_repo).to eq(repo_kerberos_url) expect(subject.kerberos_url_to_repo).to eq(repo_kerberos_url)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment