From 48aff82709769b098321c738f3444b9bdaa694c6 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 21 Oct 2020 07:08:36 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-5-stable-ee --- .../config/file_config/entry/global.rb | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 lib/gitlab/static_site_editor/config/file_config/entry/global.rb (limited to 'lib/gitlab/static_site_editor/config/file_config/entry/global.rb') diff --git a/lib/gitlab/static_site_editor/config/file_config/entry/global.rb b/lib/gitlab/static_site_editor/config/file_config/entry/global.rb new file mode 100644 index 00000000000..c295ccf1d11 --- /dev/null +++ b/lib/gitlab/static_site_editor/config/file_config/entry/global.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +module Gitlab + module StaticSiteEditor + module Config + class FileConfig + module Entry + ## + # This class represents a global entry - root Entry for entire + # GitLab StaticSiteEditor Configuration file. + # + class Global < ::Gitlab::Config::Entry::Node + include ::Gitlab::Config::Entry::Configurable + include ::Gitlab::Config::Entry::Attributable + + ALLOWED_KEYS = %i[ + image_upload_path + mounts + static_site_generator + ].freeze + + attributes ALLOWED_KEYS + + validations do + validates :config, allowed_keys: ALLOWED_KEYS + end + + entry :image_upload_path, Entry::ImageUploadPath, + description: 'Configuration of the Static Site Editor image upload path.' + entry :mounts, Entry::Mounts, + description: 'Configuration of the Static Site Editor mounts.' + entry :static_site_generator, Entry::StaticSiteGenerator, + description: 'Configuration of the Static Site Editor static site generator.' + end + end + end + end + end +end -- cgit v1.2.1