premailer-rails 1.8.0 → 1.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +4 -0
  3. data/.travis.yml +10 -15
  4. data/CHANGELOG.md +74 -0
  5. data/Gemfile +10 -4
  6. data/README.md +49 -39
  7. data/VERSION +1 -1
  8. data/example/Gemfile +1 -3
  9. data/example/bin/rails +4 -0
  10. data/example/config.ru +1 -1
  11. data/example/config/application.rb +1 -0
  12. data/example/config/boot.rb +1 -2
  13. data/example/config/environments/development.rb +4 -0
  14. data/example/config/environments/production.rb +9 -0
  15. data/example/config/initializers/assets.rb +2 -0
  16. data/lib/premailer/rails.rb +4 -2
  17. data/lib/premailer/rails/css_helper.rb +45 -16
  18. data/lib/premailer/rails/css_loaders.rb +0 -1
  19. data/lib/premailer/rails/css_loaders/asset_pipeline_loader.rb +19 -10
  20. data/lib/premailer/rails/css_loaders/file_system_loader.rb +24 -2
  21. data/lib/premailer/rails/css_loaders/network_loader.rb +15 -8
  22. data/lib/premailer/rails/customized_premailer.rb +6 -6
  23. data/lib/premailer/rails/hook.rb +16 -8
  24. data/premailer-rails.gemspec +4 -4
  25. data/spec/integration/css_helper_spec.rb +92 -42
  26. data/spec/integration/delivery_spec.rb +13 -0
  27. data/spec/integration/hook_spec.rb +53 -1
  28. data/spec/rails_app/app/assets/config/manifest.js +3 -0
  29. data/spec/rails_app/app/assets/stylesheets/application.css +3 -0
  30. data/spec/rails_app/app/mailers/application_mailer.rb +4 -0
  31. data/spec/rails_app/app/mailers/welcome_mailer.rb +6 -0
  32. data/spec/rails_app/app/views/layouts/mailer.html.erb +11 -0
  33. data/spec/rails_app/app/views/welcome_mailer/welcome_email.html.erb +1 -0
  34. data/spec/rails_app/config.ru +5 -0
  35. data/spec/rails_app/config/application.rb +13 -0
  36. data/spec/rails_app/config/boot.rb +5 -0
  37. data/spec/rails_app/config/environment.rb +2 -0
  38. data/spec/rails_app/config/environments/test.rb +10 -0
  39. data/spec/rails_app/config/initializers/assets.rb +1 -0
  40. data/spec/rails_app/config/routes.rb +3 -0
  41. data/spec/spec_helper.rb +3 -4
  42. data/spec/support/fixtures/html.rb +8 -4
  43. data/spec/support/fixtures/message.rb +56 -0
  44. data/spec/unit/css_loaders/asset_pipeline_loader_spec.rb +19 -4
  45. data/spec/unit/css_loaders/file_system_loader_spec.rb +37 -0
  46. data/spec/unit/css_loaders/network_loader_spec.rb +58 -0
  47. data/spec/unit/customized_premailer_spec.rb +32 -40
  48. metadata +63 -34
  49. data/lib/premailer/rails/css_loaders/cache_loader.rb +0 -19
  50. data/spec/integration/hook_registration_spec.rb +0 -11
  51. data/spec/support/stubs/action_mailer.rb +0 -5
  52. data/spec/support/stubs/rails.rb +0 -51
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: premailer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipe Fatio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-31 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: premailer
@@ -37,9 +37,6 @@ dependencies:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '3'
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '5'
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
@@ -47,23 +44,20 @@ dependencies:
47
44
  - - ">="
48
45
  - !ruby/object:Gem::Version
49
46
  version: '3'
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: '5'
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: rspec
55
49
  requirement: !ruby/object:Gem::Requirement
56
50
  requirements:
57
51
  - - "~>"
58
52
  - !ruby/object:Gem::Version
59
- version: 3.0.0
53
+ version: '3.3'
60
54
  type: :development
61
55
  prerelease: false
62
56
  version_requirements: !ruby/object:Gem::Requirement
63
57
  requirements:
64
58
  - - "~>"
65
59
  - !ruby/object:Gem::Version
66
- version: 3.0.0
60
+ version: '3.3'
67
61
  - !ruby/object:Gem::Dependency
68
62
  name: nokogiri
