Permalink
Browse files

Fix the ordering and dependency output

  • Loading branch information...
1 parent c7f708f commit d2f927c7c1eba56e7be85d339bf9cf9a970c5c1f @evanphx evanphx committed Sep 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/middleware/api_v1_depedencies.rb
@@ -14,14 +14,14 @@ def data_for(name, ary, cache)
these = []
- gem.versions.each do |ver|
+ gem.versions.order(:number).reverse_each do |ver|
deps = ver.dependencies.find_all { |d| d.scope == "runtime" }
data = {
:name => name,
:number => ver.number,
:platform => ver.platform,
- :dependencies => deps.map { |d| d.requirements.split(" ", 2) }
+ :dependencies => deps.map { |d| [d.name, d.requirements] }
}
these << data
ary << data

0 comments on commit d2f927c

Please sign in to comment.