Commit 41f9d9d9 authored by James Lopez's avatar James Lopez

Merge branch 'feature/project-export' of gitlab.com:gitlab-org/gitlab-ce into...

Merge branch 'feature/project-export' of gitlab.com:gitlab-org/gitlab-ce into feature/project-import
parents 2e1decd0 2dff04f2
......@@ -9,5 +9,13 @@ module Gitlab
def storage_path
File.join(Settings.shared['path'], 'tmp/project_exports')
end
def project_filename
"project.json"
end
def project_bundle_filename
"project.bundle"
end
end
end
......@@ -6,7 +6,7 @@ module Gitlab
def initialize(project:, shared:)
@project = project
@shared = shared
@full_path = File.join(@shared.export_path, project_filename)
@full_path = File.join(@shared.export_path, ImportExport.project_filename)
end
def save
......@@ -20,11 +20,6 @@ module Gitlab
private
# TODO remove magic keyword and move it to a shared config
def project_filename
"project.json"
end
def project_json_tree
@project.to_json(Gitlab::ImportExport::ImportExportReader.new(shared: @shared).project_tree)
end
......
......@@ -12,7 +12,7 @@ module Gitlab
def bundle
return false if @project.empty_repo?
@full_path = File.join(@shared.export_path, project_filename)
@full_path = File.join(@shared.export_path, ImportExport.project_bundle_filename)
bundle_to_disk
end
......@@ -26,11 +26,6 @@ module Gitlab
false
end
# TODO remove magic keyword and move it to a shared config
def project_filename
"project.bundle"
end
def path_to_repo
@project.repository.path_to_repo
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