mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-19 22:16:33 -06:00
- add new file "cask/utils.rb" analogous to "utils.rb" in Homebrew - define odebug and odumpcask, analogs of ohai and friends, but which only give output when --debug is in effect - move the debug setting from an instance variable in Cask::CLI to a method Cask.debug, defined in "lib/cask/options.rb", which was added in #2276. (Perhaps options.rb should be merged back into Cask::CLI). - sprinkle odebug statements liberally throughout the codebase - update tests
15 lines
373 B
Ruby
15 lines
373 B
Ruby
class Cask::CLI::Checklinks
|
|
def self.run(*args)
|
|
casks_to_check = args.empty? ? Cask.all : args.map { |arg| Cask.load(arg) }
|
|
casks_to_check.each do |cask|
|
|
odebug "Checking links for Cask #{cask}"
|
|
checker = Cask::LinkChecker.new(cask)
|
|
checker.run
|
|
puts checker.summary
|
|
end
|
|
end
|
|
|
|
def self.help
|
|
"checks for bad cask links"
|
|
end
|
|
end
|