Class: Homebrew::DevCmd::Create Private

Inherits:
AbstractCommand show all
Defined in:
dev-cmd/create.rb,
sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi

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.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser, ruby_cmd?

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_cannot_install, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::DevCmd::Create::Args

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.



10
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/create.rbi', line 10

def args; end

#find_appcast_for(name) ⇒ Cask::Appcast::Result?

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.

Scan an already-installed copy of the app for an appcast to prefill the livecheck block.

Parameters:

Returns:



174
175
176
177
178
179
180
181
# File 'dev-cmd/create.rb', line 174

def find_appcast_for(name)
  app_path = Pathname("/Applications/#{name}.app")
  return unless app_path.directory?

  appcast = Cask::Appcast.find(app_path)
  ohai "Found #{appcast.strategy.inspect} appcast: #{appcast.url}" if appcast
  appcast
end

#runvoid

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.

Create a formula from a tarball URL.



79
80
81
82
83
84
85
86
87
# File 'dev-cmd/create.rb', line 79

def run
  path = if args.cask?
    create_cask
  else
    create_formula
  end

  Utils::Editor.open path
end