def by_name(&block)
      @grouped ||= @gems.group_by(&:name).map{|name, collection|
        [name, Geminabox::GemVersionCollection.new(collection)]
      }.sort_by{|name, collection|
        name.downcase
      }

      if block_given?
        @grouped.each(&block)
      else
        @grouped
      end
    end
def by_name(&block)
      @grouped ||= @gems.group_by(&:name).map{|name, collection|
        [name, Geminabox::GemVersionCollection.new(collection)]
      }.sort_by{|name, collection|
        name.downcase
      }

      if block_given?
        @grouped.each(&block)
      else
        @grouped
      end
    end
The collection can contain gems of different names, this method groups them
 by name, and then sorts the different version of each name by version and
 platform.

 yields 'foo_gem', version_collection