Sha256: 47a6e845d20319372944ff17e10be2b3875790f2b3d71d5104ae97207633bac3

Contents?: true

Size: 794 Bytes

Versions: 5

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

5 entries across 5 versions & 1 rubygems

Version Path
pah-0.0.28 lib/pah/templates/sendgrid.rb
pah-0.0.27 lib/pah/templates/sendgrid.rb
pah-0.0.26 lib/pah/templates/sendgrid.rb
pah-0.0.25 lib/pah/templates/sendgrid.rb
pah-0.0.24 lib/pah/templates/sendgrid.rb