Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] Hooks?
Date: Sat, 01 Sep 2007 23:28:52 -0700	[thread overview]
Message-ID: <1188714270-sup-4582@south> (raw)
In-Reply-To: <1188690036-sup-8770@tatooine>

Excerpts from Magnus Therning's message of Sat Sep 01 16:47:03 -0700 2007:
> There seems to be extended support for inserting hooks in sup.
> However, any sort of hint as to how to add a hook is missing.  I
> assume they have to be written in Ruby, they should probably live in
> ~/.sup/hooks.

Hooks were added just a couple SVN revisions ago so documentation isn't
great. Running sup -l will give you a list of possible hooks and their
corresponding locations on disk. Here's my current set of hooks (and if
you search the list archives I've posted a couple more examples):

$ head .sup/hooks/*.rb
==> .sup/hooks/before-poll.rb <==
if (@last_fetchmail_time || Time.at(0)) < Time.now - 60
  say "Running fetchmail..."
  system "fetchmail >& /dev/null"
  say "Done running fetchmail."
end
@last_fetchmail_time = Time.now


==> .sup/hooks/mime-decode.rb <==
unless sibling_types.member? "text/plain"
  case content_type
  when "text/html"
    `/usr/bin/w3m -dump -T #{content_type} '#{filename}'`
  end
end

==> .sup/hooks/signature.rb <==
"William <#{from_email}>"


-- 
William <wmorgan-sup at masanjin.net>


      reply	other threads:[~2007-09-02  6:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-01 23:47 Magnus Therning
2007-09-02  6:28 ` William Morgan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1188714270-sup-4582@south \
    --to=wmorgan-sup@masanjin.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox