
These specify that they are needed by the test block. This can be combined with `:build` to ensure that this formula isn't uninstalled by `brew test-bot` when running `test do` blocks on our CI.
38 lines
538 B
Ruby
38 lines
538 B
Ruby
require "options"
|
|
|
|
module Dependable
|
|
RESERVED_TAGS = [:build, :optional, :recommended, :run, :test, :linked].freeze
|
|
|
|
def build?
|
|
tags.include? :build
|
|
end
|
|
|
|
def optional?
|
|
tags.include? :optional
|
|
end
|
|
|
|
def recommended?
|
|
tags.include? :recommended
|
|
end
|
|
|
|
def run?
|
|
tags.include? :run
|
|
end
|
|
|
|
def test?
|
|
tags.include? :test
|
|
end
|
|
|
|
def required?
|
|
!build? && !test? && !optional? && !recommended?
|
|
end
|
|
|
|
def option_tags
|
|
tags - RESERVED_TAGS
|
|
end
|
|
|
|
def options
|
|
Options.create(option_tags)
|
|
end
|
|
end
|