mailjet add/config

This commit is contained in:
Mark Moser 2016-08-02 07:58:58 -05:00
parent 465b465528
commit f7ec6ee84f
6 changed files with 30 additions and 3 deletions

View File

@ -1,17 +1,17 @@
source 'https://rubygems.org'
gem 'figaro', '~> 1.1.1'
gem 'settingslogic', '~> 2.0.9'
gem 'bcrypt', '~> 3.1.7'
gem 'mysql2', '>= 0.3.18', '< 0.5'
gem 'rails', '~> 5.0.0'
# gem 'autoprefixer-rails'
gem 'jbuilder', '~> 2.6'
gem 'jquery-rails'
gem 'json', '~> 2.0.2'
gem 'mailjet', '~> 1.3.8'
gem 'puma', '~> 3.0'
gem 'sass-rails', '~> 5.0'
gem 'settingslogic', '~> 2.0.9'
gem 'turbolinks', '~> 5'
gem 'uglifier', '>= 1.3.0'

View File

@ -62,6 +62,8 @@ GEM
coderay (1.1.1)
concurrent-ruby (1.0.2)
debug_inspector (0.0.2)
domain_name (0.5.20160615)
unf (>= 0.0.5, < 1.0.0)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
@ -98,6 +100,8 @@ GEM
guard-shell (0.7.1)
guard (>= 2.0.0)
guard-compat (~> 1.0)
http-cookie (1.0.2)
domain_name (~> 0.5)
http_parser.rb (0.6.0)
i18n (0.7.0)
jbuilder (2.6.0)
@ -117,6 +121,10 @@ GEM
lumberjack (1.0.10)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mailjet (1.3.8)
activesupport (>= 3.1.0)
rack (>= 1.4.0)
rest-client
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
@ -134,6 +142,7 @@ GEM
sass (>= 3.3)
thor (~> 0.19)
nenv (0.3.0)
netrc (0.11.0)
nio4r (1.2.1)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
@ -193,6 +202,10 @@ GEM
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rest-client (2.0.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rubocop (0.42.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
@ -233,6 +246,9 @@ GEM
thread_safe (~> 0.1)
uglifier (3.0.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
unicode-display_width (1.1.0)
web-console (3.3.1)
actionview (>= 5.0)
@ -264,6 +280,7 @@ DEPENDENCIES
jquery-rails
json (~> 2.0.2)
listen (~> 3.0)
mailjet (~> 1.3.8)
minitest-reporters
mysql2 (>= 0.3.18, < 0.5)
neat

View File

@ -1,4 +1,4 @@
class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
default from: ENV['default_mail_from']
layout 'mailer'
end

View File

@ -20,5 +20,8 @@ module SkillAssessmentApp
# bower
config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components')
config.action_mailer.delivery_method = :mailjet
config.action_mailer.default_url_options = { host: ENV['full_app_url'] }
end
end

View File

@ -7,6 +7,7 @@ defaults: &defaults
mailjet_key: "api-key"
mailjet_secret: "api-secret"
default_mail_from: "skills-assessment@dev.perficientxd.com"
full_app_url: "localhost:3000"
development:
<<: *defaults
@ -19,3 +20,4 @@ production:
mysql_usr: "user"
mysql_pwd: "password!"
secret_key_base: "super-long-secret-key-base"
full_app_url: "dev.perficientxd.com/Skills-Assessment/"

View File

@ -0,0 +1,5 @@
Mailjet.configure do |config|
config.api_key = ENV['mailjet_key']
config.secret_key = ENV['mailjet_secret']
config.default_from = ENV['default_mail_from']
end