Sha256: 879256abf75197a03b7b871b4a97978f08a0a5034035b833bdd6aaaff8e6cc0f

Contents?: true

Size: 1.8 KB

Versions: 14

Compression:

Stored size: 1.8 KB

Contents

require 'rubygems'
require 'integrity'

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

14 entries across 14 versions & 5 rubygems

Version Path
foca-integrity-0.1.9.0 test/helpers/acceptance/email_notifier.rb
foca-integrity-0.1.9.1 test/helpers/acceptance/email_notifier.rb
foca-integrity-0.1.9.2 test/helpers/acceptance/email_notifier.rb
foca-integrity-0.1.9.3 test/helpers/acceptance/email_notifier.rb
gforces-integrity-0.1.9.3 test/helpers/acceptance/email_notifier.rb
gforces-integrity-0.1.9.4 test/helpers/acceptance/email_notifier.rb
imbriaco-integrity-0.1.9.2.1 test/helpers/acceptance/email_notifier.rb
imbriaco-integrity-0.1.9.2 test/helpers/acceptance/email_notifier.rb
oliyoung-integrity-0.1.9.0 test/helpers/acceptance/email_notifier.rb
integrity-0.1.9.1 test/helpers/acceptance/email_notifier.rb
integrity-0.1.9.0 test/helpers/acceptance/email_notifier.rb
integrity-0.1.9.3 test/helpers/acceptance/email_notifier.rb
integrity-0.1.9 test/helpers/acceptance/email_notifier.rb
integrity-0.1.9.2 test/helpers/acceptance/email_notifier.rb