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_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled

Constructor Details

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

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 FormulaeDetect.



9
10
11
12
13
14
15
16
# File 'test_bot/formulae_detect.rb', line 9

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

  @argument = argument
  @added_formulae = []
  @deleted_formulae = []
  @formulae_to_fetch = []
end

Instance Attribute Details

#added_formulaeObject (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.



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

def added_formulae
  @added_formulae
end

#deleted_formulaeObject (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.



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

def deleted_formulae
  @deleted_formulae
end

#testing_formulaeObject (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.



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

def testing_formulae
  @testing_formulae
end

Instance Method Details

#run!(args:) ⇒ Object

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.



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

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

  return unless ENV["GITHUB_ACTIONS"]

  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