diff options
author | Carl Lerche <carllerche@mac.com> | 2010-06-06 22:18:57 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-06-06 22:18:57 -0700 |
commit | 6de6acae79bf339ac33a4ed32105384267ad2091 (patch) | |
tree | d90411058f48746fb924421ddf9a16402bed69e8 /lib/bundler/spec_set.rb | |
parent | 2f2b5a8700ea812534404a6e5d198e642f8c68bd (diff) | |
download | bundler-6de6acae79bf339ac33a4ed32105384267ad2091.tar.gz |
Fix materializing the lazy specifications
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r-- | lib/bundler/spec_set.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index 9edfaf79f1..c5ce467494 100644 --- a/lib/bundler/spec_set.rb +++ b/lib/bundler/spec_set.rb @@ -16,7 +16,7 @@ module Bundler @specs.length end - def for(dependencies, skip = [], check = false) + def for(dependencies, skip = [], check = false, match_current_platform = false) handled, deps, specs = {}, dependencies.dup, [] until deps.empty? @@ -24,7 +24,9 @@ module Bundler next if handled[dep] || skip.include?(dep.name) spec = lookup[dep.name].find do |s| - s.match_platform(dep.__platform) + match_current_platform ? + Gem::Platform.match(s.platform) : + s.match_platform(dep.__platform) end handled[dep] = true @@ -34,7 +36,8 @@ module Bundler spec.dependencies.each do |d| next if d.type == :development - deps << DepProxy.new(d, dep.__platform) + d = DepProxy.new(d, dep.__platform) unless match_current_platform + deps << d end elsif check return false @@ -62,10 +65,10 @@ module Bundler end def materialize(deps) - materialized = self.for(deps, []).to_a + materialized = self.for(deps, [], false, true).to_a materialized.map! do |s| next s unless s.is_a?(LazySpecification) - s.__materialize__(s.source.specs) + s.__materialize__ end SpecSet.new(materialized) end |