diff options
| author | Mike McQuaid | 2017-06-07 16:34:54 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2017-06-07 16:34:54 +0100 |
| commit | 5367f1b408bf3077044bd8f6aab5a8db7647c493 (patch) | |
| tree | aaf61d7d8e32c9758c7c9e79a20c380dd7ae3769 /Library/Homebrew/utils/analytics.rb | |
| parent | cfc40196f22fd07cf62a6f51ee22915485bb4c09 (diff) | |
| download | brew-5367f1b408bf3077044bd8f6aab5a8db7647c493.tar.bz2 | |
analytics: remove unused analytics.
We didn't end up using the `screenview` and `exception` analytics as
much as expected so let's remove them and focus on stuff that's
formula-specific.
Diffstat (limited to 'Library/Homebrew/utils/analytics.rb')
| -rw-r--r-- | Library/Homebrew/utils/analytics.rb | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb index 7dd54d3f1..8c69a2980 100644 --- a/Library/Homebrew/utils/analytics.rb +++ b/Library/Homebrew/utils/analytics.rb @@ -61,22 +61,11 @@ module Utils ev: value) end - def report_exception(exception, options = {}) - if exception.is_a?(BuildError) && - exception.formula.tap && - exception.formula.tap.installed? && - !exception.formula.tap.private? - report_event("BuildError", exception.formula.full_name) - end - - fatal = options.fetch(:fatal, true) ? "1" : "0" - report(:exception, - exd: exception.class.name, - exf: fatal) - end - - def report_screenview(screen_name) - report(:screenview, cd: screen_name) + def report_build_error(exception) + return unless exception.formula.tap + return unless exception.formula.tap.installed? + return if exception.formula.tap.private? + report_event("BuildError", exception.formula.full_name) end end end |
