premailer-rails 1.9.5 → 1.10.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +4 -0
  3. data/.travis.yml +2 -9
  4. data/CHANGELOG.md +26 -0
  5. data/Gemfile +8 -4
  6. data/README.md +21 -28
  7. data/VERSION +1 -1
  8. data/lib/premailer/rails/css_helper.rb +29 -10
  9. data/lib/premailer/rails/css_loaders/asset_pipeline_loader.rb +11 -11
  10. data/lib/premailer/rails/css_loaders/file_system_loader.rb +24 -2
  11. data/lib/premailer/rails/css_loaders/network_loader.rb +1 -1
  12. data/lib/premailer/rails/css_loaders.rb +0 -1
  13. data/lib/premailer/rails/customized_premailer.rb +4 -4
  14. data/lib/premailer/rails.rb +2 -1
  15. data/premailer-rails.gemspec +1 -2
  16. data/spec/integration/css_helper_spec.rb +170 -139
  17. data/spec/integration/delivery_spec.rb +13 -0
  18. data/spec/integration/hook_spec.rb +1 -1
  19. data/spec/rails_app/app/assets/config/manifest.js +3 -0
  20. data/spec/rails_app/app/assets/stylesheets/application.css +3 -0
  21. data/spec/rails_app/app/mailers/application_mailer.rb +4 -0
  22. data/spec/rails_app/app/mailers/welcome_mailer.rb +6 -0
  23. data/spec/rails_app/app/views/layouts/mailer.html.erb +11 -0
  24. data/spec/rails_app/app/views/welcome_mailer/welcome_email.html.erb +1 -0
  25. data/spec/rails_app/config/application.rb +13 -0
  26. data/spec/rails_app/config/boot.rb +5 -0
  27. data/spec/rails_app/config/environment.rb +2 -0
  28. data/spec/rails_app/config/environments/test.rb +10 -0
  29. data/spec/rails_app/config/initializers/assets.rb +1 -0
  30. data/spec/rails_app/config/routes.rb +3 -0
  31. data/spec/rails_app/config.ru +5 -0
  32. data/spec/spec_helper.rb +3 -4
  33. data/spec/unit/css_loaders/file_system_loader_spec.rb +37 -0
  34. data/spec/unit/css_loaders/network_loader_spec.rb +1 -1
  35. data/spec/unit/customized_premailer_spec.rb +32 -40
  36. metadata +33 -32
  37. data/lib/premailer/rails/css_loaders/cache_loader.rb +0 -29
  38. data/spec/integration/hook_registration_spec.rb +0 -11
  39. data/spec/support/stubs/action_mailer.rb +0 -5
  40. 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.9.5
4
+ version: 1.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipe Fatio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-07 00:00:00.000000000 Z
11
+ date: 2019-07-17 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: '6'
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
@@ -47,9 +44,6 @@ dependencies:
47
44
  - - ">="
48
45
  - !ruby/object:Gem::Version
49
46
  version: '3'
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: '6'
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: rspec
55
49
  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
@@ -149,7 +129,6 @@ files:
149
129
  - lib/premailer/rails/css_helper.rb
150
130
  - lib/premailer/rails/css_loaders.rb
151
131
  - lib/premailer/rails/css_loaders/asset_pipeline_loader.rb
152
- - lib/premailer/rails/css_loaders/cache_loader.rb
153
132
  - lib/premailer/rails/css_loaders/file_system_loader.rb
154
133
  - lib/premailer/rails/css_loaders/network_loader.rb
155
134
  - lib/premailer/rails/customized_premailer.rb
@@ -158,14 +137,26 @@ files:
158
137
  - lib/premailer/rails/version.rb
159
138
  - premailer-rails.gemspec
160
139
  - spec/integration/css_helper_spec.rb
161
- - spec/integration/hook_registration_spec.rb
140
+ - spec/integration/delivery_spec.rb
162
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
163
155
  - spec/spec_helper.rb
164
156
  - spec/support/fixtures/html.rb
165
157
  - spec/support/fixtures/message.rb
166
- - spec/support/stubs/action_mailer.rb
167
- - spec/support/stubs/rails.rb
168
158
  - spec/unit/css_loaders/asset_pipeline_loader_spec.rb
159
+ - spec/unit/css_loaders/file_system_loader_spec.rb
169
160
  - spec/unit/css_loaders/network_loader_spec.rb
170
161
  - spec/unit/customized_premailer_spec.rb
171
162
  - spec/unit/premailer_rails_spec.rb
@@ -188,8 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
179
  - !ruby/object:Gem::Version
189
180
  version: '0'
190
181
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.5.2
182
+ rubygems_version: 3.0.3
193
183
  signing_key:
194
184
  specification_version: 4
195
185
  summary: Easily create styled HTML emails in Rails.
@@ -212,15 +202,26 @@ test_files:
212
202
  - example/config/secrets.yml
213
203
  - example/test/mailers/previews/example_mailer_preview.rb
214
204
  - spec/integration/css_helper_spec.rb
215
- - spec/integration/hook_registration_spec.rb
205
+ - spec/integration/delivery_spec.rb
216
206
  - spec/integration/hook_spec.rb
207
+ - spec/rails_app/app/assets/config/manifest.js
208
+ - spec/rails_app/app/assets/stylesheets/application.css
209
+ - spec/rails_app/app/mailers/application_mailer.rb
210
+ - spec/rails_app/app/mailers/welcome_mailer.rb
211
+ - spec/rails_app/app/views/layouts/mailer.html.erb
212
+ - spec/rails_app/app/views/welcome_mailer/welcome_email.html.erb
213
+ - spec/rails_app/config.ru
214
+ - spec/rails_app/config/application.rb
215
+ - spec/rails_app/config/boot.rb
216
+ - spec/rails_app/config/environment.rb
217
+ - spec/rails_app/config/environments/test.rb
218
+ - spec/rails_app/config/initializers/assets.rb
219
+ - spec/rails_app/config/routes.rb
217
220
  - spec/spec_helper.rb
218
221
  - spec/support/fixtures/html.rb
219
222
  - spec/support/fixtures/message.rb
220
- - spec/support/stubs/action_mailer.rb
221
- - spec/support/stubs/rails.rb
222
223
  - spec/unit/css_loaders/asset_pipeline_loader_spec.rb
224
+ - spec/unit/css_loaders/file_system_loader_spec.rb
223
225
  - spec/unit/css_loaders/network_loader_spec.rb
224
226
  - spec/unit/customized_premailer_spec.rb
225
227
  - spec/unit/premailer_rails_spec.rb
226
- has_rdoc:
@@ -1,29 +0,0 @@
1
- class Premailer
2
- module Rails
3
- module CSSLoaders
4
- module CacheLoader
5
- extend self
6
-
7
- @cache = {}
8
-
9
- def load(url)
10
- @cache[url] unless development_env?
11
- end
12
-
13
- def store(url, content)
14
- @cache[url] ||= content unless development_env?
15
- end
16
-
17
- def clear!
18
- @cache = {}
19
- end
20
-
21
- def development_env?
22
- defined?(::Rails) &&
23
- ::Rails.respond_to?(:env) &&
24
- ::Rails.env.development?
25
- end
26
- end
27
- end
28
- end
29
- 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