gitlab-org--gitlab-foss/lib/gitlab/import_export.rb
James Lopez bf1ea8c6fe Squashed - fix encoding issue
WIP - trying to replicate UTF-8 error

fix spec

fixing encoding issue and another spec, to do with MR diffs

fix issue and spec failure

Add changelog and bumped up I/E version

fix spec based on feedback - omitted target project
2016-07-19 09:59:54 +02:00

46 lines
841 B
Ruby

module Gitlab
module ImportExport
extend self
VERSION = '0.1.2'
FILENAME_LIMIT = 50
def export_path(relative_path:)
File.join(storage_path, relative_path)
end
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
def config_file
Rails.root.join('lib/gitlab/import_export/import_export.yml')
end
def version_filename
'VERSION'
end
def export_filename(project:)
basename = "#{Time.now.strftime('%Y-%m-%d_%H-%M-%3N')}_#{project.namespace.path}_#{project.path}"
"#{basename[0..FILENAME_LIMIT]}_export.tar.gz"
end
def version
VERSION
end
def reset_tokens?
true
end
end
end