From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.240.136 with SMTP id la8cs113167icb; Fri, 4 Feb 2011 19:52:17 -0800 (PST) Received: by 10.224.28.70 with SMTP id l6mr4291947qac.302.1296877936326; Fri, 04 Feb 2011 19:52:16 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id m3si2181612vcm.178.2011.02.04.19.52.15; Fri, 04 Feb 2011 19:52:16 -0800 (PST) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 8BC7B1D78101; Fri, 4 Feb 2011 22:52:15 -0500 (EST) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by rubyforge.org (Postfix) with ESMTP id ED8801858392 for ; Fri, 4 Feb 2011 21:54:50 -0500 (EST) Received: by ywc21 with SMTP id 21so1283433ywc.23 for ; Fri, 04 Feb 2011 18:54:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Xjq01jlexjxyidqBC87QjURo6ZyVaDNeZaE+PR7QJxo=; b=P1xKp7U8awz0mJw0Iaauy+t8YtWZLTJN1TdyCo3Lf/BlgrDZr5j4WtB350fpY3lnCx piZM1yK16iyUmOJdoK7haenRV+AbwIT8Ft5cVhPLHXkN7Ljs22Q5+zHrDZAq6bs1iazs +bj81MFmFRWsKbMajjYkMMpvyRfCDQ8Rmt7X4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=giTv/1KTin+J+DQ3/7/mfx9JX5hmERMzfFL0F/5lySKMC1ZN80bCvXRymiVrEMsaiW PeUeXKUU/9A3alsLqbkx1tbS4AXxvA3emPAB0Wt/vPW94g6LGLGG+bTgvc+5791roxkD GKTF1qNDsnLmtH9gf0MWeCji07q02woz7sZjc= MIME-Version: 1.0 Received: by 10.146.168.9 with SMTP id q9mr876235yae.33.1296874489427; Fri, 04 Feb 2011 18:54:49 -0800 (PST) Received: by 10.147.136.9 with HTTP; Fri, 4 Feb 2011 18:54:49 -0800 (PST) In-Reply-To: <1296871814-sup-3165@plc.intranet.plecavalier.com> References: <1296746458-sup-2021@plc.intranet.plecavalier.com> <1296871814-sup-3165@plc.intranet.plecavalier.com> Date: Fri, 4 Feb 2011 21:54:49 -0500 Message-ID: From: Blake Sweeney To: Philippe LeCavalier Cc: sup-talk Subject: Re: [sup-talk] New User Hooks Details X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org On Fri, Feb 4, 2011 at 9:15 PM, Philippe LeCavalier wrote: > Hi. > > Excerpts from Hamish D's message of Thu Feb 03 18:48:56 -0500 2011: >> > One bit of info that seems odd to me is when I issue 'sup -l' the hooks listed are nowhere to be found in the hooks folder yet they appear to be working. Is that normal? >> >> sup -l will list the hooks you can use - it doesn't check what hooks >> you've actually created. >> >> > sample hook: >> > #Mark Lists >> > addressfile = File.open("/home/plecavalier/.sup/hooks/label.lists","r") >> > if ! addressfile.grep(/#{message.list_address}/).empty? >> > message.add_label :lists >> > end >> >> You can stick debug statements in - say: >> >> debug "list address is #{message.list_address.inspect}, type is >> #{message.list_address.class.to_s}" >> >> and then see it in the log (while using sup, press ";" and scroll down >> to the log buffer). >> >> I think that message.list_address is actually of class Person, so you >> would want to use message.list_address.email for your case. I've >> updated the wiki to correct that - I think I may have written the >> wrong information into the wiki to start with :/ so sorry for the >> mistake. > Thanks for this. And thanks to everyone else who posted suggestions. Suffice it to say, I would have never figured that out on my own. > > I'm also seeing allot more info now with debugs here there and everywhere and can work from that. > > One question came to mind while I was fixing my hooks...Does the email address have to be complete or can it be just the domain? (I'm referring to the email address list in the referenced file of course) > > -- > Thanks, > Phil > _______________________________________________ > sup-talk mailing list > sup-talk@rubyforge.org > http://rubyforge.org/mailman/listinfo/sup-talk > I'm a bit biased but I think my gem sup_tag could help out. It makes tagging messages pretty easy. For example: tag do list_address /sup-talk/, :sup end tags all messages with sup-talk in the list address as sup. Checkout out: https://github.com/blakesweeney/sup_tag Blake _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk