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.

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

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

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)


20
21
22
23
24
25
26
27
28
# File 'test_bot/formulae_detect.rb', line 20

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:



8
9
10
# File 'test_bot/formulae_detect.rb', line 8

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:



8
9
10
# File 'test_bot/formulae_detect.rb', line 8

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:



8
9
10
# File 'test_bot/formulae_detect.rb', line 8

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:



31
32
33
34
35
36
37
38
39
40
41
42
# File 'test_bot/formulae_detect.rb', line 31

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