11# frozen_string_literal: true
22
3+ # None of this currently works, as it's based on Perforce's old GA setup.
4+ # It is functionally disabled here, but the code remains in case we want
5+ # to revive it for Vox Pupuli later.
36require_relative '../bolt/util'
47require_relative '../bolt/version'
58require 'find'
@@ -30,6 +33,8 @@ module Analytics
3033 } . freeze
3134
3235 def self . build_client ( enabled = true )
36+ # Remove if we fix this for Vox analytics
37+ config = { 'disabled' => true }
3338 begin
3439 config_file = config_path
3540 config = enabled ? load_config ( config_file ) : { }
@@ -38,7 +43,8 @@ def self.build_client(enabled = true)
3843 end
3944
4045 if !enabled || config [ 'disabled' ] || ENV [ 'BOLT_DISABLE_ANALYTICS' ]
41- Bolt ::Logger . debug "Analytics opt-out is set, analytics will be disabled"
46+ # Uncomment if we fix this for Vox analytics
47+ # Bolt::Logger.debug "Analytics opt-out is set, analytics will be disabled"
4248 NoopClient . new
4349 else
4450 unless config . key? ( 'user-id' )
@@ -76,7 +82,8 @@ def self.load_config(filename)
7682 if File . exist? ( filename )
7783 Bolt ::Util . read_optional_yaml_hash ( filename , 'analytics' )
7884 else
79- unless ENV [ 'BOLT_DISABLE_ANALYTICS' ]
85+ # Remove || true if we fix this for Vox analytics
86+ unless ENV [ 'BOLT_DISABLE_ANALYTICS' ] || true
8087 msg = <<~ANALYTICS
8188 Bolt collects data about how you use it. You can opt out of providing this data.
8289 To learn how to disable data collection, or see what data Bolt collects and why,
0 commit comments