69
63
  requirement: !ruby/object:Gem::Requirement
@@ -78,20 +72,6 @@ dependencies:
78
72
  - - ">="
79
73
  - !ruby/object:Gem::Version
80
74
  version: '0'
81
- - !ruby/object:Gem::Dependency
82
- name: hpricot
83
- requirement: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- version: '0'
88
- type: :development
89
- prerelease: false
90
- version_requirements: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
75
  - !ruby/object:Gem::Dependency
96
76
  name: coveralls
97
77
  requirement: !ruby/object:Gem::Requirement
@@ -134,11 +114,14 @@ files:
134
114
  - example/app/assets/stylesheets/email.css
135
115
  - example/app/mailers/example_mailer.rb
136
116
  - example/app/views/example_mailer/test_message.html.erb
117
+ - example/bin/rails
137
118
  - example/config.ru
138
119
  - example/config/application.rb
139
120
  - example/config/boot.rb
140
121
  - example/config/environment.rb
141
122
  - example/config/environments/development.rb
123
+ - example/config/environments/production.rb
124
+ - example/config/initializers/assets.rb
142
125
  - example/config/routes.rb
143
126
  - example/config/secrets.yml
144
127
  - example/test/mailers/previews/example_mailer_preview.rb
@@ -146,7 +129,6 @@ files:
146
129
  - lib/premailer/rails/css_helper.rb
147
130
  - lib/premailer/rails/css_loaders.rb
148
131
  - lib/premailer/rails/css_loaders/asset_pipeline_loader.rb
149
- - lib/premailer/rails/css_loaders/cache_loader.rb
150
132
  - lib/premailer/rails/css_loaders/file_system_loader.rb
151
133
  - lib/premailer/rails/css_loaders/network_loader.rb
152
134
  - lib/premailer/rails/customized_premailer.rb
@@ -155,18 +137,34 @@ files:
155
137
  - lib/premailer/rails/version.rb
156
138
  - premailer-rails.gemspec
157
139
  - spec/integration/css_helper_spec.rb
158
- - spec/integration/hook_registration_spec.rb
140
+ - spec/integration/delivery_spec.rb
159
141
  - spec/integration/hook_spec.rb
142
+ - spec/rails_app/app/assets/config/manifest.js
143
+ - spec/rails_app/app/assets/stylesheets/application.css
144
+ - spec/rails_app/app/mailers/application_mailer.rb
145
+ - spec/rails_app/app/mailers/welcome_mailer.rb
146
+ - spec/rails_app/app/views/layouts/mailer.html.erb
147
+ - spec/rails_app/app/views/welcome_mailer/welcome_email.html.erb
148
+ - spec/rails_app/config.ru
149
+ - spec/rails_app/config/application.rb
150
+ - spec/rails_app/config/boot.rb
151
+ - spec/rails_app/config/environment.rb
152
+ - spec/rails_app/config/environments/test.rb
153
+ - spec/rails_app/config/initializers/assets.rb
154
+ - spec/rails_app/config/routes.rb
155
+ - spec/rails_app/log/.keep
156
+ - spec/rails_app/tmp/.keep
160
157
  - spec/spec_helper.rb
161
158
  - spec/support/fixtures/html.rb
162
159
  - spec/support/fixtures/message.rb
163
- - spec/support/stubs/action_mailer.rb
164
- - spec/support/stubs/rails.rb
165
160
  - spec/unit/css_loaders/asset_pipeline_loader_spec.rb
161
+ - spec/unit/css_loaders/file_system_loader_spec.rb
162
+ - spec/unit/css_loaders/network_loader_spec.rb
166
163
  - spec/unit/customized_premailer_spec.rb
167
164
  - spec/unit/premailer_rails_spec.rb
168
165
  homepage: https://github.com/fphilipe/premailer-rails
169
- licenses: []
166
+ licenses:
167
+ - MIT
170
168
  metadata: {}
171
169
  post_install_message:
172
170
  rdoc_options: []
@@ -183,20 +181,51 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
181
  - !ruby/object:Gem::Version
184
182
  version: '0'
185
183
  requirements: []
186
- rubyforge_project:
187
- rubygems_version: 2.2.2
184
+ rubygems_version: 3.1.2
188
185
  signing_key:
189
186
  specification_version: 4
190
187
  summary: Easily create styled HTML emails in Rails.
191
188
  test_files:
189
+ - example/Gemfile
190
+ - example/README.md
191
+ - example/Rakefile
192
+ - example/app/assets/stylesheets/email.css
193
+ - example/app/mailers/example_mailer.rb
194
+ - example/app/views/example_mailer/test_message.html.erb
195
+ - example/bin/rails
196
+ - example/config.ru
197
+ - example/config/application.rb
198
+ - example/config/boot.rb
199
+ - example/config/environment.rb
200
+ - example/config/environments/development.rb
201
+ - example/config/environments/production.rb
202
+ - example/config/initializers/assets.rb
203
+ - example/config/routes.rb
204
+ - example/config/secrets.yml
205
+ - example/test/mailers/previews/example_mailer_preview.rb
192
206
  - spec/integration/css_helper_spec.rb
193
- - spec/integration/hook_registration_spec.rb
207
+ - spec/integration/delivery_spec.rb
194
208
  - spec/integration/hook_spec.rb
209
+ - spec/rails_app/app/assets/config/manifest.js
210
+ - spec/rails_app/app/assets/stylesheets/application.css
211
+ - spec/rails_app/app/mailers/application_mailer.rb
212
+ - spec/rails_app/app/mailers/welcome_mailer.rb
213
+ - spec/rails_app/app/views/layouts/mailer.html.erb
214
+ - spec/rails_app/app/views/welcome_mailer/welcome_email.html.erb
215
+ - spec/rails_app/config.ru
216
+ - spec/rails_app/config/application.rb
217
+ - spec/rails_app/config/boot.rb
218
+ - spec/rails_app/config/environment.rb
219
+ - spec/rails_app/config/environments/test.rb
220
+ - spec/rails_app/config/initializers/assets.rb
221
+ - spec/rails_app/config/routes.rb
222
+ - spec/rails_app/log/.keep
223
+ - spec/rails_app/tmp/.keep
195
224
  - spec/spec_helper.rb
196
225
  - spec/support/fixtures/html.rb
197
226
  - spec/support/fixtures/message.rb
198
- - spec/support/stubs/action_mailer.rb
199
- - spec/support/stubs/rails.rb
200
227
  - spec/unit/css_loaders/asset_pipeline_loader_spec.rb
228
+ - spec/unit/css_loaders/file_system_loader_spec.rb
229
+ - spec/unit/css_loaders/network_loader_spec.rb
201
230
  - spec/unit/customized_premailer_spec.rb
202
231
  - spec/unit/premailer_rails_spec.rb
@@ -1,19 +0,0 @@
1
- class Premailer
2
- module Rails
3
- module CSSLoaders
4
- module CacheLoader
5
- extend self
6
-
7
- def load(url)
8
- unless development_env?
9
- CSSHelper.cache[url]
10
- end
11
- end
12
-
13
- def development_env?
14
- defined?(::Rails) and ::Rails.env.development?
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,11 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'ActionMailer::Base.register_interceptor' do
4
- it 'registers interceptors' do
5
- expect(ActionMailer::Base).to \
6
- receive(:register_interceptor).with(Premailer::Rails::Hook)
7
- expect(ActionMailer::Base).to \
8
- receive(:register_preview_interceptor).with(Premailer::Rails::Hook)
9
- load 'premailer/rails.rb'
10
- end
11
- end
@@ -1,5 +0,0 @@
1
- module ActionMailer
2
- class Base
3
- def self.register_interceptor(x); end
4
- end
5
- end
@@ -1,51 +0,0 @@
1
- module Rails
2
- extend self
3
-
4
- module Configuration
5
- extend self
6
- end
7
-
8
- module Env
9
- extend self
10
-
11
- def development?
12
- false
13
- end
14
- end
15
-
16
- module Application
17
- extend self
18
-
19
- module Assets
20
- extend self
21
- end
22
-
23
- def assets
24
- Assets
25
- end
26
- end
27
-
28
- class Railtie
29
- class Configuration
30
- def after_initialize
31
- yield
32
- end
33
- end
34
-
35
- def self.config
36
- Configuration.new
37
- end
38
- end
39
-
40
- def env
41
- Env
42
- end
43
-
44
- def configuration
45
- Configuration
46
- end
47
-
48
- def application
49
- Application
50
- end
51
- end