Skip to content

Commit

Permalink
Merge pull request #511 from turingschool-projects/postmark
Browse files Browse the repository at this point in the history
Replace Sendgrid with Postmark
  • Loading branch information
kat3kasper authored May 18, 2020
2 parents ff19e5e + 38b30ce commit f3fc474
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 39 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gem 'honeybadger'
gem 'jbuilder', '~> 2.5'
gem 'jquery-rails'
gem 'pg', '~> 1.1'
gem 'postmark-rails'
gem 'puma', '~> 3.12'
gem 'rack-cors', require: 'rack/cors'
gem 'rails', '~> 5.2.2'
Expand Down
8 changes: 7 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ GEM
capybara (~> 2.1)
cliver (~> 0.3.1)
websocket-driver (>= 0.2.0)
postmark (1.21.1)
json
postmark-rails (0.20.0)
actionmailer (>= 3.0.0)
postmark (~> 1.15)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
Expand Down Expand Up @@ -340,6 +345,7 @@ DEPENDENCIES
pg (~> 1.1)
phantomjs
poltergeist
postmark-rails
pry-rails
puma (~> 3.12)
rack-cors
Expand All @@ -359,4 +365,4 @@ RUBY VERSION
ruby 2.5.1p57

BUNDLED WITH
1.16.1
1.17.3
12 changes: 0 additions & 12 deletions app/controllers/api/v1/send_grid/events_controller.rb

This file was deleted.

14 changes: 3 additions & 11 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,9 @@

module Census
class Application < Rails::Application
config.action_mailer.delivery_method = :smtp

config.action_mailer.smtp_settings = {
address: 'smtp.sendgrid.net',
port: '587',
domain: 'heroku.com',
user_name: ENV["SENDGRID_USERNAME"],
password: ENV["SENDGRID_PASSWORD"],
authentication: 'plain',
enable_starttls_auto: true
}
# Set up transactional emails through Postmark
config.action_mailer.delivery_method = :postmark
config.action_mailer.postmark_settings = { api_token: Rails.application.secrets.postmark_api_token }

config.log_tags = [
:request_id,
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
resources :groups, only: [:update, :destroy]
get '/cohorts', to: 'cohorts#index'
get '/user_credentials', to: 'credentials#show'
post '/sendgrid/events', to: 'send_grid/events#update'
end
end
end
1 change: 1 addition & 0 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ production:
api_auth_secret: <%= ENV.fetch("API_AUTH_SECRET", "no-api-secret-set") %>
enroll_graphql_endpoint: <%= ENV.fetch("ENROLL_GRAPHQL_ENDPOINT", "http://localhost:3001/graphql") %>
require_ssl_redirect_uri: <%= ENV.fetch('REQUIRE_SSL_REDIRECT_URI', 'true') == 'true' %>
postmark_api_token: <%= ENV['POSTMARK_API_TOKEN'] %>
14 changes: 0 additions & 14 deletions spec/requests/api/v1/send_grid/events_spec.rb

This file was deleted.

0 comments on commit f3fc474

Please sign in to comment.