[Rubygems-developers] Gem::Platform

Eric Hodel drbrain at segment7.net
Fri Dec 8 03:04:54 EST 2006


Currently we have:

module Platform
   RUBY = 'ruby'
   WIN32 = 'mswin32'
   LINUX_586 = 'i586-linux'
   DARWIN = 'powerpc-darwin'
   CURRENT = 'current'
end

And here's what today's source index has:

require 'rubygems/source_info_cache'
gems = Gem::SourceInfoCache.cache_data['http:// 
gems.rubyforge.org'].source_index.latest_specs

counts = Hash.new { |h,k| h[k] = 0 }
gems.each { |_,g| counts[g.platform] += 1 }
puts counts.sort_by { |pl,c| c }.map { |pl,c| "\t#{c}\t#{pl}" }.join 
("\n")

         1       powerpc-darwin
         1       i686-darwin8.4.1
         1       windows
         1       win32-1.8.2-VC7
         3       i686-linux
         3       i586-linux
         5       i386-mswin32
         22      mswin32
         29
         1108    ruby

mswin32 has been outrageously successful, but linux and darwin less-so.

I think we'll need a DARWIN_INTEL and DARWIN_UNIVERSAL, a more- 
generic linux, and ...?

-- 
Eric Hodel - drbrain at segment7.net - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!



More information about the Rubygems-developers mailing list