aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/index.rb')
-rw-r--r--lib/bundler/index.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/bundler/index.rb b/lib/bundler/index.rb
index 95c6d70e..8b7975cc 100644
--- a/lib/bundler/index.rb
+++ b/lib/bundler/index.rb
@@ -31,6 +31,20 @@ module Bundler
end
end
+ def search_for_all_platforms(dependency)
+ specs = @specs[dependency.name]
+
+ wants_prerelease = dependency.requirement.prerelease?
+ only_prerelease = specs.all? {|spec| spec.version.prerelease? }
+ found = specs.select { |spec| dependency =~ spec }
+
+ unless wants_prerelease || only_prerelease
+ found.reject! { |spec| spec.version.prerelease? }
+ end
+
+ found.sort_by {|s| [s.version, s.platform.to_s == 'ruby' ? "\0" : s.platform.to_s] }
+ end
+
def sources
@specs.values.map do |specs|
specs.map{|s| s.source.class }
@@ -88,6 +102,5 @@ module Bundler
found.sort_by {|s| [s.version, s.platform.to_s == 'ruby' ? "\0" : s.platform.to_s] }
end
end
-
end
end \ No newline at end of file