Sha256: f7ff8d8a9ea177cc838d0acd1b0bd2a1366aee7c176e0b26aba5cdebef805b74

Contents?: true

Size: 794 Bytes

Versions: 2

Compression:

Stored size: 794 Bytes

Contents

module Pah
  module Templates
    class Sendgrid < Pah::Template
      def call
        sendgrid_config = <<SENDGRID

  # SendGrid config
  config.action_mailer.default_url_options = { host: ENV['CANONICAL_HOST'] }
  config.action_mailer.smtp_settings = {
    address:              'smtp.sendgrid.net',
    port:                 '587',
    authentication:       :plain,
    user_name:            ENV['SENDGRID_USERNAME'],
    password:             ENV['SENDGRID_PASSWORD'],
    domain:               'heroku.com',
    enable_starttls_auto: true
  }
SENDGRID

        inject_into_file 'config/environments/production.rb', sendgrid_config,  before: /^end/, verbose: false

        git add: 'config/environments/production.rb'
        git_commit 'Add sendgrid config.'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pah-0.0.17 lib/pah/templates/sendgrid.rb
pah-0.0.16 lib/pah/templates/sendgrid.rb