Class: Kamal::Configuration::Validator::Registry

Inherits:
Kamal::Configuration::Validator show all
Defined in:
lib/kamal/configuration/validator/registry.rb

Constant Summary collapse

STRING_OR_ONE_ITEM_ARRAY_KEYS =
[ "username", "password" ]

Instance Attribute Summary

Attributes inherited from Kamal::Configuration::Validator

#config, #context, #example

Instance Method Summary collapse

Methods inherited from Kamal::Configuration::Validator

#initialize

Constructor Details

This class inherits a constructor from Kamal::Configuration::Validator

Instance Method Details

#validate!Object



4
5
6
7
8
9
10
11
# File 'lib/kamal/configuration/validator/registry.rb', line 4

def validate!
  validate_against_example! \
    config.except(*STRING_OR_ONE_ITEM_ARRAY_KEYS),
    example.except(*STRING_OR_ONE_ITEM_ARRAY_KEYS)

  validate_string_or_one_item_array! "username"
  validate_string_or_one_item_array! "password"
end