| 
									
										
										
										
											2020-10-10 14:16:11 +02:00
										 |  |  | # typed: strict | 
					
						
							| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-06 16:58:17 -07:00
										 |  |  | module Utils | 
					
						
							|  |  |  |   module Analytics | 
					
						
							|  |  |  |     class << self | 
					
						
							| 
									
										
										
										
											2020-10-28 18:49:10 +11:00
										 |  |  |       extend T::Sig | 
					
						
							| 
									
										
										
										
											2021-01-07 09:12:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-28 18:49:10 +11:00
										 |  |  |       sig { returns(String) } | 
					
						
							| 
									
										
										
										
											2018-09-06 16:58:17 -07:00
										 |  |  |       def custom_prefix_label | 
					
						
							| 
									
										
										
										
											2021-01-07 09:12:11 +00:00
										 |  |  |         return generic_custom_prefix_label if Hardware::CPU.arm? | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  |         "non-/usr/local" | 
					
						
							| 
									
										
										
										
											2018-09-06 16:58:17 -07:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2021-01-07 09:12:11 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |       sig { returns(String) } | 
					
						
							|  |  |  |       def arch_label | 
					
						
							|  |  |  |         if Hardware::CPU.arm? | 
					
						
							|  |  |  |           "ARM" | 
					
						
							|  |  |  |         elsif Hardware::CPU.in_rosetta2? | 
					
						
							|  |  |  |           "Rosetta" | 
					
						
							|  |  |  |         else | 
					
						
							|  |  |  |           "" | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2018-09-06 16:58:17 -07:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |