aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib/hbc/cli/internal_checkurl.rb
blob: a8c3d5c8f06dd730b3f816c21185d88ab0bad77d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Hbc
  class CLI
    class InternalCheckurl < AbstractInternalCommand
      def run
        casks_to_check = args.empty? ? Hbc.all : args.map(&CaskLoader.public_method(:load))
        casks_to_check.each do |cask|
          odebug "Checking URL for Cask #{cask}"
          checker = UrlChecker.new(cask)
          checker.run
          puts checker.summary
        end
      end

      def self.help
        "checks for bad Cask URLs"
      end
    end
  end
end