From 466668d4a809b2b68f722068945ba5f4a205ba0e Mon Sep 17 00:00:00 2001 From: charlieablett Date: Tue, 30 Apr 2019 17:19:19 +1200 Subject: [PATCH] Refactor AttributeCleaner` for readability --- lib/gitlab/import_export/attribute_cleaner.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/gitlab/import_export/attribute_cleaner.rb b/lib/gitlab/import_export/attribute_cleaner.rb index b27a2a9fb65..76d0053996d 100644 --- a/lib/gitlab/import_export/attribute_cleaner.rb +++ b/lib/gitlab/import_export/attribute_cleaner.rb @@ -4,6 +4,7 @@ module Gitlab module ImportExport class AttributeCleaner ALLOWED_REFERENCES = RelationFactory::PROJECT_REFERENCES + RelationFactory::USER_REFERENCES + ['group_id'] + PROHIBITED_SUFFIXES = %w(_id _html).freeze def self.clean(*args) new(*args).clean @@ -29,7 +30,7 @@ module Gitlab 'cached_markdown_version' == key || PROHIBITED_SUFFIXES.any? {|suffix| key.end_with?(suffix)} end - def allowed_reference?(key) + def permitted_key?(key) ALLOWED_REFERENCES.include?(key) end @@ -40,4 +41,4 @@ module Gitlab end end end -end +end \ No newline at end of file -- GitLab