Sha256: 74c8446fccaa30a73d2705fd0302ce4e8f16dd51b5a794b8dd8f1fdca8998789

Contents?: true

Size: 1.76 KB

Versions: 11

Compression:

Stored size: 1.76 KB

Contents

module Integrity
  class Notifier
    class Email < Notifier::Base
      attr_reader :to, :from

      def self.to_haml
        <<-EOF
%p.normal
  %label{ :for => "email_notifier_to" } Send to
  %input.text#email_notifier_to{ :name => "notifiers[Email][to]", :type => "text", :value => config["to"] }

%p.normal
  %label{ :for => "email_notifier_from" } Send from
  %input.text#email_notifier_from{ :name => "notifiers[Email][from]", :type => "text", :value => config["from"] }

%h3 SMTP Server Configuration

%p.normal
  %label{ :for => "email_notifier_host" } Host : Port
  = succeed " : " do
    %input.text#email_notifier_host{ :name => "notifiers[Email][host]", :value => config["host"], :style => "width: 24.5em;", :type => "text" }
  %input.text#email_notifier_port{ :name => "notifiers[Email][port]", :value => config["port"], :style => "width: 3.5em;", :type => "text" }

%p.normal
  %label{ :for => "email_notifier_user" } User
  %input.text#email_notifier_user{ :name => "notifiers[Email][user]", :value => config["user"], :type => "text" }

%p.normal
  %label{ :for => "email_notifier_pass" } Password
  %input.text#email_notifier_pass{ :name => "notifiers[Email][pass]", :value => config["pass"], :type => "text" }

%p.normal
  %label{ :for => "email_notifier_auth" } Auth type
  %input.text#email_notifier_auth{ :name => "notifiers[Email][auth]", :value => (config["auth"] || "plain"), :type => "text" }

%p.normal
  %label{ :for => "email_notifier_domain" } Domain
  %input.text#email_notifier_domain{ :name => "notifiers[Email][domain]", :value => config["domain"], :type => "text" }
EOF
      end

      def initialize(build, config={})
        @to     = config.delete("to")
        @from   = config.delete("from")
        super
      end

      def deliver!
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
alphasights-integrity-0.1.10 test/helpers/acceptance/email_notifier.rb
alphasights-integrity-0.1.9.3 test/helpers/acceptance/email_notifier.rb
alphasights-integrity-0.1.9.4 test/helpers/acceptance/email_notifier.rb
alphasights-integrity-0.1.9.5 test/helpers/acceptance/email_notifier.rb
alphasights-integrity-0.1.9.6 test/helpers/acceptance/email_notifier.rb
alphasights-integrity-0.1.9.7 test/helpers/acceptance/email_notifier.rb
alphasights-integrity-0.1.9.8 test/helpers/acceptance/email_notifier.rb
integrity-integrity-0.1.10 test/helpers/acceptance/email_notifier.rb
integrity-integrity-0.1.9.3 test/helpers/acceptance/email_notifier.rb
integrity-0.1.11 test/helpers/acceptance/email_notifier.rb
integrity-0.1.10 test/helpers/acceptance/email_notifier.rb