| 
									
										
										
										
											2020-05-16 12:30:29 +01:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module OS | 
					
						
							|  |  |  |   module Mac | 
					
						
							|  |  |  |     class << self | 
					
						
							|  |  |  |       module Compat | 
					
						
							|  |  |  |         def preferred_arch | 
					
						
							| 
									
										
										
										
											2020-05-18 13:50:43 +01:00
										 |  |  |           odeprecated "MacOS.preferred_arch", "Hardware::CPU.arch (or ideally let the compiler handle it)" | 
					
						
							| 
									
										
										
										
											2020-05-16 12:30:29 +01:00
										 |  |  |           if Hardware::CPU.is_64_bit? | 
					
						
							|  |  |  |             Hardware::CPU.arch_64_bit | 
					
						
							|  |  |  |           else | 
					
						
							|  |  |  |             Hardware::CPU.arch_32_bit | 
					
						
							|  |  |  |           end | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         def tcc_db | 
					
						
							| 
									
										
										
										
											2020-05-18 13:50:43 +01:00
										 |  |  |           odeprecated "MacOS.tcc_db" | 
					
						
							| 
									
										
										
										
											2020-05-16 12:30:29 +01:00
										 |  |  |           @tcc_db ||= Pathname.new("/Library/Application Support/com.apple.TCC/TCC.db") | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         def pre_mavericks_accessibility_dotfile | 
					
						
							| 
									
										
										
										
											2020-05-18 13:50:43 +01:00
										 |  |  |           odeprecated "MacOS.pre_mavericks_accessibility_dotfile" | 
					
						
							| 
									
										
										
										
											2020-05-16 12:30:29 +01:00
										 |  |  |           @pre_mavericks_accessibility_dotfile ||= Pathname.new("/private/var/db/.AccessibilityAPIEnabled") | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       prepend Compat | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |