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

pages.rb « entry « config « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 57d9e944f51d2df2ef5ee4b77034a318f13fcf01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true

module Gitlab
  module Ci
    class Config
      module Entry
        ##
        # Entry that represents the pages path prefix
        # Entry that represents the pages attributes
        #
        class Pages < ::Gitlab::Config::Entry::Node
          ALLOWED_KEYS = %i[path_prefix].freeze

          include ::Gitlab::Config::Entry::Attributable
          include ::Gitlab::Config::Entry::Validatable

          attributes ALLOWED_KEYS

          validations do
            validates :config, type: Hash
            validates :config, allowed_keys: ALLOWED_KEYS

            with_options allow_nil: true do
              validates :path_prefix, type: String
            end
          end
        end
      end
    end
  end
end