
- search_for_cask in missing_formula renamed to is_a_cask_reason - is_a_cask calls new getInfo method in cask/cmd/info.rb to return info string - self.info in info.rb now calls getInfo and puts return value - added ohai_title to return the ohai printout for only titles, so that ohai printout could be added to the getInfo return string without calling puts. - refactored ohai to use ohai_title - updated info_spec.rb cask info test to be more specific when matching stderr. - is_a_cask_reason will respect 'silent' - refactored print_caveats to return instead of print
29 lines
702 B
Ruby
29 lines
702 B
Ruby
require "cask/download"
|
|
|
|
module Cask
|
|
class Cmd
|
|
class Fetch < AbstractCommand
|
|
option "--force", :force, false
|
|
|
|
def initialize(*)
|
|
super
|
|
raise CaskUnspecifiedError if args.empty?
|
|
end
|
|
|
|
def run
|
|
casks.each do |cask|
|
|
puts Installer.print_caveats(cask)
|
|
ohai "Downloading external files for Cask #{cask}"
|
|
downloaded_path = Download.new(cask, force: force?, quarantine: quarantine?).perform
|
|
Verify.all(cask, downloaded_path)
|
|
ohai "Success! Downloaded to -> #{downloaded_path}"
|
|
end
|
|
end
|
|
|
|
def self.help
|
|
"downloads remote application files to local cache"
|
|
end
|
|
end
|
|
end
|
|
end
|