Class: Integrity::Notifier
- Inherits:
-
Object
show all
- Includes:
- DataMapper::Resource
- Defined in:
- lib/integrity/notifier.rb,
lib/integrity/notifier/base.rb,
lib/integrity/notifier/test.rb,
lib/integrity/notifier/test/hpricot_matcher.rb
Defined Under Namespace
Modules: Test
Classes: Base
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.available ⇒ Object
16
17
18
|
# File 'lib/integrity/notifier.rb', line 16
def self.available
constants.map { |name| const_get(name) }.select { |notifier| valid_notifier?(notifier) }
end
|
.enable_notifiers(project, enabled, config = {}) ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/integrity/notifier.rb', line 20
def self.enable_notifiers(project, enabled, config={})
all(:project_id => project).destroy!
list_of_enabled_notifiers(enabled).each do |name|
create! :project_id => project, :name => name, :config => config[name]
end
end
|
Instance Method Details
#notify_of_build(build) ⇒ Object
28
29
30
|
# File 'lib/integrity/notifier.rb', line 28
def notify_of_build(build)
to_const.notify_of_build(build, config)
end
|