class HomebrewAutomation::Brew
Homebrew effects
Public Class Methods
bottle!(opts, fully_qualified_formula_name)
click to toggle source
+brew bottle [opts] “$fully_qualified_formula_name”+
@param opts [Array<String>] @param fully_qualified_formula_name [String]
# File lib/homebrew_automation/brew.rb, line 66 def self.bottle!(opts, fully_qualified_formula_name) checked('brew', 'bottle', *opts, fully_qualified_formula_name) end
install!(opts, fully_qualified_formula_name)
click to toggle source
+brew install [opts] “$fully_qualified_formula_name”+
@param opts [Array<String>] @param fully_qualified_formula_name [String]
# File lib/homebrew_automation/brew.rb, line 32 def self.install!(opts, fully_qualified_formula_name) checked('brew', 'install', *opts, fully_qualified_formula_name) rescue Error raise InstallFailed end
list!(opts, fully_qualified_formula_name)
click to toggle source
+brew list [opts] “$fully_qualified_formula_name”+
Good for checking whether a Formula
is installed.
@param opts [Array<String>] @param fully_qualified_formula_name [String] @return true iff the Formula
is installed
# File lib/homebrew_automation/brew.rb, line 58 def self.list!(opts, fully_qualified_formula_name) system('brew', 'list', *opts, fully_qualified_formula_name) end
tap!(name, url)
click to toggle source
+brew tap “$name” “$url”+
@param name [String] @param url [String]
# File lib/homebrew_automation/brew.rb, line 14 def self.tap!(name, url) checked('brew', 'tap', name, url) end
uninstall!(opts, fully_qualified_formula_name)
click to toggle source
+brew uninstall [opts] “$fully_qualified_formula_name”+
@param opts [Array<String>] @param fully_qualified_formula_name [String]
# File lib/homebrew_automation/brew.rb, line 45 def self.uninstall!(opts, fully_qualified_formula_name) checked('brew', 'uninstall', *opts, fully_qualified_formula_name) rescue Error raise UninstallFailed end
untap!(name)
click to toggle source
+brew untap “$name”+
@param name [String]
# File lib/homebrew_automation/brew.rb, line 21 def self.untap!(name) checked('brew', 'untap', name) end
Private Class Methods
checked(*args)
click to toggle source
# File lib/homebrew_automation/brew.rb, line 70 def self.checked(*args) result = system(*args) unless result raise Error.new(args.join(' ')) end result end