From ff2ff9d61f4e0e4f6560e1038681ad85f2957eb4 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 25 Apr 2024 17:33:33 +0000 Subject: [PATCH] docs: updates from Homebrew/brew --- docs/Utils/Analytics.html | 815 +++++++++++++++++++++++++------------- docs/method_list.html | 18 +- 2 files changed, 554 insertions(+), 279 deletions(-) diff --git a/docs/Utils/Analytics.html b/docs/Utils/Analytics.html index 2229b82cc..5df9d7ebf 100644 --- a/docs/Utils/Analytics.html +++ b/docs/Utils/Analytics.html @@ -663,6 +663,28 @@
-270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280+322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332
# File 'utils/analytics.rb', line 270 +# File 'utils/analytics.rb', line 322 def cask_output(cask, args:) return if Homebrew::EnvConfig.no_analytics? || Homebrew::EnvConfig.no_github_api? @@ -873,12 +917,12 @@
-412 -413 -414+464 +465 +466
# File 'utils/analytics.rb', line 412 +# File 'utils/analytics.rb', line 464 def config_true?(key) Homebrew::Settings.read(key) == "true" @@ -932,29 +976,29 @@
-304 -305 -306 -307 -308 -309 -310 -311 -312 -313 -314 -315 -316 -317 -318 -319 -320 -321 -322 -323+356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375
# File 'utils/analytics.rb', line 304 +# File 'utils/analytics.rb', line 356 def default_package_fields cache[:default_package_fields] ||= begin @@ -1024,26 +1068,26 @@
-283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -294 -295 -296 -297 -298 -299+335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351
# File 'utils/analytics.rb', line 283 +# File 'utils/analytics.rb', line 335 def cache[:default_package_tags] ||= begin @@ -1186,12 +1230,12 @@
-148 -149 -150+200 +201 +202
# File 'utils/analytics.rb', line 148 +# File 'utils/analytics.rb', line 200 def delete_uuid! Homebrew::Settings.delete :analyticsuuid @@ -1231,13 +1275,13 @@
-143 -144 -145 -146+195 +196 +197 +198
# File 'utils/analytics.rb', line 143 +# File 'utils/analytics.rb', line 195 def disable! Homebrew::Settings.write :analyticsdisabled, true @@ -1291,14 +1335,14 @@
-116 -117 -118 -119 -120+168 +169 +170 +171 +172
# File 'utils/analytics.rb', line 116 +# File 'utils/analytics.rb', line 168 def disabled? return true if Homebrew::EnvConfig.no_analytics? @@ -1340,14 +1384,14 @@
-137 -138 -139 -140 -141+189 +190 +191 +192 +193
# File 'utils/analytics.rb', line 137 +# File 'utils/analytics.rb', line 189 def enable! Homebrew::Settings.write :analyticsdisabled, false @@ -1389,12 +1433,12 @@
-416 -417 -418+468 +469 +470
# File 'utils/analytics.rb', line 416 +# File 'utils/analytics.rb', line 468 def format_count(count) count.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse @@ -1434,12 +1478,12 @@
-420 -421 -422+472 +473 +474
# File 'utils/analytics.rb', line 420 +# File 'utils/analytics.rb', line 472 def format_percent(percent) format("%<percent>.2f", percent:) @@ -1479,21 +1523,21 @@
-257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268+309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320
# File 'utils/analytics.rb', line 257 +# File 'utils/analytics.rb', line 309 def formula_output(formula, args:) return if Homebrew::EnvConfig.no_analytics? || Homebrew::EnvConfig.no_github_api? @@ -1555,12 +1599,12 @@
-106 -107 -108+158 +159 +160
# File 'utils/analytics.rb', line 106 +# File 'utils/analytics.rb', line 158 def config_true?(:influxanalyticsmessage) @@ -1600,14 +1644,14 @@
-131 -132 -133 -134 -135+183 +184 +185 +186 +187
# File 'utils/analytics.rb', line 131 +# File 'utils/analytics.rb', line 183 def Homebrew::Settings.write :analyticsmessage, true @@ -1662,14 +1706,14 @@
-110 -111 -112 -113 -114+162 +163 +164 +165 +166
# File 'utils/analytics.rb', line 110 +# File 'utils/analytics.rb', line 162 def config_true?(:analyticsmessage) && @@ -1724,13 +1768,13 @@
-126 -127 -128 -129+178 +179 +180 +181
# File 'utils/analytics.rb', line 126 +# File 'utils/analytics.rb', line 178 def # Used by Homebrew/install @@ -1784,12 +1828,12 @@
-122 -123 -124+174 +175 +176
# File 'utils/analytics.rb', line 122 +# File 'utils/analytics.rb', line 174 def not_this_run? ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"].present? @@ -1829,43 +1873,43 @@
-152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185+204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237
# File 'utils/analytics.rb', line 152 +# File 'utils/analytics.rb', line 204 def output(args:, filter: nil) days = args.days || "30" @@ -1936,33 +1980,33 @@
-187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210+239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262
# File 'utils/analytics.rb', line 187 +# File 'utils/analytics.rb', line 239 def output_analytics(json, args:) full_analytics = args.analytics? || verbose? @@ -2026,49 +2070,49 @@
-216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255+268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307
# File 'utils/analytics.rb', line 216 +# File 'utils/analytics.rb', line 268 def output_github_packages_downloads(formula, args:) return unless args.github_packages_downloads? @@ -2187,12 +2231,114 @@return unless tap return unless tap.should_report_analytics? - = exception..to_a.map(&:to_s).join(" ") + = exception..to_a.compact.map(&:to_s).sort.uniq.join(" ") report_package_event(:build_error, package_name: formula.name, tap_name: tap.name, options:) end
+ 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.
+ + +
+ + + +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130+ |
+
+ # File 'utils/analytics.rb', line 107 + +def report_command_run(command_instance) + return if not_this_run? || disabled? + + command = command_instance.class.command_name + + = command_instance.args..to_a.compact + + # Strip out any flag values to reduce cardinality and preserve privacy. + .map! { |option| option.sub(/=.*/, "=") } + = .sort.uniq.join(" ") + + # Tags must have low cardinality. + = { + command:, + ci: ENV["CI"].present?, + devcmdrun: config_true?(:devcmdrun), + developer: Homebrew::EnvConfig.developer?, + } + + # Fields can have high cardinality. + fields = { options: } + + report_influx(:command_run, , fields) +end+ |
+
+ 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.
+ + +
+ + + +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156+ |
+
+ # File 'utils/analytics.rb', line 133 + +def report_test_bot_test(step_command_short, passed) + return if not_this_run? || disabled? + return if ENV["HOMEBREW_TEST_BOT_ANALYTICS"].blank? + + # ensure passed is a boolean + passed = passed ? true : false + + # Tags must have low cardinality. + = { + passed:, + arch: HOMEBREW_PHYSICAL_PROCESSOR, + os: HOMEBREW_SYSTEM, + } + + # Strip out any flag values to reduce cardinality and preserve privacy. + command = step_command_short.split + .map { |arg| arg.sub(/=.*/, "=") } + .join(" ") + + # Fields can have high cardinality. + fields = { command: } + + report_influx(:test_bot_test, , fields) +end+ |
+
-325 -326 -327 -328 -329 -330 -331 -332 -333 -334 -335 -336 -337 -338 -339 -340 -341 -342 -343 -344 -345 -346 -347 -348 -349 -350 -351 -352 -353 -354 -355 -356 -357 -358 -359 -360 -361 -362 -363 -364 -365 -366 -367 -368 -369 -370 -371 -372 -373 -374 -375 -376 377 378 379 @@ -2572,10 +2779,62 @@+410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462407 408 409 -410
# File 'utils/analytics.rb', line 325 +# File 'utils/analytics.rb', line 377 def table_output(category, days, results, os_version: false, cask_install: false) oh1 "#{category} (#{days} days)" diff --git a/docs/method_list.html b/docs/method_list.html index e6ca929ad..2064f75f2 100644 --- a/docs/method_list.html +++ b/docs/method_list.html @@ -30598,13 +30598,21 @@Method List