Files
gitlabhq/lib/gitlab/import_export.rb
Rémy CoutableandRobert Speicher 6e8864132e Merge branch 'fix/import-export-events' into 'master'
Fixing problems with events for import/export

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19202

A couple of issues related to target being missing in exported `Events` (as being polymorphic and not have `ActiveRecord` relationships is a bit more tricky than normal models) plus as the export was in JSON, the import retrieves hashed fields as stringified hashes and not symbolized - so fixed that as well, which was the cause of https://gitlab.com/gitlab-org/gitlab-ce/issues/19202

Also fixed / refactored tests
:simpl
Import/Export Version has been bumped to 0.1.1 as theses changes to events won't work very well with old exports - forcing users to generate a new export in the new version.

See merge request !4987
(cherry picked from commit c368cb605b)
2016-07-06 12:43:23 -04:00

40 lines
616 B
Ruby

module Gitlab
module ImportExport
extend self
VERSION = '0.1.1'
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 version
VERSION
end
def reset_tokens?
true
end
end
end