mailjet add/config
This commit is contained in:
parent
465b465528
commit
f7ec6ee84f
4
Gemfile
4
Gemfile
@ -1,17 +1,17 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'figaro', '~> 1.1.1'
|
gem 'figaro', '~> 1.1.1'
|
||||||
gem 'settingslogic', '~> 2.0.9'
|
|
||||||
gem 'bcrypt', '~> 3.1.7'
|
gem 'bcrypt', '~> 3.1.7'
|
||||||
gem 'mysql2', '>= 0.3.18', '< 0.5'
|
gem 'mysql2', '>= 0.3.18', '< 0.5'
|
||||||
gem 'rails', '~> 5.0.0'
|
gem 'rails', '~> 5.0.0'
|
||||||
|
|
||||||
# gem 'autoprefixer-rails'
|
|
||||||
gem 'jbuilder', '~> 2.6'
|
gem 'jbuilder', '~> 2.6'
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
gem 'json', '~> 2.0.2'
|
gem 'json', '~> 2.0.2'
|
||||||
|
gem 'mailjet', '~> 1.3.8'
|
||||||
gem 'puma', '~> 3.0'
|
gem 'puma', '~> 3.0'
|
||||||
gem 'sass-rails', '~> 5.0'
|
gem 'sass-rails', '~> 5.0'
|
||||||
|
gem 'settingslogic', '~> 2.0.9'
|
||||||
gem 'turbolinks', '~> 5'
|
gem 'turbolinks', '~> 5'
|
||||||
gem 'uglifier', '>= 1.3.0'
|
gem 'uglifier', '>= 1.3.0'
|
||||||
|
|
||||||
|
17
Gemfile.lock
17
Gemfile.lock
@ -62,6 +62,8 @@ GEM
|
|||||||
coderay (1.1.1)
|
coderay (1.1.1)
|
||||||
concurrent-ruby (1.0.2)
|
concurrent-ruby (1.0.2)
|
||||||
debug_inspector (0.0.2)
|
debug_inspector (0.0.2)
|
||||||
|
domain_name (0.5.20160615)
|
||||||
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
em-websocket (0.5.1)
|
em-websocket (0.5.1)
|
||||||
eventmachine (>= 0.12.9)
|
eventmachine (>= 0.12.9)
|
||||||
http_parser.rb (~> 0.6.0)
|
http_parser.rb (~> 0.6.0)
|
||||||
@ -98,6 +100,8 @@ GEM
|
|||||||
guard-shell (0.7.1)
|
guard-shell (0.7.1)
|
||||||
guard (>= 2.0.0)
|
guard (>= 2.0.0)
|
||||||
guard-compat (~> 1.0)
|
guard-compat (~> 1.0)
|
||||||
|
http-cookie (1.0.2)
|
||||||
|
domain_name (~> 0.5)
|
||||||
http_parser.rb (0.6.0)
|
http_parser.rb (0.6.0)
|
||||||
i18n (0.7.0)
|
i18n (0.7.0)
|
||||||
jbuilder (2.6.0)
|
jbuilder (2.6.0)
|
||||||
@ -117,6 +121,10 @@ GEM
|
|||||||
lumberjack (1.0.10)
|
lumberjack (1.0.10)
|
||||||
mail (2.6.4)
|
mail (2.6.4)
|
||||||
mime-types (>= 1.16, < 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)
|
method_source (0.8.2)
|
||||||
mime-types (3.1)
|
mime-types (3.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
@ -134,6 +142,7 @@ GEM
|
|||||||
sass (>= 3.3)
|
sass (>= 3.3)
|
||||||
thor (~> 0.19)
|
thor (~> 0.19)
|
||||||
nenv (0.3.0)
|
nenv (0.3.0)
|
||||||
|
netrc (0.11.0)
|
||||||
nio4r (1.2.1)
|
nio4r (1.2.1)
|
||||||
nokogiri (1.6.8)
|
nokogiri (1.6.8)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.1.0)
|
||||||
@ -193,6 +202,10 @@ GEM
|
|||||||
rb-fsevent (0.9.7)
|
rb-fsevent (0.9.7)
|
||||||
rb-inotify (0.9.7)
|
rb-inotify (0.9.7)
|
||||||
ffi (>= 0.5.0)
|
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)
|
rubocop (0.42.0)
|
||||||
parser (>= 2.3.1.1, < 3.0)
|
parser (>= 2.3.1.1, < 3.0)
|
||||||
powerpack (~> 0.1)
|
powerpack (~> 0.1)
|
||||||
@ -233,6 +246,9 @@ GEM
|
|||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (3.0.0)
|
uglifier (3.0.0)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
|
unf (0.1.4)
|
||||||
|
unf_ext
|
||||||
|
unf_ext (0.0.7.2)
|
||||||
unicode-display_width (1.1.0)
|
unicode-display_width (1.1.0)
|
||||||
web-console (3.3.1)
|
web-console (3.3.1)
|
||||||
actionview (>= 5.0)
|
actionview (>= 5.0)
|
||||||
@ -264,6 +280,7 @@ DEPENDENCIES
|
|||||||
jquery-rails
|
jquery-rails
|
||||||
json (~> 2.0.2)
|
json (~> 2.0.2)
|
||||||
listen (~> 3.0)
|
listen (~> 3.0)
|
||||||
|
mailjet (~> 1.3.8)
|
||||||
minitest-reporters
|
minitest-reporters
|
||||||
mysql2 (>= 0.3.18, < 0.5)
|
mysql2 (>= 0.3.18, < 0.5)
|
||||||
neat
|
neat
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
default from: 'from@example.com'
|
default from: ENV['default_mail_from']
|
||||||
layout 'mailer'
|
layout 'mailer'
|
||||||
end
|
end
|
||||||
|
@ -20,5 +20,8 @@ module SkillAssessmentApp
|
|||||||
|
|
||||||
# bower
|
# bower
|
||||||
config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components')
|
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
|
||||||
end
|
end
|
||||||
|
@ -7,6 +7,7 @@ defaults: &defaults
|
|||||||
mailjet_key: "api-key"
|
mailjet_key: "api-key"
|
||||||
mailjet_secret: "api-secret"
|
mailjet_secret: "api-secret"
|
||||||
default_mail_from: "skills-assessment@dev.perficientxd.com"
|
default_mail_from: "skills-assessment@dev.perficientxd.com"
|
||||||
|
full_app_url: "localhost:3000"
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
@ -19,3 +20,4 @@ production:
|
|||||||
mysql_usr: "user"
|
mysql_usr: "user"
|
||||||
mysql_pwd: "password!"
|
mysql_pwd: "password!"
|
||||||
secret_key_base: "super-long-secret-key-base"
|
secret_key_base: "super-long-secret-key-base"
|
||||||
|
full_app_url: "dev.perficientxd.com/Skills-Assessment/"
|
||||||
|
5
config/initializers/mailjet.rb
Normal file
5
config/initializers/mailjet.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user