Module: Homebrew::Bundle::Checker Private
- Defined in:
- bundle/checker.rb,
bundle/go_checker.rb,
bundle/uv_checker.rb,
bundle/tap_checker.rb,
bundle/brew_checker.rb,
bundle/cask_checker.rb,
bundle/cargo_checker.rb,
bundle/flatpak_checker.rb,
bundle/brew_service_checker.rb,
bundle/mac_app_store_checker.rb,
bundle/vscode_extension_checker.rb
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Defined Under Namespace
Classes: Base, BrewChecker, BrewServiceChecker, CargoChecker, CaskChecker, CheckResult, FlatpakChecker, GoChecker, MacAppStoreChecker, TapChecker, UvChecker, VscodeExtensionChecker
Constant Summary collapse
- CHECKS =
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.
{ taps_to_tap: "Taps", casks_to_install: "Casks", extensions_to_install: "VSCode Extensions", apps_to_install: "Apps", formulae_to_install: "Formulae", formulae_to_start: "Services", go_packages_to_install: "Go Packages", cargo_packages_to_install: "Cargo Packages", uv_packages_to_install: "uv Tools", flatpaks_to_install: "Flatpaks", }.freeze
Class Method Summary collapse
- .apps_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .cargo_packages_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .casks_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .check(global: false, file: nil, exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .extensions_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .flatpaks_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .formulae_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .formulae_to_start(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .go_packages_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .reset! ⇒ Object private
- .taps_to_tap(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
- .uv_packages_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ Object private
Class Method Details
.apps_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
120 121 122 123 124 125 126 |
# File 'bundle/checker.rb', line 120 def self.apps_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/mac_app_store_checker" Homebrew::Bundle::Checker::MacAppStoreChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |
.cargo_packages_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
152 153 154 155 156 157 158 |
# File 'bundle/checker.rb', line 152 def self.cargo_packages_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/cargo_checker" Homebrew::Bundle::Checker::CargoChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |
.casks_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
96 97 98 99 100 101 102 |
# File 'bundle/checker.rb', line 96 def self.casks_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/cask_checker" Homebrew::Bundle::Checker::CaskChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |
.check(global: false, file: nil, exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'bundle/checker.rb', line 74 def self.check(global: false, file: nil, exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/brewfile" @dsl ||= Brewfile.read(global:, file:) check_method_names = CHECKS.keys errors = [] enumerator = exit_on_first_error ? :find : :map work_to_be_done = check_method_names.public_send(enumerator) do |check_method| check_errors = send(check_method, exit_on_first_error:, no_upgrade:, verbose:) any_errors = check_errors.any? errors.concat(check_errors) if any_errors any_errors end work_to_be_done = Array(work_to_be_done).flatten.any? CheckResult.new work_to_be_done, errors end |
.extensions_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
128 129 130 131 132 133 134 |
# File 'bundle/checker.rb', line 128 def self.extensions_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/vscode_extension_checker" Homebrew::Bundle::Checker::VscodeExtensionChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |
.flatpaks_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
160 161 162 163 164 165 166 |
# File 'bundle/checker.rb', line 160 def self.flatpaks_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/flatpak_checker" Homebrew::Bundle::Checker::FlatpakChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |
.formulae_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
104 105 106 107 108 109 110 |
# File 'bundle/checker.rb', line 104 def self.formulae_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/brew_checker" Homebrew::Bundle::Checker::BrewChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |
.formulae_to_start(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
136 137 138 139 140 141 142 |
# File 'bundle/checker.rb', line 136 def self.formulae_to_start(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/brew_service_checker" Homebrew::Bundle::Checker::BrewServiceChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |
.go_packages_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
144 145 146 147 148 149 150 |
# File 'bundle/checker.rb', line 144 def self.go_packages_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/go_checker" Homebrew::Bundle::Checker::GoChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |
.reset! ⇒ 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.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'bundle/checker.rb', line 176 def self.reset! require "bundle/cask_dumper" require "bundle/formula_dumper" require "bundle/mac_app_store_dumper" require "bundle/tap_dumper" require "bundle/brew_services" @dsl = nil Homebrew::Bundle::CaskDumper.reset! Homebrew::Bundle::FormulaDumper.reset! Homebrew::Bundle::MacAppStoreDumper.reset! Homebrew::Bundle::TapDumper.reset! Homebrew::Bundle::BrewServices.reset! end |
.taps_to_tap(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
112 113 114 115 116 117 118 |
# File 'bundle/checker.rb', line 112 def self.taps_to_tap(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/tap_checker" Homebrew::Bundle::Checker::TapChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |
.uv_packages_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) ⇒ 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.
168 169 170 171 172 173 174 |
# File 'bundle/checker.rb', line 168 def self.uv_packages_to_install(exit_on_first_error: false, no_upgrade: false, verbose: false) require "bundle/uv_checker" Homebrew::Bundle::Checker::UvChecker.new.find_actionable( @dsl.entries, exit_on_first_error:, no_upgrade:, verbose:, ) end |