aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/lazy_specification.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-06-04 14:18:23 -0700
committerCarl Lerche <carllerche@mac.com>2010-06-04 14:18:23 -0700
commita9b3f285411bcd1b26511a773610007d027ce4bc (patch)
tree93189d3a7fecb16b77a09e4afa3efccb2db8a54f /lib/bundler/lazy_specification.rb
parent0ccfdd8e49a4641edad0dcde5d4111bad06c8e00 (diff)
downloadbundler-a9b3f285411bcd1b26511a773610007d027ce4bc.tar.gz
Refactor SpecSet#for
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rw-r--r--lib/bundler/lazy_specification.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index d348b648..b8800e5d 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -27,6 +27,12 @@ module Bundler
@name == dependency.name && dependency.requirement.satisfied_by?(Gem::Version.new(@version))
end
+ def match_platform(p)
+ platform.nil? or p == platform or
+ (p != Gem::Platform::RUBY and p =~ platform) or
+ (p == Gem::Platform::RUBY and platform.to_generic == Gem::Platform::RUBY)
+ end
+
def to_lock
if platform == Gem::Platform::RUBY or platform.nil?
out = " #{name} (#{version})\n"