diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-08-08 11:08:29 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-08-25 11:16:58 -0500 |
commit | 07c76fd07fe827d27ce40d6bf048ebc840330bc8 (patch) | |
tree | 31d77098390fcfcef485e4a0f65f6e8dccb9d60f /lib | |
parent | 3707f568f1cfcdf7798e623561ec4d35870b7f7d (diff) | |
download | bundler-07c76fd07fe827d27ce40d6bf048ebc840330bc8.tar.gz |
[SpecSet] Fix #for when installing with --deployment
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/spec_set.rb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb index 92b1c0dac1..fe31b17f0e 100644 --- a/lib/bundler/spec_set.rb +++ b/lib/bundler/spec_set.rb @@ -24,18 +24,9 @@ module Bundler dep = deps.shift next if handled[dep] || skip.include?(dep.name) - spec = if match_current_platform - Bundler.rubygems.platforms.reverse_each do |pl| - match = GemHelpers.select_best_platform_match(lookup[dep.name], pl) - break match if match - end - else - GemHelpers.select_best_platform_match(lookup[dep.name], dep.__platform) - end - handled[dep] = true - if spec + if spec = spec_for_dependency(dep, match_current_platform) specs << spec spec.dependencies.each do |d| @@ -159,6 +150,18 @@ module Bundler @specs.each {|s| yield s } end + def spec_for_dependency(dep, match_current_platform) + if match_current_platform + Bundler.rubygems.platforms.reverse_each do |pl| + match = GemHelpers.select_best_platform_match(lookup[dep.name], pl) + return match if match + end + nil + else + GemHelpers.select_best_platform_match(lookup[dep.name], dep.__platform) + end + end + def tsort_each_child(s) s.dependencies.sort_by(&:name).each do |d| next if d.type == :development |