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"
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.eager_load # We need all commands loaded.

View File

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

View File

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

View File

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

View File

@@ -134,7 +134,7 @@ class Kamal::Configuration::Accessory
end
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
def absolute_path?(path)