diff options
author | Carl Lerche <carllerche@mac.com> | 2010-06-03 20:15:00 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-06-03 20:15:00 -0700 |
commit | 82c7eb288612953b0b9ce76c425e624dcb97604e (patch) | |
tree | 69ab3b01bbf570c92468b51a3996c220d46fb63c /lib/bundler/rubygems_ext.rb | |
parent | 3edfddbf7ebe4b942e1e2b6d693afd582e9a8147 (diff) | |
download | bundler-82c7eb288612953b0b9ce76c425e624dcb97604e.tar.gz |
Resolves return LazySpecs with generic platforms instead of the full platform
Diffstat (limited to 'lib/bundler/rubygems_ext.rb')
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index 94f8a12d..6f4ffe7a 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -124,4 +124,20 @@ module Gem out end end + + class Platform + JAVA = Gem::Platform.new('java') + MSWIN = Gem::Platform.new('mswin32') + MING = Gem::Platform.new('mingw32') + + class << RUBY + def to_generic ; self ; end + end + + GENERICS = [JAVA, MSWIN, MING, RUBY] + + def to_generic + GENERICS.find { |p| self =~ p } || RUBY + end + end end |