Class: CodesignRequirement Private

Inherits:
Requirement show all
Defined in:
requirements/codesign_requirement.rb

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

A requirement on a code-signing identity.

Constant Summary

Constants included from Dependable

Dependable::RESERVED_TAGS

Instance Attribute Summary

Attributes inherited from Requirement

#cask, #download, #name

Attributes included from Dependable

#tags

Instance Method Summary collapse

Methods inherited from Requirement

#==, #display_s, #env, env, #env_proc, expand, #fatal?, #hash, #inspect, #mktemp, #modify_build_environment, #option_names, prune, prune?, #satisfied?, #satisfied_result_parent, satisfy

Methods included from BuildEnvironment::DSL

#env, #inherited

Methods included from Cachable

#cache, #clear_cache

Methods included from Dependable

#build?, #implicit?, #option_tags, #optional?, #options, #prune_from_option?, #prune_if_build_and_not_dependent?, #recommended?, #required?, #test?

Constructor Details

#initialize(tags) ⇒ CodesignRequirement

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns a new instance of CodesignRequirement.

Raises:

  • (ArgumentError)


10
11
12
13
14
15
16
17
18
19
# File 'requirements/codesign_requirement.rb', line 10

def initialize(tags)
  options = tags.shift
  raise ArgumentError, "CodesignRequirement requires an options Hash!" unless options.is_a?(Hash)
  raise ArgumentError, "CodesignRequirement requires an identity key!" unless options.key?(:identity)

  @identity = options.fetch(:identity)
  @with = options.fetch(:with, "code signing")
  @url = options.fetch(:url, nil)
  super(tags)
end

Instance Method Details

#messageString

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns:



31
32
33
34
35
# File 'requirements/codesign_requirement.rb', line 31

def message
  message = "#{@identity} identity must be available to build with #{@with}"
  message += ":\n#{@url}" if @url.present?
  message
end