Class: Kamal::Configuration::Registry

Inherits:
Object
  • Object
show all
Includes:
Validation
Defined in:
lib/kamal/configuration/registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Validation

#validate!, #validation_yml

Constructor Details

#initialize(config:) ⇒ Registry

Returns a new instance of Registry.



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

def initialize(config:)
  @registry_config = config.raw_config.registry || {}
  @secrets = config.secrets
  validate! registry_config, with: Kamal::Configuration::Validator::Registry
end

Instance Attribute Details

#registry_configObject (readonly)

Returns the value of attribute registry_config.



4
5
6
# File 'lib/kamal/configuration/registry.rb', line 4

def registry_config
  @registry_config
end

#secretsObject (readonly)

Returns the value of attribute secrets.



4
5
6
# File 'lib/kamal/configuration/registry.rb', line 4

def secrets
  @secrets
end

Instance Method Details

#passwordObject



20
21
22
# File 'lib/kamal/configuration/registry.rb', line 20

def password
  lookup("password")
end

#serverObject



12
13
14
# File 'lib/kamal/configuration/registry.rb', line 12

def server
  registry_config["server"]
end

#usernameObject



16
17
18
# File 'lib/kamal/configuration/registry.rb', line 16

def username
  lookup("username")
end