#104 ✓resolved
Simon Rozet

Refactor Notifier

Reported by Simon Rozet | February 27th, 2009 @ 01:15 PM

I ran metric_fu (I'll set it up on r2d2 later BTW) on Integrity last night and it reported some duplication on Notifier, so I went down and looked at it.

So, IMO, we should try to remove the magic found in Notifier.available. I suggest that we notifiers to be "registered", either by the notifier itself or by the user.

By the user

In config.ru :

require "integrity"
require "integrity/notifier/email"
require "integrity/notifier/irc"

Integrity.notify_with :email, :irc
run Integrity::App

On the side of the notifier

class Integrity::Notifier::Email
  def self.to_haml
  end

  # etc
end

Integrity.can_has :email, Integrity::Notifier::Email

The first requires to config stuff outside of the web interface. bad. But, the alternative is more... intrusive. One think to keep in mind when thinking about this is #41 (notification hook)

WDYT?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Automated continuous integration server that doesn't suck.

Shared Ticket Bins

People watching this ticket

Tags

Referenced by

Pages