Skip to content
Snippets Groups Projects
Commit ac4969c3 authored by Markus Reiter's avatar Markus Reiter
Browse files

Convert `self.artifacts` to `TYPES`.

parent 4a4a1622
No related branches found
No related tags found
No related merge requests found
......@@ -27,39 +27,37 @@ module Hbc
module Artifact
# NOTE: order is important here, since we want to extract nested containers
# before we handle any other artifacts
def self.artifacts
[
PreflightBlock,
NestedContainer,
Installer,
App,
Suite,
Artifact, # generic 'artifact' stanza
Colorpicker,
Pkg,
Prefpane,
Qlplugin,
Dictionary,
Font,
Service,
StageOnly,
Binary,
InputMethod,
InternetPlugin,
AudioUnitPlugin,
VstPlugin,
Vst3Plugin,
ScreenSaver,
Uninstall,
PostflightBlock,
Zap,
]
end
TYPES = [
PreflightBlock,
NestedContainer,
Installer,
App,
Suite,
Artifact, # generic 'artifact' stanza
Colorpicker,
Pkg,
Prefpane,
Qlplugin,
Dictionary,
Font,
Service,
StageOnly,
Binary,
InputMethod,
InternetPlugin,
AudioUnitPlugin,
VstPlugin,
Vst3Plugin,
ScreenSaver,
Uninstall,
PostflightBlock,
Zap,
].freeze
def self.for_cask(cask, command: SystemCommand, force: false)
odebug "Determining which artifacts are present in Cask #{cask}"
artifacts
TYPES
.select { |klass| klass.me?(cask) }
.map { |klass| klass.new(cask, command: command, force: force) }
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment