config: show homebrew ruby for all system (#492)
This commit is contained in:
		
							parent
							
								
									7508da2876
								
							
						
					
					
						commit
						fe3915237e
					
				| @ -28,14 +28,8 @@ class SystemConfig | ||||
|       "#{MacOS::XQuartz.version} => #{describe_path(MacOS::XQuartz.prefix)}" | ||||
|     end | ||||
| 
 | ||||
|     def describe_system_ruby | ||||
|       s = "" | ||||
|       case RUBY_VERSION | ||||
|       when /^1\.[89]/, /^2\.0/ | ||||
|         s << "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" | ||||
|       else | ||||
|         s << RUBY_VERSION | ||||
|       end | ||||
|     def describe_homebrew_ruby | ||||
|       s = describe_homebrew_ruby_version | ||||
| 
 | ||||
|       if RUBY_PATH.to_s !~ %r{^/System/Library/Frameworks/Ruby.framework/Versions/[12]\.[089]/usr/bin/ruby} | ||||
|         s << " => #{RUBY_PATH}" | ||||
| @ -45,7 +39,6 @@ class SystemConfig | ||||
| 
 | ||||
|     def dump_verbose_config(f = $stdout) | ||||
|       dump_generic_verbose_config(f) | ||||
|       f.puts "System Ruby: #{describe_system_ruby}" | ||||
|       f.puts "OS X: #{MacOS.full_version}-#{kernel}" | ||||
|       f.puts "Xcode: #{xcode ? xcode : "N/A"}" | ||||
|       f.puts "CLT: #{clt ? clt : "N/A"}" | ||||
|  | ||||
| @ -85,6 +85,19 @@ class SystemConfig | ||||
|       end | ||||
|     end | ||||
| 
 | ||||
|     def describe_homebrew_ruby_version | ||||
|       case RUBY_VERSION | ||||
|       when /^1\.[89]/, /^2\.0/ | ||||
|         "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" | ||||
|       else | ||||
|         RUBY_VERSION | ||||
|       end | ||||
|     end | ||||
| 
 | ||||
|     def describe_homebrew_ruby | ||||
|       "#{describe_homebrew_ruby_version} => #{RUBY_PATH}" | ||||
|     end | ||||
| 
 | ||||
|     def hardware | ||||
|       return if Hardware::CPU.type == :dunno | ||||
|       "CPU: #{Hardware.cores_as_words}-core #{Hardware::CPU.bits}-bit #{Hardware::CPU.family}" | ||||
| @ -129,6 +142,7 @@ class SystemConfig | ||||
|       f.puts "HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}" | ||||
|       f.puts "HOMEBREW_BOTTLE_DOMAIN: #{BottleSpecification::DEFAULT_DOMAIN}" | ||||
|       f.puts hardware if hardware | ||||
|       f.puts "Homebrew Ruby: #{describe_homebrew_ruby}" | ||||
|       f.puts "GCC-4.0: build #{gcc_40}" if gcc_40 | ||||
|       f.puts "GCC-4.2: build #{gcc_42}" if gcc_42 | ||||
|       f.puts "Clang: #{clang ? "#{clang} build #{clang_build}" : "N/A"}" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Xu Cheng
						Xu Cheng