instance method validate_string_or_one_item_array!

Ruby on Rails 2.11.0

Since v1.9.3 Last seen in v2.11.0 Private

Available in: v1.9.3 v2.0.0 v2.1.2 v2.2.2 v2.3.0 v2.4.0 v2.5.3 v2.6.1 v2.7.0 v2.8.2 v2.9.0 v2.10.1 v2.11.0

Signature

validate_string_or_one_item_array!(key)

No documentation comment.

Parameters

key req
Source
# File lib/kamal/configuration/validator/registry.rb, line 14
    def validate_string_or_one_item_array!(key)
      with_context(key) do
        value = config[key]

        unless config["server"]&.match?("^localhost[:$]")
          error "is required" unless value.present?

          unless value.is_a?(String) || (value.is_a?(Array) && value.size == 1 && value.first.is_a?(String))
            error "should be a string or an array with one string (for secret lookup)"
          end
        end
      end
    end

Defined in lib/kamal/configuration/validator/registry.rb line 14 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Kamal::Configuration::Validator::Registry

Type at least 2 characters to search.

↑↓ navigate · open · esc close