Inline util method only used in one place

This commit is contained in:
dhh
2023-09-16 11:11:24 -07:00
parent 97cea8950d
commit 12a82a6c58
2 changed files with 8 additions and 13 deletions

View File

@@ -53,7 +53,14 @@ class Kamal::Configuration
end
def abbreviated_version
Kamal::Utils.abbreviate_version(version)
if version
# Don't abbreviate <sha>_uncommitted_<etc>
if version.include?("_")
version
else
version[0...7]
end
end
end
def minimum_version

View File

@@ -86,18 +86,6 @@ module Kamal::Utils
value.to_s.dump[1..-2].gsub(/\\"/, "\"")
end
# Abbreviate a git revhash for concise display
def abbreviate_version(version)
if version
# Don't abbreviate <sha>_uncommitted_<etc>
if version.include?("_")
version
else
version[0...7]
end
end
end
def uncommitted_changes
`git status --porcelain`.strip
end