diff --git a/Library/Homebrew/cask/artifact.rb b/Library/Homebrew/cask/artifact.rb index 6b5ca20d20..a86b3232ed 100644 --- a/Library/Homebrew/cask/artifact.rb +++ b/Library/Homebrew/cask/artifact.rb @@ -27,6 +27,9 @@ require "cask/artifact/uninstall" require "cask/artifact/zap" module Cask + # Module containing all cask artifact classes. + # + # @api private module Artifact end end diff --git a/Library/Homebrew/cask/artifact/abstract_artifact.rb b/Library/Homebrew/cask/artifact/abstract_artifact.rb index 4d3f86d85a..84275ec58a 100644 --- a/Library/Homebrew/cask/artifact/abstract_artifact.rb +++ b/Library/Homebrew/cask/artifact/abstract_artifact.rb @@ -2,6 +2,9 @@ module Cask module Artifact + # Abstract superclass for all artifacts. + # + # @api private class AbstractArtifact include Comparable extend Predicable diff --git a/Library/Homebrew/cask/artifact/abstract_flight_block.rb b/Library/Homebrew/cask/artifact/abstract_flight_block.rb index 3eb47fe82f..053294e7ff 100644 --- a/Library/Homebrew/cask/artifact/abstract_flight_block.rb +++ b/Library/Homebrew/cask/artifact/abstract_flight_block.rb @@ -4,6 +4,9 @@ require "cask/artifact/abstract_artifact" module Cask module Artifact + # Abstract superclass for block artifacts. + # + # @api private class AbstractFlightBlock < AbstractArtifact def self.dsl_key super.to_s.sub(/_block$/, "").to_sym diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 272404635c..e6d17348d5 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -10,6 +10,9 @@ using HashValidator module Cask module Artifact + # Abstract superclass for uninstall artifacts. + # + # @api private class AbstractUninstall < AbstractArtifact ORDERED_DIRECTIVES = [ :early_script, diff --git a/Library/Homebrew/cask/artifact/app.rb b/Library/Homebrew/cask/artifact/app.rb index 99bf5fcbb5..01cbec77f4 100644 --- a/Library/Homebrew/cask/artifact/app.rb +++ b/Library/Homebrew/cask/artifact/app.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `app` stanza. + # + # @api private class App < Moved end end diff --git a/Library/Homebrew/cask/artifact/artifact.rb b/Library/Homebrew/cask/artifact/artifact.rb index 1252f40f03..3d81ab65b0 100644 --- a/Library/Homebrew/cask/artifact/artifact.rb +++ b/Library/Homebrew/cask/artifact/artifact.rb @@ -7,6 +7,9 @@ using HashValidator module Cask module Artifact + # Generic artifact corresponding to the `artifact` stanza. + # + # @api private class Artifact < Moved def self.english_name "Generic Artifact" diff --git a/Library/Homebrew/cask/artifact/audio_unit_plugin.rb b/Library/Homebrew/cask/artifact/audio_unit_plugin.rb index b027d294d3..c22c132d46 100644 --- a/Library/Homebrew/cask/artifact/audio_unit_plugin.rb +++ b/Library/Homebrew/cask/artifact/audio_unit_plugin.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `audio_unit_plugin` stanza. + # + # @api private class AudioUnitPlugin < Moved end end diff --git a/Library/Homebrew/cask/artifact/binary.rb b/Library/Homebrew/cask/artifact/binary.rb index 39c525762e..a1f817ca7e 100644 --- a/Library/Homebrew/cask/artifact/binary.rb +++ b/Library/Homebrew/cask/artifact/binary.rb @@ -4,6 +4,9 @@ require "cask/artifact/symlinked" module Cask module Artifact + # Artifact corresponding to the `binary` stanza. + # + # @api private class Binary < Symlinked def link(command: nil, **options) super(command: command, **options) diff --git a/Library/Homebrew/cask/artifact/colorpicker.rb b/Library/Homebrew/cask/artifact/colorpicker.rb index 627260c333..48b2452455 100644 --- a/Library/Homebrew/cask/artifact/colorpicker.rb +++ b/Library/Homebrew/cask/artifact/colorpicker.rb @@ -3,6 +3,9 @@ require "cask/artifact/moved" module Cask + # Artifact corresponding to the `colorpicker` stanza. + # + # @api private module Artifact class Colorpicker < Moved end diff --git a/Library/Homebrew/cask/artifact/dictionary.rb b/Library/Homebrew/cask/artifact/dictionary.rb index fe2c2b65b1..03fded17ff 100644 --- a/Library/Homebrew/cask/artifact/dictionary.rb +++ b/Library/Homebrew/cask/artifact/dictionary.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `dictionary` stanza. + # + # @api private class Dictionary < Moved end end diff --git a/Library/Homebrew/cask/artifact/font.rb b/Library/Homebrew/cask/artifact/font.rb index 3f9f385189..164731c166 100644 --- a/Library/Homebrew/cask/artifact/font.rb +++ b/Library/Homebrew/cask/artifact/font.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `font` stanza. + # + # @api private class Font < Moved end end diff --git a/Library/Homebrew/cask/artifact/input_method.rb b/Library/Homebrew/cask/artifact/input_method.rb index 8024951844..9cd6b36239 100644 --- a/Library/Homebrew/cask/artifact/input_method.rb +++ b/Library/Homebrew/cask/artifact/input_method.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `input_method` stanza. + # + # @api private class InputMethod < Moved end end diff --git a/Library/Homebrew/cask/artifact/installer.rb b/Library/Homebrew/cask/artifact/installer.rb index e1be5f5054..7ec14f611e 100644 --- a/Library/Homebrew/cask/artifact/installer.rb +++ b/Library/Homebrew/cask/artifact/installer.rb @@ -7,12 +7,16 @@ using HashValidator module Cask module Artifact + # Artifact corresponding to the `installer` stanza. + # + # @api private class Installer < AbstractArtifact VALID_KEYS = Set.new([ :manual, :script, ]).freeze + # Extension module for manual installers. module ManualInstaller def install_phase(**) puts <<~EOS @@ -23,6 +27,7 @@ module Cask end end + # Extension module for script installers. module ScriptInstaller def install_phase(command: nil, **_) ohai "Running #{self.class.dsl_key} script '#{path}'" diff --git a/Library/Homebrew/cask/artifact/internet_plugin.rb b/Library/Homebrew/cask/artifact/internet_plugin.rb index 21dd0b37f1..6e22874a46 100644 --- a/Library/Homebrew/cask/artifact/internet_plugin.rb +++ b/Library/Homebrew/cask/artifact/internet_plugin.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `internet_plugin` stanza. + # + # @api private class InternetPlugin < Moved end end diff --git a/Library/Homebrew/cask/artifact/manpage.rb b/Library/Homebrew/cask/artifact/manpage.rb index 942a83c438..66453f2dba 100644 --- a/Library/Homebrew/cask/artifact/manpage.rb +++ b/Library/Homebrew/cask/artifact/manpage.rb @@ -4,6 +4,9 @@ require "cask/artifact/symlinked" module Cask module Artifact + # Artifact corresponding to the `manpage` stanza. + # + # @api private class Manpage < Symlinked attr_reader :section diff --git a/Library/Homebrew/cask/artifact/mdimporter.rb b/Library/Homebrew/cask/artifact/mdimporter.rb index ab4a3527bf..c11cb9cc4b 100644 --- a/Library/Homebrew/cask/artifact/mdimporter.rb +++ b/Library/Homebrew/cask/artifact/mdimporter.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `mdimporter` stanza. + # + # @api private class Mdimporter < Moved def self.english_name "Spotlight metadata importer" diff --git a/Library/Homebrew/cask/artifact/moved.rb b/Library/Homebrew/cask/artifact/moved.rb index 7774bff8ec..5925b86f4b 100644 --- a/Library/Homebrew/cask/artifact/moved.rb +++ b/Library/Homebrew/cask/artifact/moved.rb @@ -4,6 +4,9 @@ require "cask/artifact/relocated" module Cask module Artifact + # Superclass for all artifacts which are installed by moving them to the target location. + # + # @api private class Moved < Relocated def self.english_description "#{english_name}s" diff --git a/Library/Homebrew/cask/artifact/pkg.rb b/Library/Homebrew/cask/artifact/pkg.rb index 075de456e1..c70f2658dc 100644 --- a/Library/Homebrew/cask/artifact/pkg.rb +++ b/Library/Homebrew/cask/artifact/pkg.rb @@ -10,6 +10,9 @@ using HashValidator module Cask module Artifact + # Artifact corresponding to the `pkg` stanza. + # + # @api private class Pkg < AbstractArtifact attr_reader :pkg_relative_path, :path, :stanza_options diff --git a/Library/Homebrew/cask/artifact/postflight_block.rb b/Library/Homebrew/cask/artifact/postflight_block.rb index 43cb49f5bd..c672057d8c 100644 --- a/Library/Homebrew/cask/artifact/postflight_block.rb +++ b/Library/Homebrew/cask/artifact/postflight_block.rb @@ -4,6 +4,9 @@ require "cask/artifact/abstract_flight_block" module Cask module Artifact + # Artifact corresponding to the `postflight` stanza. + # + # @api private class PostflightBlock < AbstractFlightBlock end end diff --git a/Library/Homebrew/cask/artifact/preflight_block.rb b/Library/Homebrew/cask/artifact/preflight_block.rb index 341cdb1e0f..f6f8882c71 100644 --- a/Library/Homebrew/cask/artifact/preflight_block.rb +++ b/Library/Homebrew/cask/artifact/preflight_block.rb @@ -4,6 +4,9 @@ require "cask/artifact/abstract_flight_block" module Cask module Artifact + # Artifact corresponding to the `preflight` stanza. + # + # @api private class PreflightBlock < AbstractFlightBlock end end diff --git a/Library/Homebrew/cask/artifact/prefpane.rb b/Library/Homebrew/cask/artifact/prefpane.rb index 393d6e5c4a..8447c67c1d 100644 --- a/Library/Homebrew/cask/artifact/prefpane.rb +++ b/Library/Homebrew/cask/artifact/prefpane.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `prefpane` stanza. + # + # @api private class Prefpane < Moved def self.english_name "Preference Pane" diff --git a/Library/Homebrew/cask/artifact/qlplugin.rb b/Library/Homebrew/cask/artifact/qlplugin.rb index b9c5f8f069..30588c6236 100644 --- a/Library/Homebrew/cask/artifact/qlplugin.rb +++ b/Library/Homebrew/cask/artifact/qlplugin.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `qlplugin` stanza. + # + # @api private class Qlplugin < Moved def self.english_name "QuickLook Plugin" diff --git a/Library/Homebrew/cask/artifact/relocated.rb b/Library/Homebrew/cask/artifact/relocated.rb index 81e47f73c9..3f0da05eb0 100644 --- a/Library/Homebrew/cask/artifact/relocated.rb +++ b/Library/Homebrew/cask/artifact/relocated.rb @@ -7,6 +7,9 @@ using HashValidator module Cask module Artifact + # Superclass for all artifacts which have a source and a target location. + # + # @api private class Relocated < AbstractArtifact def self.from_args(cask, *args) source_string, target_hash = args diff --git a/Library/Homebrew/cask/artifact/screen_saver.rb b/Library/Homebrew/cask/artifact/screen_saver.rb index ba30416256..f8f73e7021 100644 --- a/Library/Homebrew/cask/artifact/screen_saver.rb +++ b/Library/Homebrew/cask/artifact/screen_saver.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `screen_saver` stanza. + # + # @api private class ScreenSaver < Moved end end diff --git a/Library/Homebrew/cask/artifact/service.rb b/Library/Homebrew/cask/artifact/service.rb index b42d22c43e..9a92a6506f 100644 --- a/Library/Homebrew/cask/artifact/service.rb +++ b/Library/Homebrew/cask/artifact/service.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `service` stanza. + # + # @api private class Service < Moved end end diff --git a/Library/Homebrew/cask/artifact/stage_only.rb b/Library/Homebrew/cask/artifact/stage_only.rb index 77ae227075..78efa24d5d 100644 --- a/Library/Homebrew/cask/artifact/stage_only.rb +++ b/Library/Homebrew/cask/artifact/stage_only.rb @@ -4,6 +4,9 @@ require "cask/artifact/abstract_artifact" module Cask module Artifact + # Artifact corresponding to the `stage_only` stanza. + # + # @api private class StageOnly < AbstractArtifact def self.from_args(cask, *args) raise CaskInvalidError.new(cask.token, "'stage_only' takes only a single argument: true") if args != [true] diff --git a/Library/Homebrew/cask/artifact/suite.rb b/Library/Homebrew/cask/artifact/suite.rb index 4d8332f709..be8f348205 100644 --- a/Library/Homebrew/cask/artifact/suite.rb +++ b/Library/Homebrew/cask/artifact/suite.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `suite` stanza. + # + # @api private class Suite < Moved def self.english_name "App Suite" diff --git a/Library/Homebrew/cask/artifact/symlinked.rb b/Library/Homebrew/cask/artifact/symlinked.rb index b50c104dc4..fd40619fad 100644 --- a/Library/Homebrew/cask/artifact/symlinked.rb +++ b/Library/Homebrew/cask/artifact/symlinked.rb @@ -4,6 +4,9 @@ require "cask/artifact/relocated" module Cask module Artifact + # Superclass for all artifacts which are installed by symlinking them to the target location. + # + # @api private class Symlinked < Relocated def self.link_type_english_name "Symlink" diff --git a/Library/Homebrew/cask/artifact/uninstall.rb b/Library/Homebrew/cask/artifact/uninstall.rb index cdd2da2b86..00b385e647 100644 --- a/Library/Homebrew/cask/artifact/uninstall.rb +++ b/Library/Homebrew/cask/artifact/uninstall.rb @@ -4,6 +4,9 @@ require "cask/artifact/abstract_uninstall" module Cask module Artifact + # Artifact corresponding to the `uninstall` stanza. + # + # @api private class Uninstall < AbstractUninstall def uninstall_phase(**options) ORDERED_DIRECTIVES.reject { |directive_sym| directive_sym == :rmdir } diff --git a/Library/Homebrew/cask/artifact/vst3_plugin.rb b/Library/Homebrew/cask/artifact/vst3_plugin.rb index ea5dc05d05..e82690d84b 100644 --- a/Library/Homebrew/cask/artifact/vst3_plugin.rb +++ b/Library/Homebrew/cask/artifact/vst3_plugin.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `vst3_plugin` stanza. + # + # @api private class Vst3Plugin < Moved end end diff --git a/Library/Homebrew/cask/artifact/vst_plugin.rb b/Library/Homebrew/cask/artifact/vst_plugin.rb index 6796e286ca..058ea50521 100644 --- a/Library/Homebrew/cask/artifact/vst_plugin.rb +++ b/Library/Homebrew/cask/artifact/vst_plugin.rb @@ -4,6 +4,9 @@ require "cask/artifact/moved" module Cask module Artifact + # Artifact corresponding to the `vst_plugin` stanza. + # + # @api private class VstPlugin < Moved end end diff --git a/Library/Homebrew/cask/artifact/zap.rb b/Library/Homebrew/cask/artifact/zap.rb index cd1ccc736d..6967f922c7 100644 --- a/Library/Homebrew/cask/artifact/zap.rb +++ b/Library/Homebrew/cask/artifact/zap.rb @@ -4,6 +4,9 @@ require "cask/artifact/abstract_uninstall" module Cask module Artifact + # Artifact corresponding to the `zap` stanza. + # + # @api private class Zap < AbstractUninstall def zap_phase(**options) dispatch_uninstall_directives(**options)