Renamed print_caveats, updated an info_spec test to macos only
This commit is contained in:
parent
18a20986e7
commit
75b9eec7ef
@ -12,7 +12,7 @@ module Cask
|
|||||||
|
|
||||||
def run
|
def run
|
||||||
casks.each do |cask|
|
casks.each do |cask|
|
||||||
puts Installer.print_caveats(cask)
|
puts Installer.caveats(cask)
|
||||||
ohai "Downloading external files for Cask #{cask}"
|
ohai "Downloading external files for Cask #{cask}"
|
||||||
downloaded_path = Download.new(cask, force: force?, quarantine: quarantine?).perform
|
downloaded_path = Download.new(cask, force: force?, quarantine: quarantine?).perform
|
||||||
Verify.all(cask, downloaded_path)
|
Verify.all(cask, downloaded_path)
|
||||||
|
|||||||
@ -31,12 +31,12 @@ module Cask
|
|||||||
output << Formatter.url(cask.homepage) + "\n" if cask.homepage
|
output << Formatter.url(cask.homepage) + "\n" if cask.homepage
|
||||||
output << installation_info(cask)
|
output << installation_info(cask)
|
||||||
repo = repo_info(cask)
|
repo = repo_info(cask)
|
||||||
output << repo unless repo.nil?
|
output << repo + "\n" unless repo.nil?
|
||||||
output << name_info(cask)
|
output << name_info(cask)
|
||||||
language = language_info(cask)
|
language = language_info(cask)
|
||||||
output << language unless language.nil?
|
output << language unless language.nil?
|
||||||
output << artifact_info(cask)
|
output << artifact_info(cask) + "\n"
|
||||||
caveats = Installer.print_caveats(cask)
|
caveats = Installer.caveats(cask)
|
||||||
output << caveats unless caveats.nil?
|
output << caveats unless caveats.nil?
|
||||||
output
|
output
|
||||||
end
|
end
|
||||||
@ -67,8 +67,7 @@ module Cask
|
|||||||
then versioned_staged_path.abv
|
then versioned_staged_path.abv
|
||||||
else Formatter.error("does not exist")
|
else Formatter.error("does not exist")
|
||||||
end,
|
end,
|
||||||
).concat(")")
|
).concat(")\n")
|
||||||
install_info << "\n"
|
|
||||||
end
|
end
|
||||||
install_info
|
install_info
|
||||||
else
|
else
|
||||||
@ -101,7 +100,7 @@ module Cask
|
|||||||
"#{cask.tap.default_remote}/blob/master/Casks/#{cask.token}.rb"
|
"#{cask.tap.default_remote}/blob/master/Casks/#{cask.token}.rb"
|
||||||
end
|
end
|
||||||
|
|
||||||
"From: #{Formatter.url(url)}\n"
|
"From: #{Formatter.url(url)}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.artifact_info(cask)
|
def self.artifact_info(cask)
|
||||||
@ -112,7 +111,7 @@ module Cask
|
|||||||
|
|
||||||
artifact_output << "\n" << artifact.to_s
|
artifact_output << "\n" << artifact.to_s
|
||||||
end
|
end
|
||||||
artifact_output << "\n"
|
artifact_output
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -74,7 +74,7 @@ module Cask
|
|||||||
# Start new Cask's installation steps
|
# Start new Cask's installation steps
|
||||||
new_cask_installer.check_conflicts
|
new_cask_installer.check_conflicts
|
||||||
|
|
||||||
puts new_cask_installer.print_caveats
|
puts new_cask_installer.caveats
|
||||||
|
|
||||||
new_cask_installer.fetch
|
new_cask_installer.fetch
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ module Cask
|
|||||||
:reinstall?, :upgrade?, :verbose?, :installed_as_dependency?,
|
:reinstall?, :upgrade?, :verbose?, :installed_as_dependency?,
|
||||||
:quarantine?
|
:quarantine?
|
||||||
|
|
||||||
def self.print_caveats(cask)
|
def self.caveats(cask)
|
||||||
odebug "Printing caveats"
|
odebug "Printing caveats"
|
||||||
|
|
||||||
caveats = cask.caveats
|
caveats = cask.caveats
|
||||||
@ -88,7 +88,7 @@ module Cask
|
|||||||
|
|
||||||
check_conflicts
|
check_conflicts
|
||||||
|
|
||||||
print print_caveats
|
print caveats
|
||||||
fetch
|
fetch
|
||||||
uninstall_existing_cask if reinstall?
|
uninstall_existing_cask if reinstall?
|
||||||
|
|
||||||
@ -372,8 +372,8 @@ module Cask
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def print_caveats
|
def caveats
|
||||||
self.class.print_caveats(@cask)
|
self.class.caveats(@cask)
|
||||||
end
|
end
|
||||||
|
|
||||||
def save_caskfile
|
def save_caskfile
|
||||||
|
|||||||
@ -19,7 +19,7 @@ describe "brew info", :integration_test do
|
|||||||
.and be_a_success
|
.and be_a_success
|
||||||
end
|
end
|
||||||
|
|
||||||
it "looks for a Cask with the same name if a given Formula does not exist", :needs_network do
|
it "looks for a Cask with the same name if a given Formula does not exist", :needs_macos, :needs_network do
|
||||||
setup_remote_tap "homebrew/cask"
|
setup_remote_tap "homebrew/cask"
|
||||||
|
|
||||||
expect { brew "info", "firefox" }
|
expect { brew "info", "firefox" }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user