class Geminabox::Server

def gem_dependencies(gem_name)

Return a list of versions of gem 'gem_name' with the dependencies of each version.
def gem_dependencies(gem_name)
  dependency_cache.marshal_cache(gem_name) do
    load_gems.
      select { |gem| gem_name == gem.name }.
      map    { |gem| [gem, spec_for(gem.name, gem.number, gem.platform)] }.
      reject { |(_, spec)| spec.nil? }.
      map do |(gem, spec)|
        {
          :name => gem.name,
          :number => gem.number.version,
          :platform => gem.platform,
          :dependencies => runtime_dependencies(spec)
        }
      end
  end
end