roadie 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +25 -21
- data/Changelog.md +195 -184
- data/lib/roadie/errors.rb +4 -2
- data/lib/roadie/selector.rb +1 -0
- data/lib/roadie/version.rb +1 -1
- data/roadie.gemspec +1 -0
- data/spec/integration_spec.rb +23 -0
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf21805d618315993a32ce718e78c756c82627d3139c5ad9823e539d183c244f
|
|
4
|
+
data.tar.gz: 2d440a7a8f27d4ab08b4f5795222b329863816f4c55c593b217488ef0b97b5b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2c411ae8897ebbcf2e57dea6c1dd265c8d4c6e5ed43ca9dc20b085cb3cac084e7e92189ae2f621609a406621e7ebea4676d13d6ef38dde88394bd004a57d836e
|
|
7
|
+
data.tar.gz: cedc2284f27ab48522989550440235af8c39c86ff4d6f437d722b971d4356f36db674a116c3427d71374a7075d358bb478c759f5178125e6ae53e0c38072892a
|
data/.github/workflows/main.yml
CHANGED
|
@@ -11,15 +11,19 @@ on:
|
|
|
11
11
|
jobs:
|
|
12
12
|
base:
|
|
13
13
|
name: Ruby ${{ matrix.ruby }}
|
|
14
|
-
runs-on: ubuntu-
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
15
|
strategy:
|
|
16
16
|
fail-fast: false
|
|
17
17
|
matrix:
|
|
18
|
-
ruby:
|
|
18
|
+
ruby:
|
|
19
|
+
- "2.7"
|
|
20
|
+
- "3.0"
|
|
21
|
+
- "3.1"
|
|
22
|
+
- "3.2"
|
|
19
23
|
|
|
20
24
|
steps:
|
|
21
25
|
- name: Checkout code
|
|
22
|
-
uses: actions/checkout@
|
|
26
|
+
uses: actions/checkout@v4
|
|
23
27
|
|
|
24
28
|
# This setup is not compatible with the way Travis CI was
|
|
25
29
|
# setup, so the cache will only work for the root folder.
|
|
@@ -32,21 +36,21 @@ jobs:
|
|
|
32
36
|
- name: Rake
|
|
33
37
|
run: bundle exec rake
|
|
34
38
|
|
|
35
|
-
- uses: codecov/codecov-action@
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
- uses: codecov/codecov-action@v3
|
|
40
|
+
|
|
41
|
+
lint:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- name: Checkout code
|
|
45
|
+
uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
# This setup is not compatible with the way Travis CI was
|
|
48
|
+
# setup, so the cache will only work for the root folder.
|
|
49
|
+
- name: Setup Ruby
|
|
50
|
+
uses: ruby/setup-ruby@v1
|
|
51
|
+
with:
|
|
52
|
+
ruby-version: "3.2"
|
|
53
|
+
bundler-cache: true
|
|
54
|
+
|
|
55
|
+
- name: standardrb
|
|
56
|
+
run: bundle exec standardrb
|
data/Changelog.md
CHANGED
|
@@ -1,27 +1,35 @@
|
|
|
1
1
|
### dev
|
|
2
2
|
|
|
3
|
-
[full changelog](https://github.com/Mange/roadie/compare/v5.2.
|
|
3
|
+
[full changelog](https://github.com/Mange/roadie/compare/v5.2.1...master)
|
|
4
|
+
|
|
5
|
+
Nothing yet.
|
|
6
|
+
|
|
7
|
+
### dev
|
|
8
|
+
|
|
9
|
+
[full changelog](https://github.com/Mange/roadie/compare/v5.2.0...v5.2.1)
|
|
10
|
+
|
|
11
|
+
- Don't strip the [`:root` pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:root) - [Asger Behncke Jacobsen](https://github.com/asgerb) (#173)
|
|
4
12
|
|
|
5
13
|
### 5.2.0
|
|
6
14
|
|
|
7
15
|
[full changelog](https://github.com/Mange/roadie/compare/v5.1.0...v5.2.0)
|
|
8
16
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
17
|
+
- Upgrade to Nokogiri `~>` 1.15.
|
|
18
|
+
- Drop support for Ruby 2.6.
|
|
19
|
+
- Add official support for Ruby 3.2.
|
|
12
20
|
|
|
13
21
|
### 5.1.0
|
|
14
22
|
|
|
15
23
|
[full changelog](https://github.com/Mange/roadie/compare/v5.0.1...v5.1.0)
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
- Support passing serialization options to Nokogiri with `serialization_options=` method -
|
|
18
26
|
[Dmytro Savochkin](https://github.com/dmytro-savochkin). (#171)
|
|
19
27
|
|
|
20
28
|
### 5.0.1
|
|
21
29
|
|
|
22
30
|
[full changelog](https://github.com/Mange/roadie/compare/v5.0.0...v5.0.1)
|
|
23
31
|
|
|
24
|
-
|
|
32
|
+
- Don't try to inline [the `:host`
|
|
25
33
|
pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:host) -
|
|
26
34
|
[viamin (Bart Agapinan)](https://github.com/viamin). (#170)
|
|
27
35
|
|
|
@@ -29,28 +37,28 @@
|
|
|
29
37
|
|
|
30
38
|
[full changelog](https://github.com/Mange/roadie/compare/v4.0.0...v5.0.0)
|
|
31
39
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
- Drop support for Ruby 2.4 and Ruby 2.5
|
|
41
|
+
- Drop support for JRuby and Rubinius
|
|
42
|
+
- Test with Ruby 2.7 - [aried3r (Anton Rieder)](https://github.com/aried3r) (#167)
|
|
43
|
+
- Test with Ruby 3.0 and Ruby 3.1
|
|
44
|
+
- Add standardrb as code formatter
|
|
45
|
+
- Drop support for callbacks that accepts only a single argument.
|
|
46
|
+
- Change signature of `Roadie::CssNotFound` and `Roadie::ProvidersFailed`.
|
|
39
47
|
|
|
40
48
|
### 4.0.0
|
|
41
49
|
|
|
42
50
|
[full changelog](https://github.com/Mange/roadie/compare/v3.5.1...v4.0.0)
|
|
43
51
|
|
|
44
|
-
|
|
52
|
+
- Drop support for Ruby 2.1, 2.2, and 2.3 and
|
|
45
53
|
add support for frozen string literals and Ruby 2.6 - [adamkiczula (Adam
|
|
46
54
|
Kiczula)](https://github.com/adamkiczula) (#164)
|
|
47
|
-
|
|
55
|
+
- `Roadie::Stylesheet#each_inlinable_block` is now removed.
|
|
48
56
|
|
|
49
57
|
### 3.5.1
|
|
50
58
|
|
|
51
59
|
[full changelog](https://github.com/Mange/roadie/compare/v3.5.0...v3.5.1)
|
|
52
60
|
|
|
53
|
-
|
|
61
|
+
- Gracefully handle empty string email body, such as those provided by
|
|
54
62
|
`ActionMailer::Base::NullMail` objects - [adamkiczula (Adam
|
|
55
63
|
Kiczula)](https://github.com/adamkiczula) (#163).
|
|
56
64
|
|
|
@@ -58,14 +66,15 @@
|
|
|
58
66
|
|
|
59
67
|
[full changelog](https://github.com/Mange/roadie/compare/v3.4.0...v3.5.0)
|
|
60
68
|
|
|
61
|
-
|
|
69
|
+
- Drop support for Nokogiri before 1.8.
|
|
62
70
|
|
|
63
71
|
### 3.4.0
|
|
64
72
|
|
|
65
73
|
[full changelog](https://github.com/Mange/roadie/compare/v3.3.0...v3.4.0)
|
|
66
74
|
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
- Enhancements
|
|
76
|
+
|
|
77
|
+
- Better support for media queries - [BroiSatse (Stanislaw
|
|
69
78
|
Klajn)](https://github.com/BroiSatse) and [jeznag (Jeremy
|
|
70
79
|
Nagel)](https://github.com/jeznag) (#157).
|
|
71
80
|
|
|
@@ -75,7 +84,7 @@
|
|
|
75
84
|
might change specificity), but this behavior can be disabled by setting
|
|
76
85
|
`merge_media_queries` to `false`.
|
|
77
86
|
|
|
78
|
-
|
|
87
|
+
- Remove Guard as a development dependency. Tests run fast anyway, and I
|
|
79
88
|
never liked that this tool "infected" the dependencies of the project when
|
|
80
89
|
it should remain a user-specific tool unless the project wants to enforce
|
|
81
90
|
it.
|
|
@@ -84,138 +93,140 @@
|
|
|
84
93
|
|
|
85
94
|
[full changelog](https://github.com/Mange/roadie/compare/v3.2.2...v3.3.0)
|
|
86
95
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
- Enhancements
|
|
97
|
+
- Allow transforming to XHTML instead of HTML - [Zhivko Draganov](https://github.com/zdraganov) (#144).
|
|
98
|
+
- Support partial HTML documents (fragments) - #147
|
|
99
|
+
- With the help of [andfx](https://github.com/andfx) - #115
|
|
100
|
+
- With the help of [Frida Sjoholm](https://github.com/FridaSjoholm) - #146
|
|
101
|
+
- Skip URL rewriting on elements with `data-roadie-ignore` - #154.
|
|
102
|
+
- With the help of [Hamed Asghari](https://github.com/hasghari) - #138.
|
|
103
|
+
- Bug fixes:
|
|
104
|
+
- Apply correct string encoding / charset in `NetHttpProvider` - [Jeremy Nagel](https://github.com/jeznag) (#152).
|
|
96
105
|
|
|
97
106
|
### 3.2.2
|
|
98
107
|
|
|
99
108
|
[full changelog](https://github.com/Mange/roadie/compare/v3.2.1...v3.2.2)
|
|
100
109
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
- Enhancements
|
|
111
|
+
- Support Nokogiri 1.x.
|
|
112
|
+
- Support `css_parser` 1.x.
|
|
113
|
+
- Make tests pass on Ruby 2.4.0 (upgrade Webmock).
|
|
105
114
|
|
|
106
115
|
### 3.2.1
|
|
107
116
|
|
|
108
117
|
[full changelog](https://github.com/Mange/roadie/compare/v3.2.0...v3.2.1)
|
|
109
118
|
|
|
110
|
-
|
|
111
|
-
|
|
119
|
+
- Enhancements
|
|
120
|
+
- Support Nokogiri 1.7.x.
|
|
112
121
|
|
|
113
122
|
### 3.2.0
|
|
114
123
|
|
|
115
124
|
[full changelog](https://github.com/Mange/roadie/compare/v3.1.1...v3.2.0)
|
|
116
125
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
- Deprecations:
|
|
127
|
+
- Dropped support for MRI 1.9.3.
|
|
128
|
+
- Dropped support for MRI 2.0.
|
|
129
|
+
- Upgrades:
|
|
130
|
+
- Use `css_parser` 1.4.x instead of 1.3.x.
|
|
131
|
+
- Bug fixes:
|
|
132
|
+
- Strip UTF-8 BOM (Byte Order Mark) from stylesheets before parsing / concatenating - [Bartłomiej Wójtowicz](https://github.com/qbart) (#128)
|
|
133
|
+
- Enhancements:
|
|
134
|
+
- Build against Ruby MRI 2.3.0 too.
|
|
135
|
+
- Don't add extra whitespace between table cells.
|
|
127
136
|
|
|
128
137
|
### 3.1.1
|
|
129
138
|
|
|
130
139
|
[full changelog](https://github.com/Mange/roadie/compare/v3.1.0...v3.1.1)
|
|
131
140
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
141
|
+
- Enhancements:
|
|
142
|
+
- Duplicate style properties are now removed when inlining.
|
|
143
|
+
- This means that `color: green; color: red; color: green` will now be `color: red; color: green`.
|
|
144
|
+
- The size of your emails should be the same, or smaller.
|
|
136
145
|
|
|
137
146
|
### 3.1.0
|
|
138
147
|
|
|
139
148
|
[full changelog](https://github.com/Mange/roadie/compare/v3.1.0.rc1...v3.1.0)
|
|
140
149
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
150
|
+
- Enchancements:
|
|
151
|
+
- `NetHttpProvider` validates the whitelist hostnames; passing an invalid hostname will raise `ArgumentError`.
|
|
152
|
+
- `NetHttpProvider` supports scheme-less URLs (`//foo.com/`), defaulting to `https`.
|
|
144
153
|
|
|
145
154
|
### 3.1.0.rc1
|
|
146
155
|
|
|
147
156
|
[full changelog](https://github.com/Mange/roadie/compare/v3.0.5...v3.1.0.rc1)
|
|
148
157
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
- Enhancements:
|
|
159
|
+
- Allow user to specify asset providers for referenced assets with full URLs and inline them (#107)
|
|
160
|
+
- Pass `Document` instance to transformation callbacks (#86)
|
|
161
|
+
- Made `nokogiri` dependency more forgiving.
|
|
162
|
+
- Supports `1.5.0`...`1.7.0` now instead of `1.6.0`...`1.7.0`. Some people out there are stuck on this older version of Nokogiri, and I don't want to leave them out.
|
|
163
|
+
- Output better errors when no assets can be found.
|
|
164
|
+
- The error will now show which providers were tried and in which order, along with the error message from the specific providers.
|
|
165
|
+
- `Roadie::FilesystemProvider` shows the given path when inspected.
|
|
166
|
+
- `data-roadie-ignore` attributes will now be removed from markup; hiding "development markers" in the final email.
|
|
167
|
+
- Add a `Roadie::CachedProvider` asset provider that wraps other providers and cache them.
|
|
168
|
+
- Add a `Roadie::PathRewriterProvider` asset provider that rewrites asset names for other providers.
|
|
169
|
+
- This saves you from having to create custom providers if you require small tweaks to the lookup in order to use an official provider.
|
|
170
|
+
- **Deprecations:**
|
|
171
|
+
- `Roadie::Stylesheet#each_inlinable_block` is now deprecated. You can iterate and filter the `blocks` at your own discresion.
|
|
163
172
|
|
|
164
173
|
### 3.0.5
|
|
165
174
|
|
|
166
175
|
[full changelog](https://github.com/Mange/roadie/compare/v3.0.4...v3.0.5)
|
|
167
176
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
177
|
+
- Bug fixes:
|
|
178
|
+
- Don't try to inline external stylesheets. (#106)
|
|
179
|
+
- Don't generate absolute URLs for anchor links. (Mange/roadie-rails#40)
|
|
171
180
|
|
|
172
181
|
### 3.0.4
|
|
173
182
|
|
|
174
183
|
[full changelog](https://github.com/Mange/roadie/compare/v3.0.3...v3.0.4)
|
|
175
184
|
|
|
176
|
-
|
|
177
|
-
|
|
185
|
+
- Bug fixes:
|
|
186
|
+
- Schemeless URLs was accepted as-is, which isn't supported in a lot of email clients. (#104)
|
|
178
187
|
|
|
179
188
|
### 3.0.3
|
|
180
189
|
|
|
181
190
|
[full changelog](https://github.com/Mange/roadie/compare/v3.0.2...v3.0.3)
|
|
182
191
|
|
|
183
|
-
|
|
184
|
-
|
|
192
|
+
- Bug fixes:
|
|
193
|
+
- CSS was mutated when parsed, breaking caches and memoized sources - [Brendan Mulholland (bmulholland)](https://github.com/bmulholland) (Mange/roadie-rails#32)
|
|
185
194
|
|
|
186
195
|
### 3.0.2
|
|
187
196
|
|
|
188
197
|
[full changelog](https://github.com/Mange/roadie/compare/v3.0.1...v3.0.2)
|
|
189
198
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
- Bug fixes:
|
|
200
|
+
- Some `data:` URLs could cause exceptions. (#97)
|
|
201
|
+
- Correctly parse properties with semicolons in their values - [Aidan Feldman (afeld)](https://github.com/afeld) (#100)
|
|
193
202
|
|
|
194
203
|
### 3.0.1
|
|
195
204
|
|
|
196
205
|
[full changelog](https://github.com/Mange/roadie/compare/v3.0.0...v3.0.1)
|
|
197
206
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
207
|
+
- Enhancements:
|
|
208
|
+
- `CssNotFound` can take a provider which will be shown in error messages.
|
|
209
|
+
- Bug fixes:
|
|
210
|
+
- URL rewriter no longer raises on absolute URLs that cannot be parsed by `URI`. Absolute URLs are completely ignored.
|
|
211
|
+
- URL rewriter supports urls without a scheme (like `//assets.myapp.com/foo`).
|
|
212
|
+
- URL rewriter no longer crashes on absolute URLs without a path (like `myapp://`).
|
|
204
213
|
|
|
205
214
|
### 3.0.0
|
|
206
215
|
|
|
207
216
|
[full changelog](https://github.com/Mange/roadie/compare/v3.0.0.pre1...v3.0.0)
|
|
208
217
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
218
|
+
- Enhancements:
|
|
219
|
+
|
|
220
|
+
- `Roadie::ProviderList` responds to `#empty?` and `#last`
|
|
221
|
+
- `Roadie::FilesystemProvider` ignores query string in filename.
|
|
222
|
+
|
|
223
|
+
Older versions of Rails generated `<link>` tags with query strings in their URLs, like such:
|
|
224
|
+
`/stylesheets/email.css?1380694096`
|
|
212
225
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
* Try to detect an upgrade from Roadie 2 and mention how to make it work with the new version.
|
|
218
|
-
* Styles emitted in the `style` attribute should now be ordered as they were in the source CSS.
|
|
226
|
+
- Blacklist `:enabled`, `:disabled` and `:checked` pseudo functions - [Tyler Hunt (tylerhunt)](https://github.com/tylerhunt).
|
|
227
|
+
- Add MRI 2.1.2 to Travis build matrix - [Grey Baker (greysteil)](https://github.com/greysteil).
|
|
228
|
+
- Try to detect an upgrade from Roadie 2 and mention how to make it work with the new version.
|
|
229
|
+
- Styles emitted in the `style` attribute should now be ordered as they were in the source CSS.
|
|
219
230
|
|
|
220
231
|
### 3.0.0.pre1
|
|
221
232
|
|
|
@@ -223,188 +234,188 @@
|
|
|
223
234
|
|
|
224
235
|
Complete rewrite of most of the code and a new direction for the gem.
|
|
225
236
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
- Breaking changes:
|
|
238
|
+
- Removed Rails support into a separate Gem (`roadie-rails`).
|
|
239
|
+
- Removed Sprockets dependency and AssetPipelineProvider.
|
|
240
|
+
- Changed the entire public API.
|
|
241
|
+
- Changed the API of custom providers.
|
|
242
|
+
- Dropped support for Ruby 1.8.7.
|
|
243
|
+
- Change `data-immutable` to `data-roadie-ignore`.
|
|
244
|
+
- New features:
|
|
245
|
+
- Rewriting the URLs of `img[src]`.
|
|
246
|
+
- A way to inject stylesheets without having to adjust template.
|
|
247
|
+
- A before callback to compliment the after callback.
|
|
248
|
+
- Enhancements:
|
|
249
|
+
- Better support for stylesheets using CSS fallbacks.
|
|
239
250
|
This means that styles like this is now inlined: `width: 5em; width: 3rem;`, while Roadie would previously remove the first of the two.
|
|
240
251
|
This sadly means that the HTML file will be much larger than before if you're using a non-optimized stylesheet (for example including your application stylesheet to the email). This was a bad idea even before this change, and this might get you to change.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
252
|
+
- Using HTML5 doctype instead of XHTML
|
|
253
|
+
- Full support for JRuby
|
|
254
|
+
- Experimental support for Rubinius
|
|
244
255
|
|
|
245
256
|
### 2.4.2
|
|
246
257
|
|
|
247
258
|
[full changelog](https://github.com/Mange/roadie/compare/v2.4.1...v2.4.2)
|
|
248
259
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
260
|
+
- Bug fixes:
|
|
261
|
+
- Fix Nokogiri version to allow only 1.5.x on ruby 1.8.7
|
|
262
|
+
- Blacklist :before, :after, :-ms-input-placeholder, :-moz-placeholder selectors – [Brian Bauer (bbauer)][https://github.com/bbauer].
|
|
263
|
+
- Build failed on 1.8.7 due to a change in `css_parser`
|
|
253
264
|
|
|
254
265
|
### 2.4.1
|
|
255
266
|
|
|
256
267
|
[full changelog](https://github.com/Mange/roadie/compare/v2.4.0...v2.4.1)
|
|
257
268
|
|
|
258
|
-
|
|
259
|
-
|
|
269
|
+
- Bug fixes:
|
|
270
|
+
- Allow Nokogiri 1.5.x again; 1.6.x is unsupported in Ruby 1.8.7.
|
|
260
271
|
|
|
261
272
|
### 2.4.0
|
|
262
273
|
|
|
263
274
|
[full changelog](https://github.com/Mange/roadie/compare/v2.3.4...v2.4.0)
|
|
264
275
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
276
|
+
- Enhancements:
|
|
277
|
+
- Support Rails 4.0, with the help of:
|
|
278
|
+
- [Ryunosuke SATO (tricknotes)](https://github.com/tricknotes)
|
|
279
|
+
- [Dylan Markow](https://github.com/dmarkow)
|
|
280
|
+
- Keep `!important` when outputting styles to help combat web mail styles being `!important`
|
|
281
|
+
- Support `:nth-child`, `:last-child`, etc.
|
|
282
|
+
- To make this work, Roadie have to catch errors from Nokogiri and ignore them. A warning will be printed when this happens so users can open issues with the project and tests can be expanded.
|
|
283
|
+
- Support for custom inliner (#58) — [Harish Shetty (kandadaboggu)](https://github.com/kandadaboggu) with friends
|
|
284
|
+
- Bug fixes:
|
|
285
|
+
- Don't crash when URL options have protocols with "://" in them (#52).
|
|
286
|
+
- Other:
|
|
287
|
+
- Be more specific on which versions are required; require newer `css_parser`
|
|
288
|
+
- Officially support MRI 2.0.0
|
|
289
|
+
- Add experimental support for JRuby
|
|
290
|
+
- Remove documentation that talks about passing CSS filenames as symbols; unsupported in Rails 4. (Thanks to [PikachuEXE](https://github.com/PikachuEXE))
|
|
280
291
|
|
|
281
292
|
### 2.3.4
|
|
282
293
|
|
|
283
294
|
[full changelog](https://github.com/Mange/roadie/compare/v2.3.3...v2.3.4)
|
|
284
295
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
296
|
+
- Enhancements:
|
|
297
|
+
- Add `config.roadie.enabled` that can be set to `false` to disable Roadie completely.
|
|
298
|
+
- Bug fixes:
|
|
299
|
+
- Proc objects to the `:css` option is now run in the context of the mailer instance, mirroring similar options from ActionMailer.
|
|
300
|
+
- Fix some tests that would always pass
|
|
301
|
+
- Improve JRuby compatibility
|
|
302
|
+
- Update Gemfile.lock and fix issues with newer gem versions
|
|
292
303
|
|
|
293
304
|
### 2.3.3
|
|
294
305
|
|
|
295
306
|
[full changelog](https://github.com/Mange/roadie/compare/v2.3.2...v2.3.3)
|
|
296
307
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
308
|
+
- Enhancements:
|
|
309
|
+
- Allow proc objects to the `:css` option
|
|
310
|
+
- Bug fixes:
|
|
311
|
+
- Ignore HTML comments and CDATA sections in CSS (support TinyMCE)
|
|
301
312
|
|
|
302
313
|
### 2.3.2
|
|
303
314
|
|
|
304
315
|
[full changelog](https://github.com/Mange/roadie/compare/v2.3.1...v2.3.2)
|
|
305
316
|
|
|
306
|
-
|
|
307
|
-
|
|
317
|
+
- Bug fixes:
|
|
318
|
+
- Don't fail on selectors which start with @ (#28) — [Roman Shterenzon (romanbsd)](https://github.com/romanbsd)
|
|
308
319
|
|
|
309
320
|
### 2.3.1
|
|
310
321
|
|
|
311
322
|
[full changelog](https://github.com/Mange/roadie/compare/v2.3.0...v2.3.1)
|
|
312
323
|
|
|
313
|
-
|
|
314
|
-
|
|
324
|
+
- Bug fixes:
|
|
325
|
+
- Does not work with Rails 3.0 unless provider set specifically (#23)
|
|
315
326
|
|
|
316
327
|
### 2.3.0
|
|
317
328
|
|
|
318
329
|
[full changelog](https://github.com/Mange/roadie/compare/v2.3.0.pre1...v2.3.0)
|
|
319
330
|
|
|
320
|
-
|
|
331
|
+
- Nothing, really
|
|
321
332
|
|
|
322
333
|
### 2.3.0.pre1
|
|
323
334
|
|
|
324
335
|
[full changelog](https://github.com/Mange/roadie/compare/v2.2.0...v2.3.0.pre1)
|
|
325
336
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
337
|
+
- Enhancements:
|
|
338
|
+
- Support Rails 3.2.pre1 - [Morton Jonuschat (yabawock)](https://github.com/yabawock)
|
|
339
|
+
- Sped up the Travis builds
|
|
340
|
+
- Official support for Rails 3.0 again
|
|
341
|
+
- Dependencies allow 3.0
|
|
342
|
+
- Travis builds 3.0 among the others
|
|
332
343
|
|
|
333
344
|
### 2.2.0
|
|
334
345
|
|
|
335
346
|
[full changelog](https://github.com/Mange/roadie/compare/v2.1.0...v2.2.0)
|
|
336
347
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
348
|
+
- Enhancements:
|
|
349
|
+
- Support for the `url_options` method inside mailer instances
|
|
350
|
+
- You can now dynamically alter the URL options on a per-email basis
|
|
340
351
|
|
|
341
352
|
### 2.1.0
|
|
342
353
|
|
|
343
354
|
[full changelog](https://github.com/Mange/roadie/compare/v2.1.0.pre2...v2.1.0)
|
|
344
355
|
|
|
345
|
-
|
|
356
|
+
- Full release!
|
|
346
357
|
|
|
347
358
|
### 2.1.0.pre2
|
|
348
359
|
|
|
349
360
|
[full changelog](https://github.com/Mange/roadie/compare/v2.1.0.pre1...v2.1.0.pre2)
|
|
350
361
|
|
|
351
|
-
|
|
362
|
+
- Bug: Roadie broke `url_for` inside mailer views
|
|
352
363
|
|
|
353
364
|
### 2.1.0.pre1
|
|
354
365
|
|
|
355
366
|
[full changelog](https://github.com/Mange/roadie/compare/v2.0.0...v2.1.0.pre1)
|
|
356
367
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
368
|
+
- Enhancements:
|
|
369
|
+
- Support normal filesystem instead of only Asset pipeline
|
|
370
|
+
- Enable users to create their own way of fetching CSS
|
|
371
|
+
- Improve test coverage a bit
|
|
372
|
+
- Use a railtie to hook into Rails
|
|
373
|
+
- Use real Rails for testing integration
|
|
363
374
|
|
|
364
375
|
### 2.0.0
|
|
365
376
|
|
|
366
377
|
[full changelog](https://github.com/Mange/roadie/compare/v1.1.3...v2.0.0)
|
|
367
378
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
379
|
+
- Enhancements:
|
|
380
|
+
- Support the Asset pipeline - [Arttu Tervo (arttu)](https://github.com/arttu)
|
|
381
|
+
- Dependencies:
|
|
382
|
+
- Requires Rails 3.1 to work. You can keep on using the 1.x series in Rails 3.0
|
|
372
383
|
|
|
373
384
|
### 1.1.3
|
|
374
385
|
|
|
375
386
|
[full changelog](https://github.com/Mange/roadie/compare/v1.1.2...v1.1.3)
|
|
376
387
|
|
|
377
|
-
|
|
388
|
+
- Do not add another ".css" to filenames if already present - [Aliaxandr (saks)](https://github.com/saks)
|
|
378
389
|
|
|
379
390
|
### 1.1.2
|
|
380
391
|
|
|
381
392
|
[full changelog](https://github.com/Mange/roadie/compare/v1.1.1...v1.1.2)
|
|
382
393
|
|
|
383
|
-
|
|
394
|
+
- Support for Rails 3.1.0 and later inside gemspec
|
|
384
395
|
|
|
385
396
|
### 1.1.1
|
|
386
397
|
|
|
387
398
|
[full changelog](https://github.com/Mange/roadie/compare/v1.1.0...v1.1.1)
|
|
388
399
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
400
|
+
- Support for Rails 3.1.x (up to and including RC4)
|
|
401
|
+
- Rails 3.0.x is still supported
|
|
402
|
+
- Added CI via [Travis CI](http://travis-ci.org)
|
|
392
403
|
|
|
393
404
|
### 1.1.0
|
|
394
405
|
|
|
395
406
|
[full changelog](https://github.com/Mange/roadie/compare/v1.0.1...v1.1.0)
|
|
396
407
|
|
|
397
|
-
|
|
398
|
-
|
|
408
|
+
- Enhancements:
|
|
409
|
+
- Support for inlining `<link>` elements (thanks to [aliix](https://github.com/aliix))
|
|
399
410
|
|
|
400
411
|
### 1.0.1
|
|
401
412
|
|
|
402
413
|
[full changelog](https://github.com/Mange/roadie/compare/v1.0.0...v1.0.1)
|
|
403
414
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
415
|
+
- Enhancements:
|
|
416
|
+
- Full, official support for Ruby 1.9.2 (in addition to 1.8.7)
|
|
417
|
+
- Dependencies:
|
|
418
|
+
- Explicilty depend on nokogiri >= 1.4.4
|
|
408
419
|
|
|
409
420
|
### 1.0.0
|
|
410
421
|
|
|
@@ -412,11 +423,11 @@ Complete rewrite of most of the code and a new direction for the gem.
|
|
|
412
423
|
|
|
413
424
|
Roadie fork!
|
|
414
425
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
426
|
+
- Enhancements:
|
|
427
|
+
- Support for Rails 3.0
|
|
428
|
+
- Code cleanup
|
|
429
|
+
- Support `!important`
|
|
430
|
+
- Tests
|
|
431
|
+
- - some other enhancements
|
|
432
|
+
- Deprecations:
|
|
433
|
+
- Removed support for Rails 2.x
|
data/lib/roadie/errors.rb
CHANGED
|
@@ -23,7 +23,9 @@ module Roadie
|
|
|
23
23
|
else
|
|
24
24
|
""
|
|
25
25
|
end
|
|
26
|
-
super
|
|
26
|
+
super(
|
|
27
|
+
"Cannot use path \"#{given_path}\" in URL generation.#{cause_message}"
|
|
28
|
+
)
|
|
27
29
|
end
|
|
28
30
|
end
|
|
29
31
|
|
|
@@ -47,7 +49,7 @@ module Roadie
|
|
|
47
49
|
@css_name = css_name
|
|
48
50
|
@provider = provider
|
|
49
51
|
@extra_message = message
|
|
50
|
-
super
|
|
52
|
+
super(build_message)
|
|
51
53
|
end
|
|
52
54
|
|
|
53
55
|
protected
|
data/lib/roadie/selector.rb
CHANGED
data/lib/roadie/version.rb
CHANGED
data/roadie.gemspec
CHANGED
|
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
|
|
|
24
24
|
s.add_development_dependency "rspec", "~> 3.0"
|
|
25
25
|
s.add_development_dependency "rspec-collection_matchers", "~> 1.0"
|
|
26
26
|
s.add_development_dependency "webmock", "~> 3.0"
|
|
27
|
+
s.add_development_dependency "standardrb"
|
|
27
28
|
|
|
28
29
|
s.extra_rdoc_files = %w[README.md Changelog.md]
|
|
29
30
|
s.require_paths = %w[lib]
|
data/spec/integration_spec.rb
CHANGED
|
@@ -67,6 +67,29 @@ describe "Roadie functionality" do
|
|
|
67
67
|
expect(styles).to include Roadie::Stylesheet.new("", css).to_s
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
+
it "does not strip :root pseudo-class" do
|
|
71
|
+
document = Roadie::Document.new <<-HTML
|
|
72
|
+
<html>
|
|
73
|
+
<head>
|
|
74
|
+
<title>Hello world!</title>
|
|
75
|
+
</head>
|
|
76
|
+
<body>
|
|
77
|
+
<h1>Hello world!</h1>
|
|
78
|
+
</body>
|
|
79
|
+
</html>
|
|
80
|
+
HTML
|
|
81
|
+
css = <<-CSS
|
|
82
|
+
:root { --color: red; }
|
|
83
|
+
CSS
|
|
84
|
+
document.add_css css
|
|
85
|
+
|
|
86
|
+
result = parse_html document.transform
|
|
87
|
+
expect(result).to have_selector("html > head > style")
|
|
88
|
+
|
|
89
|
+
styles = result.at_css("html > head > style").text
|
|
90
|
+
expect(styles).to include Roadie::Stylesheet.new("", css).to_s
|
|
91
|
+
end
|
|
92
|
+
|
|
70
93
|
it "can be configured to skip styles that cannot be inlined" do
|
|
71
94
|
document = Roadie::Document.new <<-HTML
|
|
72
95
|
<html>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: roadie
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.2.
|
|
4
|
+
version: 5.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Magnus Bergmark
|
|
@@ -94,6 +94,20 @@ dependencies:
|
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '3.0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: standardrb
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
97
111
|
description: Roadie tries to make sending HTML emails a little less painful by inlining
|
|
98
112
|
stylesheets and rewriting relative URLs for you.
|
|
99
113
|
email:
|
|
@@ -197,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
197
211
|
- !ruby/object:Gem::Version
|
|
198
212
|
version: '0'
|
|
199
213
|
requirements: []
|
|
200
|
-
rubygems_version: 3.
|
|
214
|
+
rubygems_version: 3.5.5
|
|
201
215
|
signing_key:
|
|
202
216
|
specification_version: 4
|
|
203
217
|
summary: Making HTML emails comfortable for the Ruby rockstars
|