Class: Homebrew::TestBot::FormulaeDetect Private

Inherits:
Test show all
Defined in:
test_bot/formulae_detect.rb

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.

Constant Summary collapse

DEFAULT_TEST_FORMULAE =

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

Formulae must have GitHub homepages and stable URLs, no stable dependencies, one executable and one library between them.

%w[libdeflate bats-core].freeze

Instance Attribute Summary collapse

Attributes inherited from Test

#steps

Instance Method Summary collapse

Methods inherited from Test

#failed_steps, #ignored_steps

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #pretty_upgradable

Constructor Details

#initialize(argument, tap:, git:, dry_run:, fail_fast:, verbose:) ⇒ void

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.

Parameters:

  • argument (String)
  • tap (Tap, nil)
  • git (String)
  • dry_run (Boolean)
  • fail_fast (Boolean)
  • verbose (Boolean)


24
25
26
27
28
29
30
31
32
# File 'test_bot/formulae_detect.rb', line 24

def initialize(argument, tap:, git:, dry_run:, fail_fast:, verbose:)
  super(tap:, git:, dry_run:, fail_fast:, verbose:)

  @argument = argument
  @added_formulae = T.let([], T::Array[String])
  @deleted_formulae = T.let([], T::Array[String])
  @formulae_to_fetch = T.let([], T::Array[String])
  @testing_formulae = T.let([], T::Array[String])
end

Instance Attribute Details

#added_formulaeArray<String> (readonly)

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:



12
13
14
# File 'test_bot/formulae_detect.rb', line 12

def added_formulae
  @added_formulae
end

#deleted_formulaeArray<String> (readonly)

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:



12
13
14
# File 'test_bot/formulae_detect.rb', line 12

def deleted_formulae
  @deleted_formulae
end

#testing_formulaeArray<String> (readonly)

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:



12
13
14
# File 'test_bot/formulae_detect.rb', line 12

def testing_formulae
  @testing_formulae
end

Instance Method Details

#run!(args:) ⇒ void

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.

This method returns an undefined value.

Parameters:



35
36
37
38
39
40
41
42
43
44
45
46
# File 'test_bot/formulae_detect.rb', line 35

def run!(args:)
  detect_formulae!(args:)

  return unless GitHub::Actions.env_set?

  File.open(ENV.fetch("GITHUB_OUTPUT"), "a") do |f|
    f.puts "testing_formulae=#{@testing_formulae.join(",")}"
    f.puts "added_formulae=#{@added_formulae.join(",")}"
    f.puts "deleted_formulae=#{@deleted_formulae.join(",")}"
    f.puts "formulae_to_fetch=#{@formulae_to_fetch.join(",")}"
  end
end