Replaced string interpolations with to build paths

This commit is contained in:
Igor Alexandrov
2024-03-28 20:25:24 +04:00
parent 8bb596e216
commit 511a182539
5 changed files with 5 additions and 5 deletions

View File

@@ -5,6 +5,6 @@ require "active_support"
require "zeitwerk" require "zeitwerk"
loader = Zeitwerk::Loader.for_gem loader = Zeitwerk::Loader.for_gem
loader.ignore("#{__dir__}/kamal/sshkit_with_ext.rb") loader.ignore(File.join(__dir__, "kamal", "sshkit_with_ext.rb"))
loader.setup loader.setup
loader.eager_load # We need all commands loaded. loader.eager_load # We need all commands loaded.

View File

@@ -21,7 +21,7 @@ class Kamal::Commands::Auditor < Kamal::Commands::Base
def audit_log_file def audit_log_file
file = [ config.service, config.destination, "audit.log" ].compact.join("-") file = [ config.service, config.destination, "audit.log" ].compact.join("-")
"#{config.run_directory}/#{file}" File.join(config.run_directory, file)
end end
def audit_tags(**details) def audit_tags(**details)

View File

@@ -9,6 +9,6 @@ class Kamal::Commands::Hook < Kamal::Commands::Base
private private
def hook_file(hook) def hook_file(hook)
"#{config.hooks_path}/#{hook}" File.join(config.hooks_path, hook)
end end
end end

View File

@@ -222,7 +222,7 @@ class Kamal::Configuration
def host_env_directory def host_env_directory
"#{run_directory}/env" File.join(run_directory, "env")
end end
def env def env

View File

@@ -134,7 +134,7 @@ class Kamal::Configuration::Accessory
end end
def expand_host_path(host_path) def expand_host_path(host_path)
absolute_path?(host_path) ? host_path : "#{service_data_directory}/#{host_path}" absolute_path?(host_path) ? host_path : File.join(service_data_directory, host_path)
end end
def absolute_path?(path) def absolute_path?(path)