diff options
author | Nick Thomas <nick@gitlab.com> | 2017-10-18 12:53:06 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-10-18 12:53:06 +0100 |
commit | 314e5b5f20889971fef092c26bcb675ac2af4b07 (patch) | |
tree | 700e58a1b4257881ef04267187b498a9138b7e62 | |
parent | e4b465d746675238f65dea1c98bcf71e8e4b0805 (diff) | |
download | gitlab-ce-314e5b5f20889971fef092c26bcb675ac2af4b07.tar.gz |
Use wiki.disk_path
-rw-r--r-- | app/services/projects/destroy_service.rb | 2 | ||||
-rw-r--r-- | lib/github/import.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/github_import/wiki_formatter.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/github_import/wiki_formatter_spec.rb | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/app/services/projects/destroy_service.rb b/app/services/projects/destroy_service.rb index 19d75ff2efa..81972df9b3c 100644 --- a/app/services/projects/destroy_service.rb +++ b/app/services/projects/destroy_service.rb @@ -51,7 +51,7 @@ module Projects end def wiki_path - repo_path + '.wiki' + project.wiki.disk_path end def trash_repositories! diff --git a/lib/github/import.rb b/lib/github/import.rb index 55f8387f27a..76612799412 100644 --- a/lib/github/import.rb +++ b/lib/github/import.rb @@ -74,7 +74,7 @@ module Github def fetch_wiki_repository return if project.wiki.repository_exists? - wiki_path = "#{project.disk_path}.wiki" + wiki_path = project.wiki.disk_path gitlab_shell.import_repository(project.repository_storage_path, wiki_path, wiki_url) rescue Gitlab::Shell::Error => e # GitHub error message when the wiki repo has not been created, diff --git a/lib/gitlab/github_import/wiki_formatter.rb b/lib/gitlab/github_import/wiki_formatter.rb index 0396122eeb9..ca8d96f5650 100644 --- a/lib/gitlab/github_import/wiki_formatter.rb +++ b/lib/gitlab/github_import/wiki_formatter.rb @@ -8,7 +8,7 @@ module Gitlab end def disk_path - "#{project.disk_path}.wiki" + project.wiki.disk_path end def import_url diff --git a/spec/lib/gitlab/github_import/wiki_formatter_spec.rb b/spec/lib/gitlab/github_import/wiki_formatter_spec.rb index fcd90fab547..2662cc20b32 100644 --- a/spec/lib/gitlab/github_import/wiki_formatter_spec.rb +++ b/spec/lib/gitlab/github_import/wiki_formatter_spec.rb @@ -11,7 +11,7 @@ describe Gitlab::GithubImport::WikiFormatter do describe '#disk_path' do it 'appends .wiki to project path' do - expect(wiki.disk_path).to eq project.disk_path + '.wiki' + expect(wiki.disk_path).to eq project.wiki.disk_path end end |