Replaced string interpolations with to build paths
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user