Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/static_site_editor/config/file_config')
-rw-r--r--lib/gitlab/static_site_editor/config/file_config/entry/global.rb39
-rw-r--r--lib/gitlab/static_site_editor/config/file_config/entry/image_upload_path.rb26
-rw-r--r--lib/gitlab/static_site_editor/config/file_config/entry/mount.rb39
-rw-r--r--lib/gitlab/static_site_editor/config/file_config/entry/mounts.rb33
-rw-r--r--lib/gitlab/static_site_editor/config/file_config/entry/static_site_generator.rb26
5 files changed, 0 insertions, 163 deletions
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
deleted file mode 100644
index c295ccf1d11..00000000000
--- a/lib/gitlab/static_site_editor/config/file_config/entry/global.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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
diff --git a/lib/gitlab/static_site_editor/config/file_config/entry/image_upload_path.rb b/lib/gitlab/static_site_editor/config/file_config/entry/image_upload_path.rb
deleted file mode 100644
index 6a2b9e10d33..00000000000
--- a/lib/gitlab/static_site_editor/config/file_config/entry/image_upload_path.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module StaticSiteEditor
- module Config
- class FileConfig
- module Entry
- ##
- # Entry that represents the path to which images will be uploaded
- #
- class ImageUploadPath < ::Gitlab::Config::Entry::Node
- include ::Gitlab::Config::Entry::Validatable
-
- validations do
- validates :config, type: String
- end
-
- def self.default
- 'source/images'
- end
- end
- end
- end
- end
- end
-end
diff --git a/lib/gitlab/static_site_editor/config/file_config/entry/mount.rb b/lib/gitlab/static_site_editor/config/file_config/entry/mount.rb
deleted file mode 100644
index b10956e17a5..00000000000
--- a/lib/gitlab/static_site_editor/config/file_config/entry/mount.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module StaticSiteEditor
- module Config
- class FileConfig
- module Entry
- ##
- # Entry that represents the mappings of mounted source directories to target paths
- #
- class Mount < ::Gitlab::Config::Entry::Node
- include ::Gitlab::Config::Entry::Validatable
- include ::Gitlab::Config::Entry::Attributable
-
- ALLOWED_KEYS = %i[source target].freeze
-
- attributes ALLOWED_KEYS
-
- validations do
- validates :config, allowed_keys: ALLOWED_KEYS
-
- validates :source, type: String, presence: true
- validates :target, type: String, presence: true, allow_blank: true
- end
-
- def self.default
- # NOTE: This is the default for middleman projects. Ideally, this would be determined
- # based on the defaults for whatever `static_site_generator` is configured.
- {
- source: 'source',
- target: ''
- }
- end
- end
- end
- end
- end
- end
-end
diff --git a/lib/gitlab/static_site_editor/config/file_config/entry/mounts.rb b/lib/gitlab/static_site_editor/config/file_config/entry/mounts.rb
deleted file mode 100644
index 10bd377e419..00000000000
--- a/lib/gitlab/static_site_editor/config/file_config/entry/mounts.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module StaticSiteEditor
- module Config
- class FileConfig
- module Entry
- ##
- # Entry that represents the mappings of mounted source directories to target paths
- #
- class Mounts < ::Gitlab::Config::Entry::Node
- include ::Gitlab::Config::Entry::Configurable
- include ::Gitlab::Config::Entry::Validatable
-
- entry :mount, Entry::Mount, description: 'Configuration of a Static Site Editor mount.'
-
- validations do
- validates :config, type: Array, presence: true
- end
-
- def skip_config_hash_validation?
- true
- end
-
- def self.default
- [Entry::Mount.default]
- end
- end
- end
- end
- end
- end
-end
diff --git a/lib/gitlab/static_site_editor/config/file_config/entry/static_site_generator.rb b/lib/gitlab/static_site_editor/config/file_config/entry/static_site_generator.rb
deleted file mode 100644
index 593c0951f93..00000000000
--- a/lib/gitlab/static_site_editor/config/file_config/entry/static_site_generator.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module StaticSiteEditor
- module Config
- class FileConfig
- module Entry
- ##
- # Entry that represents the static site generator tool/framework.
- #
- class StaticSiteGenerator < ::Gitlab::Config::Entry::Node
- include ::Gitlab::Config::Entry::Validatable
-
- validations do
- validates :config, type: String, inclusion: { in: %w[middleman], message: "should be 'middleman'" }
- end
-
- def self.default
- 'middleman'
- end
- end
- end
- end
- end
- end
-end