Revert "Merge branch 'wiki-fix' into 'master'

This reverts commit 4cc85a58e8, reversing
changes made to 90ae445ba9.

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2016-05-10 10:56:58 +02:00
parent 3dc64764ad
commit f52a15e022
No known key found for this signature in database
GPG Key ID: 46DF07E5CD9E96AB
5 changed files with 4 additions and 7 deletions

View File

@ -39,7 +39,6 @@ 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)
- Links for Redmine issue references are generated correctly again (Benedikt Huss)
v 8.7.3

View File

@ -40,7 +40,7 @@ class ProjectWiki
end
def wiki_base_path
[Gitlab.config.gitlab.url, "/", @project.path_with_namespace, "/wikis"].join('')
["/", @project.path_with_namespace, "/wikis"].join('')
end
# Returns the Gollum::Wiki object.

View File

@ -62,7 +62,7 @@ module Gitlab
end
def wiki_page_url
"#{object.wiki.wiki_base_path}/#{object.slug}"
"#{Gitlab.config.gitlab.url}#{object.wiki.wiki_base_path}/#{object.slug}"
end
end
end

View File

@ -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.project.path_with_namespace}/wikis/#{wiki_page.slug}"
expect(url).to eq "#{Gitlab.config.gitlab.url}#{wiki_page.wiki.wiki_base_path}/#{wiki_page.slug}"
end
end
end

View File

@ -38,9 +38,7 @@ describe ProjectWiki, models: true do
describe "#wiki_base_path" do
it "returns the wiki base path" do
gitlab_url = Gitlab.config.gitlab.url
wiki_base_path = "#{gitlab_url}/#{project.path_with_namespace}/wikis"
wiki_base_path = "/#{project.path_with_namespace}/wikis"
expect(subject.wiki_base_path).to eq(wiki_base_path)
end
end