Add premailer for inlining email CSS
This commit is contained in:
parent
42a92ccb5a
commit
a69c5256a4
4 changed files with 68 additions and 0 deletions
1
Gemfile
1
Gemfile
|
@ -27,6 +27,7 @@ gem 'countries', '~> 3.0'
|
||||||
gem 'i18n-js', '~> 3.8', git: 'https://github.com/houdiniproject/i18n-js.git', branch: 'houdini-tweaks'
|
gem 'i18n-js', '~> 3.8', git: 'https://github.com/houdiniproject/i18n-js.git', branch: 'houdini-tweaks'
|
||||||
gem 'lograge', '~> 0.11.2' # make logging less terrible in rails
|
gem 'lograge', '~> 0.11.2' # make logging less terrible in rails
|
||||||
gem 'rails-i18n', '~> 6.0.0', '~> 6'
|
gem 'rails-i18n', '~> 6.0.0', '~> 6'
|
||||||
|
gem 'premailer-rails', '~> 1.11' # for styling of email
|
||||||
gem 'money', '~> 6.13'
|
gem 'money', '~> 6.13'
|
||||||
|
|
||||||
# Database and Events
|
# Database and Events
|
||||||
|
|
11
Gemfile.lock
11
Gemfile.lock
|
@ -129,6 +129,8 @@ GEM
|
||||||
crack (0.4.5)
|
crack (0.4.5)
|
||||||
rexml
|
rexml
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
|
css_parser (1.9.0)
|
||||||
|
addressable
|
||||||
dante (0.2.0)
|
dante (0.2.0)
|
||||||
database_cleaner (1.8.5)
|
database_cleaner (1.8.5)
|
||||||
database_cleaner-active_record (1.8.0)
|
database_cleaner-active_record (1.8.0)
|
||||||
|
@ -173,6 +175,7 @@ GEM
|
||||||
hamster (3.0.0)
|
hamster (3.0.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
hashdiff (1.0.1)
|
hashdiff (1.0.1)
|
||||||
|
htmlentities (4.3.4)
|
||||||
http-accept (1.7.0)
|
http-accept (1.7.0)
|
||||||
http-cookie (1.0.3)
|
http-cookie (1.0.3)
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
|
@ -230,6 +233,13 @@ GEM
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
pg (1.2.3)
|
pg (1.2.3)
|
||||||
power_assert (1.2.0)
|
power_assert (1.2.0)
|
||||||
|
premailer (1.15.0)
|
||||||
|
addressable
|
||||||
|
css_parser (>= 1.6.0)
|
||||||
|
htmlentities (>= 4.0.0)
|
||||||
|
premailer-rails (1.11.1)
|
||||||
|
actionmailer (>= 3)
|
||||||
|
premailer (~> 1.7, >= 1.7.9)
|
||||||
pry (0.12.2)
|
pry (0.12.2)
|
||||||
coderay (~> 1.1.0)
|
coderay (~> 1.1.0)
|
||||||
method_source (~> 0.9.0)
|
method_source (~> 0.9.0)
|
||||||
|
@ -438,6 +448,7 @@ DEPENDENCIES
|
||||||
money (~> 6.13)
|
money (~> 6.13)
|
||||||
param_validation!
|
param_validation!
|
||||||
pg (~> 1.1)
|
pg (~> 1.1)
|
||||||
|
premailer-rails (~> 1.11)
|
||||||
pry (~> 0.12.2)
|
pry (~> 0.12.2)
|
||||||
pry-byebug (~> 3.7.0)
|
pry-byebug (~> 3.7.0)
|
||||||
puma (~> 5.3)
|
puma (~> 5.3)
|
||||||
|
|
50
NOTICE-ruby
50
NOTICE-ruby
|
@ -1379,6 +1379,34 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
** htmlentities; version 4.3.4 --
|
||||||
|
Copyright (c) 2005-2013 Paul Battley
|
||||||
|
|
||||||
|
== Licence (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2005-2013 Paul Battley
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|
||||||
** rspec; version 3.9.0 --
|
** rspec; version 3.9.0 --
|
||||||
|
@ -2409,6 +2437,26 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
** premailer-rails; version 1.11.1 --
|
||||||
|
Copyright (c) 2011-2012 Philipe Fatio
|
||||||
|
|
||||||
|
Copyright (C) 2011-2012 Philipe Fatio (fphilipe)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
||||||
|
the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||||
|
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|
||||||
** concurrent-ruby; version 1.1.8 --
|
** concurrent-ruby; version 1.1.8 --
|
||||||
|
@ -2814,6 +2862,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
Copyright (c) 2005-2012 Kornelius Kalnbach <murphy@rubychan.de>
|
Copyright (c) 2005-2012 Kornelius Kalnbach <murphy@rubychan.de>
|
||||||
** crack; version 0.4.5 --
|
** crack; version 0.4.5 --
|
||||||
Copyright (c) 2004-2008 David Heinemeier Hansson
|
Copyright (c) 2004-2008 David Heinemeier Hansson
|
||||||
|
** css_parser; version 1.9.0 --
|
||||||
|
Copyright (c) 2007-11 Alex Dunae
|
||||||
** devise; version 4.7.3 --
|
** devise; version 4.7.3 --
|
||||||
Copyright 2009-2019 Plataformatec.
|
Copyright 2009-2019 Plataformatec.
|
||||||
** http-accept; version 1.7.0 --
|
** http-accept; version 1.7.0 --
|
||||||
|
|
6
config/initializers/premailer.rb
Normal file
6
config/initializers/premailer.rb
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
|
|
||||||
|
# We want to keep any style attributes one elements already defined in the mailer html.
|
||||||
|
Premailer::Rails.config.merge!(preserve_style_attribute: true)
|
Loading…
Reference in a new issue