aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/rubygems_ext.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-06-03 20:15:00 -0700
committerCarl Lerche <carllerche@mac.com>2010-06-03 20:15:00 -0700
commit82c7eb288612953b0b9ce76c425e624dcb97604e (patch)
tree69ab3b01bbf570c92468b51a3996c220d46fb63c /lib/bundler/rubygems_ext.rb
parent3edfddbf7ebe4b942e1e2b6d693afd582e9a8147 (diff)
downloadbundler-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.rb16
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