premailer-rails 1.9.5 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/test.yml +64 -0
- data/.gitignore +4 -0
- data/CHANGELOG.md +40 -0
- data/Gemfile +15 -11
- data/README.md +32 -37
- data/VERSION +1 -1
- data/examples/rails5/Gemfile +4 -0
- data/{example → examples/rails5}/Rakefile +1 -1
- data/{example → examples/rails5}/bin/rails +1 -1
- data/{example → examples/rails5}/config/application.rb +4 -1
- data/examples/rails5/config/boot.rb +3 -0
- data/{example → examples/rails5}/config/environment.rb +1 -1
- data/{example → examples/rails5}/config.ru +2 -1
- data/examples/rails6/.gitignore +16 -0
- data/examples/rails6/Gemfile +5 -0
- data/examples/rails6/README.md +10 -0
- data/examples/rails6/Rakefile +6 -0
- data/examples/rails6/app/assets/config/manifest.js +1 -0
- data/examples/rails6/app/assets/stylesheets/email.css +32 -0
- data/examples/rails6/app/mailers/example_mailer.rb +7 -0
- data/examples/rails6/app/views/example_mailer/test_message.html.erb +18 -0
- data/examples/rails6/bin/rails +4 -0
- data/examples/rails6/config/application.rb +15 -0
- data/examples/rails6/config/boot.rb +3 -0
- data/examples/rails6/config/environment.rb +5 -0
- data/examples/rails6/config/environments/development.rb +9 -0
- data/examples/rails6/config/environments/production.rb +9 -0
- data/examples/rails6/config/routes.rb +3 -0
- data/examples/rails6/config.ru +6 -0
- data/examples/rails6/test/mailers/previews/example_mailer_preview.rb +5 -0
- data/examples/rails7-propshaft/.gitignore +16 -0
- data/examples/rails7-propshaft/Gemfile +6 -0
- data/examples/rails7-propshaft/README.md +10 -0
- data/examples/rails7-propshaft/Rakefile +6 -0
- data/examples/rails7-propshaft/app/assets/stylesheets/email.css +32 -0
- data/examples/rails7-propshaft/app/mailers/example_mailer.rb +7 -0
- data/examples/rails7-propshaft/app/views/example_mailer/test_message.html.erb +18 -0
- data/examples/rails7-propshaft/bin/rails +4 -0
- data/examples/rails7-propshaft/config/application.rb +14 -0
- data/examples/rails7-propshaft/config/boot.rb +3 -0
- data/examples/rails7-propshaft/config/environment.rb +5 -0
- data/examples/rails7-propshaft/config/environments/development.rb +9 -0
- data/examples/rails7-propshaft/config/environments/production.rb +9 -0
- data/examples/rails7-propshaft/config/routes.rb +3 -0
- data/examples/rails7-propshaft/config.ru +6 -0
- data/examples/rails7-propshaft/test/mailers/previews/example_mailer_preview.rb +5 -0
- data/examples/rails7-sprockets/.gitignore +16 -0
- data/examples/rails7-sprockets/Gemfile +6 -0
- data/examples/rails7-sprockets/README.md +10 -0
- data/examples/rails7-sprockets/Rakefile +6 -0
- data/examples/rails7-sprockets/app/assets/config/manifest.js +1 -0
- data/examples/rails7-sprockets/app/assets/stylesheets/email.css +32 -0
- data/examples/rails7-sprockets/app/mailers/example_mailer.rb +7 -0
- data/examples/rails7-sprockets/app/views/example_mailer/test_message.html.erb +18 -0
- data/examples/rails7-sprockets/bin/rails +4 -0
- data/examples/rails7-sprockets/config/application.rb +14 -0
- data/examples/rails7-sprockets/config/boot.rb +3 -0
- data/examples/rails7-sprockets/config/environment.rb +5 -0
- data/examples/rails7-sprockets/config/environments/development.rb +9 -0
- data/examples/rails7-sprockets/config/environments/production.rb +9 -0
- data/examples/rails7-sprockets/config/routes.rb +3 -0
- data/examples/rails7-sprockets/config.ru +6 -0
- data/examples/rails7-sprockets/test/mailers/previews/example_mailer_preview.rb +5 -0
- data/lib/premailer/rails/css_helper.rb +32 -11
- data/lib/premailer/rails/css_loaders/asset_pipeline_loader.rb +16 -15
- data/lib/premailer/rails/css_loaders/file_system_loader.rb +24 -2
- data/lib/premailer/rails/css_loaders/network_loader.rb +2 -2
- data/lib/premailer/rails/css_loaders/propshaft_loader.rb +38 -0
- data/lib/premailer/rails/css_loaders.rb +1 -1
- data/lib/premailer/rails/customized_premailer.rb +4 -4
- data/lib/premailer/rails/hook.rb +2 -6
- data/lib/premailer/rails/railtie.rb +1 -1
- data/lib/premailer/rails.rb +2 -1
- data/premailer-rails.gemspec +4 -3
- data/spec/integration/css_helper_spec.rb +262 -129
- data/spec/integration/delivery_spec.rb +13 -0
- data/spec/integration/hook_spec.rb +36 -11
- data/spec/rails_app/app/assets/config/manifest.js +3 -0
- data/spec/rails_app/app/assets/stylesheets/application.css +3 -0
- data/spec/rails_app/app/mailers/application_mailer.rb +4 -0
- data/spec/rails_app/app/mailers/welcome_mailer.rb +6 -0
- data/spec/rails_app/app/views/layouts/mailer.html.erb +11 -0
- data/spec/rails_app/app/views/welcome_mailer/welcome_email.html.erb +1 -0
- data/spec/rails_app/config/application.rb +19 -0
- data/spec/rails_app/config/boot.rb +5 -0
- data/spec/rails_app/config/environment.rb +2 -0
- data/spec/rails_app/config/environments/test.rb +10 -0
- data/spec/rails_app/config/initializers/assets.rb +1 -0
- data/spec/rails_app/config/routes.rb +3 -0
- data/spec/rails_app/config.ru +5 -0
- data/spec/rails_app/log/.keep +0 -0
- data/spec/rails_app/tmp/.keep +0 -0
- data/spec/spec_helper.rb +3 -17
- data/spec/support/fixtures/message.rb +40 -0
- data/spec/unit/css_loaders/asset_pipeline_loader_spec.rb +44 -32
- data/spec/unit/css_loaders/file_system_loader_spec.rb +37 -0
- data/spec/unit/css_loaders/network_loader_spec.rb +1 -1
- data/spec/unit/css_loaders/propshaft_loader_spec.rb +57 -0
- data/spec/unit/customized_premailer_spec.rb +32 -40
- metadata +121 -81
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -22
- data/example/Gemfile +0 -10
- data/example/config/boot.rb +0 -3
- data/example/config/secrets.yml +0 -2
- data/lib/premailer/rails/css_loaders/cache_loader.rb +0 -29
- data/spec/integration/hook_registration_spec.rb +0 -11
- data/spec/support/stubs/action_mailer.rb +0 -5
- data/spec/support/stubs/rails.rb +0 -51
- /data/{example → examples/rails5}/.gitignore +0 -0
- /data/{example → examples/rails5}/README.md +0 -0
- /data/{example → examples/rails5}/app/assets/stylesheets/email.css +0 -0
- /data/{example → examples/rails5}/app/mailers/example_mailer.rb +0 -0
- /data/{example → examples/rails5}/app/views/example_mailer/test_message.html.erb +0 -0
- /data/{example → examples/rails5}/config/environments/development.rb +0 -0
- /data/{example → examples/rails5}/config/environments/production.rb +0 -0
- /data/{example → examples/rails5}/config/initializers/assets.rb +0 -0
- /data/{example → examples/rails5}/config/routes.rb +0 -0
- /data/{example → examples/rails5}/test/mailers/previews/example_mailer_preview.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d1ade699bd19b081f52953b727ac7d58019325a8724ebcb49f95158eb832b10d
|
4
|
+
data.tar.gz: 380a46fefaa3d09f491975b45d47590af610d72965ce7c6190b94aeb78a57a6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 374b301926c5084c16ee45c169715d5d53f413f398791e4c20ec3b50b52d8f065dbda20fb55c702bee153051c6480432577c1f5f33f0fe94d431a42bd07b7b7b
|
7
|
+
data.tar.gz: 2567fb6f0ab9323a6f05e292349b7a9e03d65991a5477c0584baa488dd01247469bf123e96669721f0e6326b1b3cb6b3f571dc0a6da8a428a92845d832241d51
|
@@ -0,0 +1,64 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- "*"
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- "*"
|
10
|
+
# Enable triggering CI runs manually.
|
11
|
+
workflow_dispatch:
|
12
|
+
|
13
|
+
concurrency:
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
15
|
+
cancel-in-progress: true
|
16
|
+
|
17
|
+
jobs:
|
18
|
+
test:
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
continue-on-error: ${{ matrix.experimental }}
|
21
|
+
strategy:
|
22
|
+
fail-fast: false
|
23
|
+
matrix:
|
24
|
+
ruby:
|
25
|
+
- '2.7'
|
26
|
+
- '3.1'
|
27
|
+
action_mailer_version:
|
28
|
+
- 5
|
29
|
+
- 6
|
30
|
+
- 7
|
31
|
+
propshaft:
|
32
|
+
- false
|
33
|
+
- true
|
34
|
+
experimental:
|
35
|
+
- false
|
36
|
+
exclude:
|
37
|
+
- ruby: '3.1'
|
38
|
+
action_mailer_version: 5
|
39
|
+
- action_mailer_version: 5
|
40
|
+
propshaft: true
|
41
|
+
- action_mailer_version: 6
|
42
|
+
propshaft: true
|
43
|
+
include:
|
44
|
+
- ruby: head
|
45
|
+
action_mailer_version: head
|
46
|
+
propshaft: false
|
47
|
+
experimental: true
|
48
|
+
- ruby: head
|
49
|
+
action_mailer_version: head
|
50
|
+
propshaft: true
|
51
|
+
experimental: true
|
52
|
+
steps:
|
53
|
+
- uses: actions/checkout@v3
|
54
|
+
|
55
|
+
- name: Set env vars
|
56
|
+
run: |
|
57
|
+
echo "ACTION_MAILER_VERSION=${{ matrix.action_mailer_version }}" >> $GITHUB_ENV
|
58
|
+
echo "PROPSHAFT=${{ matrix.propshaft }}" >> $GITHUB_ENV
|
59
|
+
|
60
|
+
- uses: ruby/setup-ruby@v1
|
61
|
+
with:
|
62
|
+
ruby-version: ${{ matrix.ruby }}
|
63
|
+
bundler-cache: true
|
64
|
+
- run: bundle exec rake
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,45 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v1.12.0
|
4
|
+
|
5
|
+
- Lazily load actionmailer (@c960657, #260)
|
6
|
+
- HTTP request for CSS files now have an `Accept: text/css` header (@ElMassimo, #261)
|
7
|
+
- Added support for [Propshaft](https://github.com/rails/propshaft) (@Intrepidd, #277)
|
8
|
+
|
9
|
+
## v1.11.1
|
10
|
+
|
11
|
+
- Check if `Rails.application` is defined (@pabloh, #250)
|
12
|
+
|
13
|
+
## v1.11.0
|
14
|
+
|
15
|
+
- Remove `force_encoding!`
|
16
|
+
|
17
|
+
## v1.10.3
|
18
|
+
|
19
|
+
- Remove upper version constraint for actionmailer
|
20
|
+
|
21
|
+
## v1.10.2
|
22
|
+
|
23
|
+
- Explicitly check for assets_manifest (@derekwheel, #214)
|
24
|
+
|
25
|
+
## v1.10.1
|
26
|
+
|
27
|
+
- Catch error when sprockets can't find asset (@kirs, #209)
|
28
|
+
|
29
|
+
## v1.10.0
|
30
|
+
|
31
|
+
- Drop support for hpricot now that premailer-rails also doesn't support it
|
32
|
+
- Use `Rails.application.assets_manifest` instead of `Rails.application.assets` in Asset Pipeline loader (@kirs, #201)
|
33
|
+
- Introduce `:strategies` config option that allows to control CSS fetching stragies
|
34
|
+
|
35
|
+
## v1.9.7
|
36
|
+
|
37
|
+
- Use `Rails.root` in `FileSystemLoader` (@stanhu, #195)
|
38
|
+
|
39
|
+
## v1.9.6
|
40
|
+
|
41
|
+
- Handle `relative_url_root` in when loading CSS from file system
|
42
|
+
|
3
43
|
## v1.9.5
|
4
44
|
|
5
45
|
- Mention license in gemspec
|
data/Gemfile
CHANGED
@@ -1,20 +1,24 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
2
3
|
|
3
4
|
gemspec
|
4
5
|
|
5
|
-
|
6
|
+
rails_version = ENV.fetch('ACTION_MAILER_VERSION', '7')
|
6
7
|
|
7
|
-
if
|
8
|
-
|
9
|
-
|
8
|
+
if rails_version == 'head'
|
9
|
+
gem 'rails', github: 'rails/rails'
|
10
|
+
if ENV['PROPSHAFT'] == 'true'
|
11
|
+
gem 'propshaft', github: 'rails/propshaft'
|
12
|
+
else
|
13
|
+
gem 'sprockets-rails', github: 'rails/sprockets-rails'
|
10
14
|
end
|
11
15
|
else
|
12
|
-
gem '
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
gem 'rails', "~> #{rails_version}"
|
17
|
+
if ENV['PROPSHAFT'] == 'true'
|
18
|
+
gem 'propshaft'
|
19
|
+
else
|
20
|
+
gem 'sprockets-rails' if rails_version >= '7'
|
21
|
+
end
|
18
22
|
end
|
19
23
|
|
20
|
-
gem '
|
24
|
+
gem 'byebug'
|
data/README.md
CHANGED
@@ -4,9 +4,7 @@ CSS styled emails without the hassle.
|
|
4
4
|
|
5
5
|
[![Build Status][build-image]][build-link]
|
6
6
|
[![Gem Version][gem-image]][gem-link]
|
7
|
-
[![Dependency Status][deps-image]][deps-link]
|
8
7
|
[![Code Climate][gpa-image]][gpa-link]
|
9
|
-
[![Coverage Status][cov-image]][cov-link]
|
10
8
|
|
11
9
|
## Introduction
|
12
10
|
|
@@ -39,34 +37,34 @@ styled emails without having to set anything up.
|
|
39
37
|
Whenever premailer-rails processes an email, it collects the URLs of all linked
|
40
38
|
stylesheets (`<link rel="stylesheet" href="css_url">`). Then, for each of these
|
41
39
|
URLs, it tries to get the content through a couple of strategies. As long as
|
42
|
-
a strategy does not return anything, the next one is used. The strategies
|
43
|
-
|
40
|
+
a strategy does not return anything, the next one is used. The strategies
|
41
|
+
available are:
|
44
42
|
|
45
|
-
|
46
|
-
is returned. The cache right now is rather rudimentary. Whenever a CSS file
|
47
|
-
is retrieved, it is stored in memory such that subsequent requests to the
|
48
|
-
same file are faster. The caching is disabled inside Rails in the
|
49
|
-
development environment.
|
50
|
-
|
51
|
-
2. **File System:** If there's a file inside `public/` with the same path as in
|
43
|
+
- `:filesystem`: If there's a file inside `public/` with the same path as in
|
52
44
|
the URL, it is read from disk. E.g. if the URL is
|
53
45
|
`http://cdn.example.com/assets/email.css` the contents of the file located
|
54
46
|
at `public/assets/email.css` gets returned if it exists.
|
55
47
|
|
56
|
-
|
48
|
+
- `:asset_pipeline`: If Rails is available and the asset pipeline is enabled,
|
57
49
|
the file is retrieved through the asset pipeline. E.g. if the URL is
|
58
50
|
`http://cdn.example.com/assets/email-fingerprint123.css`, the file
|
59
51
|
`email.css` is requested from the asset pipeline. That is, the fingerprint
|
60
52
|
and the prefix (in this case `assets` is the prefix) are stripped before
|
61
53
|
requesting it from the asset pipeline.
|
62
54
|
|
63
|
-
|
64
|
-
body is used. This is
|
55
|
+
- `:network`: As a last resort, the URL is simply requested and the response
|
56
|
+
body is used. This is useful when the assets are not bundled in the
|
65
57
|
application and only available on a CDN. On Heroku e.g. you can add assets
|
66
58
|
to your `.slugignore` causing your assets to not be available to the app
|
67
59
|
(and thus resulting in a smaller app) and deploy the assets to a CDN such
|
68
60
|
as S3/CloudFront.
|
69
61
|
|
62
|
+
You can configure which strategies you want to use as well as specify their
|
63
|
+
order. Refer to the *Configuration* section for more on this.
|
64
|
+
|
65
|
+
Note that the retrieved CSS is cached when the gem is running with Rails in
|
66
|
+
production.
|
67
|
+
|
70
68
|
## Installation
|
71
69
|
|
72
70
|
Simply add the gem to your `Gemfile`:
|
@@ -75,19 +73,12 @@ Simply add the gem to your `Gemfile`:
|
|
75
73
|
gem 'premailer-rails'
|
76
74
|
```
|
77
75
|
|
78
|
-
premailer-rails
|
79
|
-
a
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
gem
|
84
|
-
# or
|
85
|
-
gem 'hpricot'
|
86
|
-
```
|
87
|
-
|
88
|
-
If both gems are loaded for some reason, premailer chooses hpricot.
|
89
|
-
|
90
|
-
That's it!
|
76
|
+
premailer-rails and premailer require a gem that is used to parse the email's
|
77
|
+
HTML. For a list of supported gems and how to select which one to use, please
|
78
|
+
refer to the [*Adapter*
|
79
|
+
section](https://github.com/premailer/premailer#adapters) of premailer. Note
|
80
|
+
that there is no hard dependency from either gem so you should add one yourself.
|
81
|
+
Also note that this gem is only tested with [nokogiri].
|
91
82
|
|
92
83
|
## Configuration
|
93
84
|
|
@@ -106,7 +97,8 @@ configs are:
|
|
106
97
|
```ruby
|
107
98
|
{
|
108
99
|
input_encoding: 'UTF-8',
|
109
|
-
generate_text_part: true
|
100
|
+
generate_text_part: true,
|
101
|
+
strategies: [:filesystem, :asset_pipeline, :network]
|
110
102
|
}
|
111
103
|
```
|
112
104
|
|
@@ -158,6 +150,14 @@ Premailer::Rails::Hook.perform(mail)
|
|
158
150
|
|
159
151
|
This will modify the email in place, useful e.g. in tests.
|
160
152
|
|
153
|
+
## Supported Rails Versions
|
154
|
+
|
155
|
+
This gem is tested on Rails versions 5 through 7.
|
156
|
+
|
157
|
+
For Rails 7, it support both the classical Sprockets asset pipeline as well as the new [Propshaft](https://github.com/rails/propshaft) gem.
|
158
|
+
|
159
|
+
If you're looking to integrate with Webpacker, check out [these instructions](https://github.com/fphilipe/premailer-rails/issues/232#issuecomment-839819705).
|
160
|
+
|
161
161
|
## Small Print
|
162
162
|
|
163
163
|
### Author
|
@@ -168,25 +168,20 @@ Philipe Fatio ([@fphilipe][fphilipe twitter])
|
|
168
168
|
|
169
169
|
premailer-rails is released under the MIT license. See the [license file].
|
170
170
|
|
171
|
-
[build-image]: https://
|
172
|
-
[build-link]: https://
|
171
|
+
[build-image]: https://github.com/fphilipe/premailer-rails/actions/workflows/test.yml/badge.svg
|
172
|
+
[build-link]: https://github.com/fphilipe/premailer-rails/actions/workflows/test.yml
|
173
173
|
[gem-image]: https://badge.fury.io/rb/premailer-rails.svg
|
174
174
|
[gem-link]: https://rubygems.org/gems/premailer-rails
|
175
|
-
[deps-image]: https://gemnasium.com/fphilipe/premailer-rails.svg
|
176
|
-
[deps-link]: https://gemnasium.com/fphilipe/premailer-rails
|
177
175
|
[gpa-image]: https://codeclimate.com/github/fphilipe/premailer-rails.svg
|
178
176
|
[gpa-link]: https://codeclimate.com/github/fphilipe/premailer-rails
|
179
|
-
[cov-image]: https://coveralls.io/repos/fphilipe/premailer-rails/badge.svg
|
180
|
-
[cov-link]: https://coveralls.io/r/fphilipe/premailer-rails
|
181
177
|
[tip-image]: https://rawgithub.com/twolfson/gittip-badge/0.1.0/dist/gittip.svg
|
182
178
|
[tip-link]: https://www.gittip.com/fphilipe/
|
183
179
|
|
184
180
|
[premailer]: https://github.com/premailer/premailer
|
185
|
-
[actionmailer]: https://github.com/rails/rails/tree/
|
181
|
+
[actionmailer]: https://github.com/rails/rails/tree/main/actionmailer
|
186
182
|
[nokogiri]: https://github.com/sparklemotion/nokogiri
|
187
|
-
[hpricot]: https://github.com/hpricot/hpricot
|
188
183
|
|
189
|
-
[premailer documentation]:
|
184
|
+
[premailer documentation]: https://www.rubydoc.info/gems/premailer/Premailer:initialize
|
190
185
|
|
191
186
|
[fphilipe twitter]: https://twitter.com/fphilipe
|
192
187
|
[license file]: LICENSE
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.12.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
3
|
|
4
|
-
|
4
|
+
require_relative 'config/application'
|
5
5
|
|
6
6
|
Rails.application.load_tasks
|
@@ -1,12 +1,15 @@
|
|
1
|
-
|
1
|
+
require_relative 'boot'
|
2
2
|
|
3
3
|
require 'action_controller/railtie'
|
4
4
|
require 'action_mailer/railtie'
|
5
5
|
require 'sprockets/railtie'
|
6
6
|
|
7
|
+
# Require the gems listed in Gemfile, including any gems
|
8
|
+
# you've limited to :test, :development, or :production.
|
7
9
|
Bundler.require(*Rails.groups)
|
8
10
|
|
9
11
|
module Example
|
10
12
|
class Application < Rails::Application
|
13
|
+
config.load_defaults 5.2
|
11
14
|
end
|
12
15
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*.log
|
16
|
+
/tmp
|
@@ -0,0 +1 @@
|
|
1
|
+
//= link email.css
|
@@ -0,0 +1,32 @@
|
|
1
|
+
body {
|
2
|
+
background: #efefef;
|
3
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
4
|
+
}
|
5
|
+
|
6
|
+
p {
|
7
|
+
line-height: 1.4;
|
8
|
+
}
|
9
|
+
|
10
|
+
.wrap {
|
11
|
+
max-width: 40em;
|
12
|
+
margin: 0 auto;
|
13
|
+
padding: 1em;
|
14
|
+
background: white;
|
15
|
+
}
|
16
|
+
|
17
|
+
.greeting {
|
18
|
+
text-align: center;
|
19
|
+
font-weight: bold;
|
20
|
+
font-size: 110%;
|
21
|
+
}
|
22
|
+
|
23
|
+
.footer {
|
24
|
+
font-size: 90%;
|
25
|
+
color: #666;
|
26
|
+
}
|
27
|
+
|
28
|
+
a {
|
29
|
+
color: green;
|
30
|
+
text-decoration: none;
|
31
|
+
border-bottom: 2px solid green;
|
32
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset='utf-8'>
|
5
|
+
<%= stylesheet_link_tag :email %>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
<div class='wrap'>
|
9
|
+
<p class='greeting'>Hi, John Doe</p>
|
10
|
+
<p>
|
11
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
12
|
+
</p>
|
13
|
+
<div class='footer'>
|
14
|
+
To unsubscribe, <a href='http://www.google.com/'>click here</a>.
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative 'boot'
|
2
|
+
|
3
|
+
require 'action_controller/railtie'
|
4
|
+
require 'action_mailer/railtie'
|
5
|
+
require 'sprockets/railtie'
|
6
|
+
|
7
|
+
# Require the gems listed in Gemfile, including any gems
|
8
|
+
# you've limited to :test, :development, or :production.
|
9
|
+
Bundler.require(*Rails.groups)
|
10
|
+
|
11
|
+
module Example
|
12
|
+
class Application < Rails::Application
|
13
|
+
config.load_defaults 6.1
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
config.cache_classes = false
|
3
|
+
config.eager_load = false
|
4
|
+
config.consider_all_requests_local = true
|
5
|
+
config.action_controller.perform_caching = false
|
6
|
+
config.assets.debug = true
|
7
|
+
config.assets.digest = true
|
8
|
+
config.assets.raise_runtime_errors = true
|
9
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
config.cache_classes = true
|
3
|
+
config.eager_load = true
|
4
|
+
config.consider_all_requests_local = false
|
5
|
+
config.action_controller.perform_caching = true
|
6
|
+
config.assets.compile = false
|
7
|
+
config.assets.digest = true
|
8
|
+
config.log_level = :info
|
9
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*.log
|
16
|
+
/tmp
|
@@ -0,0 +1,32 @@
|
|
1
|
+
body {
|
2
|
+
background: #efefef;
|
3
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
4
|
+
}
|
5
|
+
|
6
|
+
p {
|
7
|
+
line-height: 1.4;
|
8
|
+
}
|
9
|
+
|
10
|
+
.wrap {
|
11
|
+
max-width: 40em;
|
12
|
+
margin: 0 auto;
|
13
|
+
padding: 1em;
|
14
|
+
background: white;
|
15
|
+
}
|
16
|
+
|
17
|
+
.greeting {
|
18
|
+
text-align: center;
|
19
|
+
font-weight: bold;
|
20
|
+
font-size: 110%;
|
21
|
+
}
|
22
|
+
|
23
|
+
.footer {
|
24
|
+
font-size: 90%;
|
25
|
+
color: #666;
|
26
|
+
}
|
27
|
+
|
28
|
+
a {
|
29
|
+
color: green;
|
30
|
+
text-decoration: none;
|
31
|
+
border-bottom: 2px solid green;
|
32
|
+
}
|