From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EA79F138247 for ; Tue, 12 Nov 2013 09:21:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9C49E0B4B; Tue, 12 Nov 2013 09:21:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2CC2BE0B4B for ; Tue, 12 Nov 2013 09:21:46 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 111BF33F1B7 for ; Tue, 12 Nov 2013 09:21:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 8F966E530A for ; Tue, 12 Nov 2013 09:21:43 +0000 (UTC) From: "Alex Legler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alex Legler" Message-ID: <1384247983.e1b1538c893ca1e13505bc763143817c9f44a5c9.a3li@gentoo> Subject: [gentoo-commits] proj/infra-status:master commit in: lib/ X-VCS-Repository: proj/infra-status X-VCS-Files: lib/notice_store.rb X-VCS-Directories: lib/ X-VCS-Committer: a3li X-VCS-Committer-Name: Alex Legler X-VCS-Revision: e1b1538c893ca1e13505bc763143817c9f44a5c9 X-VCS-Branch: master Date: Tue, 12 Nov 2013 09:21:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 677a91e1-477d-414b-bb22-555ad2750454 X-Archives-Hash: c3bfcd1bfedac061618fa06ed6c3b012 commit: e1b1538c893ca1e13505bc763143817c9f44a5c9 Author: Alex Legler a3li li> AuthorDate: Tue Nov 12 09:19:43 2013 +0000 Commit: Alex Legler gentoo org> CommitDate: Tue Nov 12 09:19:43 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/infra-status.git;a=commit;h=e1b1538c Implement proper sorting --- lib/notice_store.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/notice_store.rb b/lib/notice_store.rb index abb8fb3..efd98f6 100644 --- a/lib/notice_store.rb +++ b/lib/notice_store.rb @@ -23,8 +23,7 @@ class NoticeStore end end - # Name your stuff with YYYYMMDD-foo to get the newest notices on top - @notices.reverse! + @notices.sort! { |a, b| b['created_at'] <=> a['created_at'] } @load_date = DateTime.now end