Class: Katello::TaskMailer

Inherits:
ApplicationMailer
  • Object
show all
Defined in:
app/mailers/katello/task_mailer.rb

Instance Method Summary collapse

Instance Method Details

#cv_promote_failure(options) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
# File 'app/mailers/katello/task_mailer.rb', line 30

def cv_promote_failure(options)
  user, @content_view, @task = options.values_at(:user, :content_view, :task)

  ::User.as(user.) do
    subject = _("%{label} failed") % { :label => @task.action }

    set_locale_for(user) do
      mail(:to => user.mail, :subject => subject)
    end
  end
end

#cv_publish_failure(options) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
# File 'app/mailers/katello/task_mailer.rb', line 18

def cv_publish_failure(options)
  user, @content_view, @task = options.values_at(:user, :content_view, :task)

  ::User.as(user.) do
    subject = _("%{label} failed") % { :label => @task.action }

    set_locale_for(user) do
      mail(:to => user.mail, :subject => subject)
    end
  end
end

#proxy_sync_failure(options) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
# File 'app/mailers/katello/task_mailer.rb', line 42

def proxy_sync_failure(options)
  user, @environment, @repo, @content_view, @task, @smart_proxy = options.values_at(:user, :environment, :repository, :content_view, :task, :smart_proxy)

  ::User.as(user.) do
    subject = _("%{label} failed") % { :label => @task.action }

    set_locale_for(user) do
      mail(:to => user.mail, :subject => subject)
    end
  end
end

#repo_sync_failure(options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'app/mailers/katello/task_mailer.rb', line 6

def repo_sync_failure(options)
  user, @repo, @task = options.values_at(:user, :repo, :task)

  ::User.as(user.) do
    subject = _("Repository %{label} failed to synchronize") % { :label => @repo.label }

    set_locale_for(user) do
      mail(:to => user.mail, :subject => subject)
    end
  end
end