Merge pull request #107 from clowder/order-options-dig

Avoid `[ActiveSupport::OrderedOptions#dig]`
This commit is contained in:
David Heinemeier Hansson
2023-03-13 15:08:31 +01:00
committed by GitHub
7 changed files with 25 additions and 9 deletions

View File

@@ -55,7 +55,7 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
private
def cmd_option_args
if args = config.raw_config.dig(:traefik, "args")
if args = config.traefik["args"]
optionize args
else
[]
@@ -63,6 +63,6 @@ class Mrsk::Commands::Traefik < Mrsk::Commands::Base
end
def host_port
config.raw_config.dig(:traefik, "host_port") || CONTAINER_PORT
config.traefik["host_port"] || CONTAINER_PORT
end
end

View File

@@ -165,6 +165,9 @@ class Mrsk::Configuration
}.compact
end
def traefik
raw_config.traefik || {}
end
private
# Will raise ArgumentError if any required config keys are missing