Sha256: 80040ec86d02073c9e0bcc4d9ebcfd444c5774ebe76536466fea862bb66aa2d9

Contents?: true

Size: 1.53 KB

Versions: 23

Compression:

Stored size: 1.53 KB

Contents

module Katello
  class TaskMailer < ApplicationMailer
    helper ApplicationHelper
    include Rails.application.routes.url_helpers

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

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

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

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

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

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

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

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

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

    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.login) do
        subject = _("%{label} failed") % { :label => @task.action }

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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
katello-4.14.3 app/mailers/katello/task_mailer.rb
katello-4.14.2 app/mailers/katello/task_mailer.rb
katello-4.15.0 app/mailers/katello/task_mailer.rb
katello-4.15.0.rc2 app/mailers/katello/task_mailer.rb
katello-4.15.0.rc1 app/mailers/katello/task_mailer.rb
katello-4.14.1 app/mailers/katello/task_mailer.rb
katello-4.14.0 app/mailers/katello/task_mailer.rb
katello-4.14.0.rc3 app/mailers/katello/task_mailer.rb
katello-4.14.0.rc2 app/mailers/katello/task_mailer.rb
katello-4.14.0.rc1.1 app/mailers/katello/task_mailer.rb
katello-4.14.0.rc1 app/mailers/katello/task_mailer.rb
katello-4.13.1 app/mailers/katello/task_mailer.rb
katello-4.13.0 app/mailers/katello/task_mailer.rb
katello-4.12.1 app/mailers/katello/task_mailer.rb
katello-4.13.0.rc1 app/mailers/katello/task_mailer.rb
katello-4.12.0 app/mailers/katello/task_mailer.rb
katello-4.12.0.rc3 app/mailers/katello/task_mailer.rb
katello-4.12.0.rc2 app/mailers/katello/task_mailer.rb
katello-4.12.0.rc1 app/mailers/katello/task_mailer.rb
katello-4.11.1 app/mailers/katello/task_mailer.rb