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=BAYES_00,FREEMAIL_FROM, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: "Lawrence Pit" Newsgroups: gmane.comp.lang.ruby.raindrops.general Subject: [PATCH] Watcher: Use relative paths in HTML links Date: Fri, 30 Nov 2012 11:37:08 +1100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354235848 1097 80.91.229.3 (30 Nov 2012 00:37:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Nov 2012 00:37:28 +0000 (UTC) To: raindrops@librelist.org Original-X-From: raindrops@librelist.org Fri Nov 30 01:37:38 2012 Return-path: Envelope-to: gclrrg-raindrops@m.gmane.org In-Reply-To: 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:99 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TeEbn-0008D0-6j for gclrrg-raindrops@m.gmane.org; Fri, 30 Nov 2012 01:37:35 +0100 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id DE83C21EFE8 for ; Fri, 30 Nov 2012 00:49:26 +0000 (UTC) When I mount Raindrops::Watcher like so: map "/_raindrops" do run Raindrops::Watcher.new end Then in the HTML output links use an absolute path instead of relative to the path /_raindrops/ Cheers, Lawrence --- lib/raindrops/watcher.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/raindrops/watcher.rb b/lib/raindrops/watcher.rb index 43c30ef..b7199a1 100644 --- a/lib/raindrops/watcher.rb +++ b/lib/raindrops/watcher.rb @@ -260,7 +260,7 @@ class Raindrops::Watcher headers.map { |k,v| "#{k.gsub(/^X-/, '')}#{v}" }.join << "
#{escape_html agg}
" \ - "
" \ + "" \ "
" \ "" headers["Content-Type"] = "text/html" @@ -346,14 +346,14 @@ class Raindrops::Watcher end.map do |addr,stats| e_addr = escape addr "" \ - "#{escape_html addr}" \ - "#{stats.active}" \ - "#{stats.queued}" \ - "
" \ + "" \ "
" \ "" \ -- 1.7.11.1