print_caveats and get_info return heredocs
This commit is contained in:
parent
ed80b60834
commit
330ae8c6fa
@ -27,14 +27,12 @@ module Cask
|
||||
end
|
||||
|
||||
def self.get_info(cask)
|
||||
"#{title_info(cask)}\n"\
|
||||
"#{Formatter.url(cask.homepage) if cask.homepage}\n"\
|
||||
"#{installation_info(cask)}\n"\
|
||||
"#{repo_info(cask)}"\
|
||||
"#{name_info(cask)}"\
|
||||
"#{language_info(cask)}"\
|
||||
"#{artifact_info(cask)}"\
|
||||
"#{Installer.print_caveats(cask)}"\
|
||||
<<~EOS.chomp
|
||||
#{title_info(cask)}
|
||||
#{Formatter.url(cask.homepage) if cask.homepage}
|
||||
#{installation_info(cask)}
|
||||
#{repo_info(cask)}#{name_info(cask)}#{language_info(cask)}#{artifact_info(cask)}#{Installer.print_caveats(cask)}
|
||||
EOS
|
||||
end
|
||||
|
||||
def self.info(cask)
|
||||
@ -58,8 +56,12 @@ module Cask
|
||||
versioned_staged_path = cask.caskroom_path.join(version)
|
||||
install_info << versioned_staged_path.to_s
|
||||
.concat(" (")
|
||||
.concat(versioned_staged_path.exist? ? versioned_staged_path.abv : Formatter.error("does not exist"))
|
||||
.concat(")")
|
||||
.concat(
|
||||
if versioned_staged_path.exist?
|
||||
then versioned_staged_path.abv
|
||||
else Formatter.error("does not exist")
|
||||
end,
|
||||
).concat(")")
|
||||
install_info << "\n"
|
||||
end
|
||||
return install_info.strip
|
||||
|
||||
@ -49,8 +49,10 @@ module Cask
|
||||
caveats = cask.caveats
|
||||
return if caveats.empty?
|
||||
|
||||
"#{ohai_title "Caveats"}\n"\
|
||||
"#{caveats}\n"
|
||||
<<~EOS
|
||||
#{ohai_title "Caveats"}
|
||||
#{caveats}
|
||||
EOS
|
||||
end
|
||||
|
||||
def fetch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user