Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cdecb637
Commit
cdecb637
authored
Jul 22, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename more path_with_namespace -> full_path or disk_path
parent
8fe3fa13
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
app/models/project.rb
app/models/project.rb
+3
-2
app/models/project_wiki.rb
app/models/project_wiki.rb
+1
-1
app/views/projects/audit_events/index.html.haml
app/views/projects/audit_events/index.html.haml
+1
-1
spec/lib/banzai/filter/upload_link_filter_spec.rb
spec/lib/banzai/filter/upload_link_filter_spec.rb
+2
-2
spec/models/project_wiki_spec.rb
spec/models/project_wiki_spec.rb
+1
-1
No files found.
app/models/project.rb
View file @
cdecb637
...
@@ -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
...
...
app/models/project_wiki.rb
View file @
cdecb637
...
@@ -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
...
...
app/views/projects/audit_events/index.html.haml
View file @
cdecb637
...
@@ -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
spec/lib/banzai/filter/upload_link_filter_spec.rb
View file @
cdecb637
...
@@ -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
...
...
spec/models/project_wiki_spec.rb
View file @
cdecb637
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment