Class: Homebrew::Cmd::Analytics Private

Inherits:
AbstractCommand show all
Defined in:
sorbet/rbi/dsl/homebrew/cmd/analytics.rbi,
cmd/analytics.rb

Overview

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.

DO NOT EDIT MANUALLY This is an autogenerated file for dynamic methods in Homebrew::Cmd::Analytics. Please instead update this file by running bin/tapioca dsl Homebrew::Cmd::Analytics.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::Cmd::Analytics::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.



9
# File 'sorbet/rbi/dsl/homebrew/cmd/analytics.rbi', line 9

def args; 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.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'cmd/analytics.rb', line 25

def run
  case args.named.first
  when nil, "state"
    if Utils::Analytics.disabled?
      puts "InfluxDB analytics are disabled."
    else
      puts "InfluxDB analytics are enabled."
    end
    puts "Google Analytics were destroyed."
  when "on"
    Utils::Analytics.enable!
  when "off"
    Utils::Analytics.disable!
  when "regenerate-uuid"
    Utils::Analytics.delete_uuid!
    opoo "Homebrew no longer uses an analytics UUID so this has been deleted!"
    puts "brew analytics regenerate-uuid is no longer necessary."
  else
    raise UsageError, "unknown subcommand: #{args.named.first}"
  end
end