diff --git a/Library/Homebrew/cask/cmd/fetch.rb b/Library/Homebrew/cask/cmd/fetch.rb index 3ff51c6139..4b3d6d82c7 100644 --- a/Library/Homebrew/cask/cmd/fetch.rb +++ b/Library/Homebrew/cask/cmd/fetch.rb @@ -12,7 +12,7 @@ module Cask def run casks.each do |cask| - puts Installer.print_caveats(cask) + puts Installer.caveats(cask) ohai "Downloading external files for Cask #{cask}" downloaded_path = Download.new(cask, force: force?, quarantine: quarantine?).perform Verify.all(cask, downloaded_path) diff --git a/Library/Homebrew/cask/cmd/info.rb b/Library/Homebrew/cask/cmd/info.rb index 8daa9ae1a4..9f855b595b 100644 --- a/Library/Homebrew/cask/cmd/info.rb +++ b/Library/Homebrew/cask/cmd/info.rb @@ -31,12 +31,12 @@ module Cask output << Formatter.url(cask.homepage) + "\n" if cask.homepage output << installation_info(cask) repo = repo_info(cask) - output << repo unless repo.nil? + output << repo + "\n" unless repo.nil? output << name_info(cask) language = language_info(cask) output << language unless language.nil? - output << artifact_info(cask) - caveats = Installer.print_caveats(cask) + output << artifact_info(cask) + "\n" + caveats = Installer.caveats(cask) output << caveats unless caveats.nil? output end @@ -67,8 +67,7 @@ module Cask then versioned_staged_path.abv else Formatter.error("does not exist") end, - ).concat(")") - install_info << "\n" + ).concat(")\n") end install_info else @@ -101,7 +100,7 @@ module Cask "#{cask.tap.default_remote}/blob/master/Casks/#{cask.token}.rb" end - "From: #{Formatter.url(url)}\n" + "From: #{Formatter.url(url)}" end def self.artifact_info(cask) @@ -112,7 +111,7 @@ module Cask artifact_output << "\n" << artifact.to_s end - artifact_output << "\n" + artifact_output end end end diff --git a/Library/Homebrew/cask/cmd/upgrade.rb b/Library/Homebrew/cask/cmd/upgrade.rb index 92b611f5bd..408d8dc545 100644 --- a/Library/Homebrew/cask/cmd/upgrade.rb +++ b/Library/Homebrew/cask/cmd/upgrade.rb @@ -74,7 +74,7 @@ module Cask # Start new Cask's installation steps new_cask_installer.check_conflicts - puts new_cask_installer.print_caveats + puts new_cask_installer.caveats new_cask_installer.fetch diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index 1f138d79e6..2631717a2c 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -43,7 +43,7 @@ module Cask :reinstall?, :upgrade?, :verbose?, :installed_as_dependency?, :quarantine? - def self.print_caveats(cask) + def self.caveats(cask) odebug "Printing caveats" caveats = cask.caveats @@ -88,7 +88,7 @@ module Cask check_conflicts - print print_caveats + print caveats fetch uninstall_existing_cask if reinstall? @@ -372,8 +372,8 @@ module Cask end end - def print_caveats - self.class.print_caveats(@cask) + def caveats + self.class.caveats(@cask) end def save_caskfile diff --git a/Library/Homebrew/test/cmd/info_spec.rb b/Library/Homebrew/test/cmd/info_spec.rb index 855237a268..50dd05fd11 100644 --- a/Library/Homebrew/test/cmd/info_spec.rb +++ b/Library/Homebrew/test/cmd/info_spec.rb @@ -19,7 +19,7 @@ describe "brew info", :integration_test do .and be_a_success 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" expect { brew "info", "firefox" }