From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.raindrops.general Subject: [PATCH 2/3] watcher: sort index of listener listing Date: Mon, 18 Jun 2012 14:20:44 -0700 Message-ID: <1340054445-29631-3-git-send-email-normalperson@yhbt.net> References: <1340054445-29631-1-git-send-email-normalperson@yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340054464 14971 80.91.229.3 (18 Jun 2012 21:21:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Jun 2012 21:21:04 +0000 (UTC) To: raindrops@librelist.org Original-X-From: raindrops@librelist.org Mon Jun 18 23:21:04 2012 Return-path: Envelope-to: gclrrg-raindrops@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: raindrops@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.raindrops.general:89 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SgjNd-0004Vx-3f for gclrrg-raindrops@m.gmane.org; Mon, 18 Jun 2012 23:21:01 +0200 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id 7497521DF17 for ; Mon, 18 Jun 2012 21:29:21 +0000 (UTC) For hosts with many listeners, it should be easier to read the index page if the results are shown in a consistent order. Requested privately via email to raindrops@bogomips.org --- lib/raindrops/watcher.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/raindrops/watcher.rb b/lib/raindrops/watcher.rb index 869fa17..5493374 100644 --- a/lib/raindrops/watcher.rb +++ b/lib/raindrops/watcher.rb @@ -337,7 +337,9 @@ class Raindrops::Watcher "" \ "" \ "" << - all.map do |addr,stats| + all.sort do |a,b| + a[0] <=> b[0] # sort by addr + end.map do |addr,stats| e_addr = escape addr "" \ "
addressactivequeuedreset