class Serverkit::Resources::HomebrewPackage

Public Instance Methods

apply() click to toggle source

@note Override to force to use brew command

# File lib/serverkit/resources/homebrew_package.rb, line 7
def apply
  run_command(
    ::Specinfra::Command::Darwin::Base::Package.install(
      name,
      version,
      options,
    ),
  )
end
check() click to toggle source

@note Override to force to use brew command

# File lib/serverkit/resources/homebrew_package.rb, line 18
def check
  check_command(
    ::Specinfra::Command::Darwin::Base::Package.check_is_installed(
      unnested_name,
      version,
    ),
  )
end

Private Instance Methods

unnested_name() click to toggle source

@return [String] @example “brew-cask” # for “caskroom/cask/brew-cask”

# File lib/serverkit/resources/homebrew_package.rb, line 31
def unnested_name
  name.split("/").last
end