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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
14b36f91
Commit
14b36f91
authored
May 03, 2016
by
Artem Sidorenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the proper GitLab URL for links in Wiki
parent
0a103e98
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
4 deletions
+7
-4
CHANGELOG
CHANGELOG
+1
-0
app/models/project_wiki.rb
app/models/project_wiki.rb
+1
-1
lib/gitlab/url_builder.rb
lib/gitlab/url_builder.rb
+1
-1
spec/lib/gitlab/url_builder_spec.rb
spec/lib/gitlab/url_builder_spec.rb
+1
-1
spec/models/project_wiki_spec.rb
spec/models/project_wiki_spec.rb
+3
-1
No files found.
CHANGELOG
View file @
14b36f91
...
...
@@ -36,6 +36,7 @@ v 8.8.0 (unreleased)
v 8.7.4
- Fix always showing build notification message when switching between merge requests
- Fix links on wiki pages for relative url setups. !4026 (Artem Sidorenko)
v 8.7.3
- Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented
...
...
app/models/project_wiki.rb
View file @
14b36f91
...
...
@@ -40,7 +40,7 @@ class ProjectWiki
end
def
wiki_base_path
[
"/"
,
@project
.
path_with_namespace
,
"/wikis"
].
join
(
''
)
[
Gitlab
.
config
.
gitlab
.
url
,
"/"
,
@project
.
path_with_namespace
,
"/wikis"
].
join
(
''
)
end
# Returns the Gollum::Wiki object.
...
...
lib/gitlab/url_builder.rb
View file @
14b36f91
...
...
@@ -62,7 +62,7 @@ module Gitlab
end
def
wiki_page_url
"
#{
Gitlab
.
config
.
gitlab
.
url
}#{
object
.
wiki
.
wiki_base_path
}
/
#{
object
.
slug
}
"
"
#{
object
.
wiki
.
wiki_base_path
}
/
#{
object
.
slug
}
"
end
end
end
spec/lib/gitlab/url_builder_spec.rb
View file @
14b36f91
...
...
@@ -112,7 +112,7 @@ describe Gitlab::UrlBuilder, lib: true do
wiki_page
=
build
(
:wiki_page
)
url
=
described_class
.
build
(
wiki_page
)
expect
(
url
).
to
eq
"
#{
Gitlab
.
config
.
gitlab
.
url
}
#{
wiki_page
.
wiki
.
wiki_base_path
}
/
#{
wiki_page
.
slug
}
"
expect
(
url
).
to
eq
"
#{
Gitlab
.
config
.
gitlab
.
url
}
/
#{
wiki_page
.
wiki
.
project
.
path_with_namespace
}
/wikis
/
#{
wiki_page
.
slug
}
"
end
end
end
...
...
spec/models/project_wiki_spec.rb
View file @
14b36f91
...
...
@@ -38,7 +38,9 @@ describe ProjectWiki, models: true do
describe
"#wiki_base_path"
do
it
"returns the wiki base path"
do
wiki_base_path
=
"/
#{
project
.
path_with_namespace
}
/wikis"
gitlab_url
=
Gitlab
.
config
.
gitlab
.
url
wiki_base_path
=
"
#{
gitlab_url
}
/
#{
project
.
path_with_namespace
}
/wikis"
expect
(
subject
.
wiki_base_path
).
to
eq
(
wiki_base_path
)
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