sundawg_premailer 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,230 @@
1
+ # Capabilities of e-mail clients
2
+ #
3
+ # Sources
4
+ # * http://campaignmonitor.com/css/
5
+ # * http://www.campaignmonitor.com/blog/archives/2007/04/a_guide_to_css_support_in_emai_2.html
6
+ # * http://www.campaignmonitor.com/blog/archives/2007/11/do_image_maps_work_in_html_ema.html
7
+ # * http://www.campaignmonitor.com/blog/archives/2007/11/how_forms_perform_in_html_emai.html
8
+ # * http://www.xavierfrenette.com/articles/css-support-in-webmail/
9
+ # * http://www.email-standards.org/
10
+ # Updated 2008-08-26
11
+ #
12
+ # Support: 1 = SAFE, 2 = POOR, 3 = RISKY
13
+ elements:
14
+ map:
15
+ support: 2
16
+ unsupported_in: [GMail]
17
+ area:
18
+ support: 2
19
+ unsupported_in: [GMail]
20
+ form:
21
+ support: 3
22
+ unsupported_in: [Mobile Me, Old Yahoo, AOL, Live Mail, Outlook 07, Outlook 03]
23
+ link:
24
+ support: 2
25
+ unsupported_in: [GMail, Hotmail, Old Yahoo]
26
+ attributes:
27
+ ismap:
28
+ support: 2
29
+ unsupported_in: [GMail]
30
+ css_properties:
31
+ color:
32
+ unsupported_in: [Eudora]
33
+ support_level: 92%
34
+ support: 1
35
+ font-size:
36
+ unsupported_in: [Eudora]
37
+ support_level: 92%
38
+ support: 1
39
+ font-style:
40
+ unsupported_in: [Eudora]
41
+ support_level: 92%
42
+ support: 1
43
+ font-weight:
44
+ unsupported_in: [Eudora]
45
+ support_level: 92%
46
+ support: 1
47
+ text-align:
48
+ unsupported_in: [Eudora]
49
+ support_level: 92%
50
+ support: 1
51
+ text-decoration:
52
+ unsupported_in: [Eudora]
53
+ support_level: 92%
54
+ support: 1
55
+ background-color:
56
+ unsupported_in: [Notes 6, Eudora]
57
+ support_level: 85%
58
+ support: 2
59
+ border: &border_shorthand
60
+ unsupported_in: [Notes 6, Eudora]
61
+ support_level: 85%
62
+ support: 2
63
+ border-bottom: *border_shorthand
64
+ border-left: *border_shorthand
65
+ border-right: *border_shorthand
66
+ border-top: *border_shorthand
67
+ display:
68
+ unsupported_in: [Outlook 07, Eudora]
69
+ support_level: 85%
70
+ support: 2
71
+ font-family:
72
+ unsupported_in: [Eudora, Old GMail, New GMail]
73
+ support_level: 92%
74
+ support: 2
75
+ font-variant:
76
+ unsupported_in: [Notes 6, Eudora]
77
+ support_level: 85%
78
+ support: 2
79
+ letter-spacing:
80
+ unsupported_in: [Notes 6, Eudora]
81
+ support_level: 85%
82
+ support: 2
83
+ line-height:
84
+ unsupported_in: [Notes 6, Eudora]
85
+ support_level: 85%
86
+ support: 2
87
+ padding: &padding_shorthand
88
+ unsupported_in: [Notes 6, Eudora]
89
+ support_level: 85%
90
+ support: 2
91
+ padding-bottom: *padding_shorthand
92
+ padding-left: *padding_shorthand
93
+ padding-right: *padding_shorthand
94
+ padding-top: *padding_shorthand
95
+ table-layout:
96
+ unsupported_in: [Notes 6, Eudora]
97
+ support_level: 85%
98
+ support: 2
99
+ text-indent:
100
+ unsupported_in: [Notes 6, Eudora]
101
+ support_level: 85%
102
+ support: 2
103
+ text-transform:
104
+ unsupported_in: [Notes 6, Eudora]
105
+ support_level: 85%
106
+ support: 2
107
+ border-collapse:
108
+ unsupported_in: [Entourage 2004, Notes 6, Eudora]
109
+ support_level: 77%
110
+ support: 3
111
+ clear:
112
+ unsupported_in: [Outlook 07, Notes 6, Eudora]
113
+ support_level: 77%
114
+ support: 3
115
+ direction:
116
+ unsupported_in: [Outlook 07, Entourage 2004, Eudora, New GMail]
117
+ support_level: 77%
118
+ support: 3
119
+ float:
120
+ unsupported_in: [Outlook 07, Eudora, Old GMail]
121
+ support_level: 85%
122
+ support: 3
123
+ vertical-align:
124
+ unsupported_in: [Outlook 07, Notes 6, Eudora]
125
+ support_level: 77%
126
+ support: 3
127
+ width:
128
+ unsupported_in: [Outlook 07, Notes 6, Eudora]
129
+ support_level: 77%
130
+ support: 3
131
+ word-spacing:
132
+ unsupported_in: [Outlook 07, Notes 6, Eudora]
133
+ support_level: 77%
134
+ support: 3
135
+ height:
136
+ unsupported_in: [Outlook 07, Notes 6, Eudora, Old GMail]
137
+ support_level: 77%
138
+ support: 3
139
+ list-style-type:
140
+ unsupported_in: [Outlook 07, Eudora, Hotmail]
141
+ support_level: 85%
142
+ support: 3
143
+ overflow:
144
+ unsupported_in: [Outlook 07, Entourage 2004, Notes 6, Eudora]
145
+ support_level: 69%
146
+ support: 3
147
+ visibility:
148
+ unsupported_in: [Outlook 07, Notes 6, Eudora, Old GMail, New GMail, aolWeb]
149
+ support_level: 77%
150
+ support: 3
151
+ white-space:
152
+ unsupported_in: [Outlook 03, Windows Mail, AOL 9, AOL 10, Notes 6, Eudora, Mobile Me]
153
+ support_level: 54%
154
+ support: 3
155
+ background-image:
156
+ unsupported_in: [Outlook 07, Notes 6, Eudora, Old GMail, New GMail, Live Mail]
157
+ support_level: 77%
158
+ support: 3
159
+ background-repeat:
160
+ unsupported_in: [Outlook 07, Notes 6, Eudora, Old GMail, New GMail, Live Mail]
161
+ support_level: 77%
162
+ support: 3
163
+ clip:
164
+ unsupported_in: [Outlook 07, Notes 6, Eudora, New Yahoo, New GMail, Live Mail, Mobile Me]
165
+ support_level: 77%
166
+ support: 3
167
+ cursor:
168
+ unsupported_in: [Outlook 07, Entourage 2004, Notes 6, Eudora, Old GMail, New GMail]
169
+ support_level: 69%
170
+ support: 3
171
+ list-style-image:
172
+ unsupported_in: [Outlook 07, Notes 6, Eudora, Old GMail, New GMail, Live Mail]
173
+ support_level: 77%
174
+ support: 3
175
+ list-style-position:
176
+ unsupported_in: [Outlook 07, Notes 6, Eudora, Old Yahoo, Hotmail]
177
+ support_level: 77%
178
+ support: 3
179
+ margin: &margin_shorthand
180
+ unsupported_in: [AOL 9, Notes 6, Eudora, Live Mail, Hotmail]
181
+ support_level: 77%
182
+ support: 3
183
+ margin-bottom: *margin_shorthand
184
+ margin-left: *margin_shorthand
185
+ margin-right: *margin_shorthand
186
+ margin-top: *margin_shorthand
187
+ z-index:
188
+ unsupported_in: [Notes 6, Eudora, New Yahoo, Old GMail, New GMail, Live Mail]
189
+ support_level: 85%
190
+ support: 3
191
+ left:
192
+ unsupported_in: [Outlook 07, Notes 6, Eudora, New Yahoo, Old GMail, New GMail, Live Mail]
193
+ support_level: 77%
194
+ support: 3
195
+ right:
196
+ unsupported_in: [Outlook 07, Notes 6, Eudora, New Yahoo, Old GMail, New GMail, Live Mail]
197
+ support_level: 77%
198
+ support: 3
199
+ top:
200
+ unsupported_in: [Outlook 07, Notes 6, Eudora, New Yahoo, Old GMail, New GMail, Live Mail]
201
+ support_level: 77%
202
+ support: 3
203
+ background-position:
204
+ unsupported_in: [Outlook 07, Notes 6, Eudora, Old Yahoo, Old GMail, New GMail, Live Mail, Hotmail]
205
+ support_level: 77%
206
+ support: 3
207
+ border-spacing:
208
+ unsupported_in: [Outlook 03, Outlook 07, Windows Mail, Entourage 2004, AOL 10, Notes 6, Eudora, Live Mail, Hotmail]
209
+ support_level: 46%
210
+ support: 3
211
+ bottom:
212
+ unsupported_in: [Outlook 07, AOL 9, Notes 6, Eudora, New Yahoo, Old GMail, New GMail, Live Mail]
213
+ support_level: 69%
214
+ support: 3
215
+ empty-cells:
216
+ unsupported_in: [Outlook 03, Outlook 07, Windows Mail, Entourage 2004, AOL 9, AOL 10, Notes 6, Eudora, Hotmail]
217
+ support_level: 38%
218
+ support: 3
219
+ position:
220
+ unsupported_in: [Outlook 07, Notes 6, Eudora, Old Yahoo, New Yahoo, Old GMail, New GMail, Live Mail, Hotmail, Mobile Me]
221
+ support_level: 77%
222
+ support: 3
223
+ caption-side:
224
+ unsupported_in: [Outlook 03, Outlook 07, Windows Mail, Mac Mail, Entourage 2004, Entourage 2008, AOL 9, AOL 10, AOL Desktop for Mac, Notes 6, Eudora, New Yahoo, Hotmail]
225
+ support_level: 15%
226
+ support: 3
227
+ opacity:
228
+ unsupported_in: [Outlook 03, Outlook 07, Windows Mail, Entourage 2004, Notes 6, Eudora, New Yahoo, Old GMail, New GMail, Live Mail, Hotmail]
229
+ support_level: 54%
230
+ support: 3
@@ -0,0 +1,20 @@
1
+ require 'rake'
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "premailer"
5
+ s.version = "1.5.5"
6
+ s.date = "2009-12-03"
7
+ s.summary = "Preflight for HTML e-mail."
8
+ s.email = "code@dunae.ca"
9
+ s.homepage = "http://premailer.dialect.ca/"
10
+ s.description = "Improve the rendering of HTML emails by making CSS inline, converting links and warning about unsupported code."
11
+ s.has_rdoc = true
12
+ s.author = "Alex Dunae"
13
+ s.rdoc_options << '--all' << '--inline-source' << '--line-numbers' << '--charset' << 'utf-8'
14
+ s.files = FileList['*.rb', 'lib/premailer.rb', 'lib/**/*', '*.rdoc', 'misc/client_support.yaml', 'bin/*', 'test/*', 'test/**/*'].to_a
15
+ s.executables = 'premailer'
16
+ s.add_dependency('hpricot', '>= 0.6')
17
+ s.add_dependency('css_parser', '>= 0.9.1')
18
+ s.add_dependency('text-reform', '>= 0.2.0')
19
+ s.add_dependency('htmlentities', '>= 4.0.0')
20
+ end
@@ -0,0 +1,43 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{sundawg_premailer}
5
+ s.version = "0.0.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Christopher Sun"]
9
+ s.date = %q{2010-02-09}
10
+ s.description = %q{Fork of premailer project to accomodate in memory HTML (http://premailer.dialect.ca/).}
11
+ s.email = %q{christopher.sun@gmail.com}
12
+ s.executables = ["premailer", "trollop.rb"]
13
+ s.extra_rdoc_files = ["CHANGELOG.rdoc", "LICENSE.rdoc", "README.rdoc", "bin/premailer", "bin/trollop.rb", "lib/premailer.rb", "lib/premailer/html_to_plain_text.rb", "lib/premailer/premailer.rb"]
14
+ s.files = ["CHANGELOG.rdoc", "LICENSE.rdoc", "Manifest", "README.rdoc", "Rakefile", "bin/premailer", "bin/trollop.rb", "init.rb", "lib/premailer.rb", "lib/premailer/html_to_plain_text.rb", "lib/premailer/premailer.rb", "misc/client_support.yaml", "premailer.gemspec", "tests/files/base.html", "tests/files/contact_bg.png", "tests/files/dialect.png", "tests/files/dots_end.png", "tests/files/dots_h.gif", "tests/files/import.css", "tests/files/inc/2009-placeholder.png", "tests/files/noimport.css", "tests/files/styles.css", "tests/test_helper.rb", "tests/test_html_to_plain_text.rb", "tests/test_link_resolver.rb", "tests/test_premailer.rb", "sundawg_premailer.gemspec"]
15
+ s.homepage = %q{http://github.com/SunDawg/premailer}
16
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Sundawg_premailer", "--main", "README.rdoc"]
17
+ s.require_paths = ["lib"]
18
+ s.rubyforge_project = %q{sundawg_premailer}
19
+ s.rubygems_version = %q{1.3.5}
20
+ s.summary = %q{Fork of premailer project to accomodate in memory HTML (http://premailer.dialect.ca/).}
21
+
22
+ if s.respond_to? :specification_version then
23
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
+ s.specification_version = 3
25
+
26
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
+ s.add_runtime_dependency(%q<hpricot>, [">= 0.6"])
28
+ s.add_runtime_dependency(%q<css_parser>, [">= 1.0.0"])
29
+ s.add_runtime_dependency(%q<text-reform>, [">= 0.2.0"])
30
+ s.add_runtime_dependency(%q<htmlentities>, [">= 4.0.0"])
31
+ else
32
+ s.add_dependency(%q<hpricot>, [">= 0.6"])
33
+ s.add_dependency(%q<css_parser>, [">= 1.0.0"])
34
+ s.add_dependency(%q<text-reform>, [">= 0.2.0"])
35
+ s.add_dependency(%q<htmlentities>, [">= 4.0.0"])
36
+ end
37
+ else
38
+ s.add_dependency(%q<hpricot>, [">= 0.6"])
39
+ s.add_dependency(%q<css_parser>, [">= 1.0.0"])
40
+ s.add_dependency(%q<text-reform>, [">= 0.2.0"])
41
+ s.add_dependency(%q<htmlentities>, [">= 4.0.0"])
42
+ end
43
+ end
@@ -0,0 +1,139 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <!--
3
+
4
+ You can read this newsletter online at
5
+ [webversion]
6
+
7
+ -->
8
+ <html>
9
+ <head>
10
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
11
+ <title>Premailer Test</title>
12
+ <link rel="stylesheet" type="text/css" href="styles.css">
13
+ <style type="text/css">
14
+ @import "import.css" screen, handheld;
15
+ </style>
16
+ <style type="text/css">
17
+ @import "noimport.css" print;
18
+ </style>
19
+ </head>
20
+ <body>
21
+ <div id="wrapper">
22
+ <p class="hide" id="hide01">This line should be hidden.</p>
23
+ <table width="646" class="container" cellspacing="0" cellpadding="0">
24
+ <tr><td id="webversion" colspan="6">Having trouble reading this newsletter? <webversion>Click here to see it in your browser</webversion></td></tr>
25
+
26
+ <tr><td height="13" colspan="6" class="frame">&#x00a0;</td></tr>
27
+
28
+
29
+
30
+ <table width="646" class="container" cellspacing="0" cellpadding="0">
31
+
32
+ <tr>
33
+ <td class="frame" width="13">&#x00a0;</td>
34
+ <td class="gutter" width="60">&#x00a0;</td>
35
+
36
+ <td class="content" colspan="2" width="500">
37
+
38
+ <h1><span>Premailer Test</span></h1>
39
+
40
+ <table width="500" cellpadding="0" cellspacing="0">
41
+ <tr>
42
+ <td width="20">&#x00a0;</td>
43
+ <td colspan="2" width="460">
44
+ <h2>Lorem ipsum dolor</h2>
45
+ <h3>Suspendisse id velit vitae ligula volutpat condimentum</h3>
46
+ <p class="dt">Morbi commodo, ipsum sed</p>
47
+
48
+
49
+ <p class="unaligned"><img src="inc/2009-placeholder.png" alt="Image" align="right" class="right">Lorem&nbsp;ipsum&#x00a0;dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. <a href="http://premailer.dialect.ca/">Nulla facilisi</a>. Nulla libero.</p>
50
+
51
+ <p>Here&rsquo;s a quote. Here’s a quote. &#x201c;Here’s a quote in quotes”.</p>
52
+
53
+ <p id="accents">cédille c&eacute; garçon gar&#231;on à &agrave;</p>
54
+
55
+
56
+ <p>Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi.</p>
57
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero.</p>
58
+ <blockquote><p>“Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis.”</p></blockquote>
59
+ <p>Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero.</p>
60
+
61
+ <h3>Link tests</h3>
62
+ <ul>
63
+ <li><a id="l01" href="/">Relative path to root</a></li>
64
+ <li><a id="l02" href="http://premailer.dialect.ca/">Absolute path to root</a></li>
65
+ <li><a id="l03" href="http://example.com/">Different domain</a></li>
66
+ <li><a id="l04" href="images/">Relative path to sub-directory</a></li>
67
+ <li><a id="l05" href="#relative">Link is not converted</a></li>
68
+ <li><a id="l06" href="http://example.com/test.html?cn=tf&amp;c=20&amp;ord=%%RANDOM%%">Funky ASP URL</a></li>
69
+ <li><a id="l07" href="?query=string">Appends tracking query string</a></li>
70
+ <li><a id="l08" href="{DONOTCONVERT}">Link is not converted</a></li>
71
+ <li><a id="l09" href="[DONOTCONVERT]">Link is not converted</a></li>
72
+ <li><a id="l10" href="<DONOTCONVERT>">Link is not converted</a></li>
73
+ <li><a id="l11" href="mailto:premailer@example.com">mailto link</a></li>
74
+ <li><a id="l12" href="ftp://example.com">FTP link</a></li>
75
+ <li><a id="l13" href="gopher://gopher.floodgap.com/1/fun/twitpher">Gopher link</a></li>
76
+ </ul>
77
+
78
+
79
+
80
+ <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis.</p>
81
+
82
+ <p>&nbsp;</p>
83
+
84
+
85
+ </td>
86
+ <td width="20">&#x00a0;</td>
87
+ </tr>
88
+ </table>
89
+
90
+ <p class="section"><img src="inc/dots_end.png" alt="---" width="499" height="75"></p>
91
+ </td><!-- /#content -->
92
+ <td class="gutter" width="60">&#x00a0;</td>
93
+
94
+ <td class="frame" width="13">&#x00a0;</td>
95
+ </tr>
96
+
97
+ <tr>
98
+ <td class="frame" width="13">&#x00a0;</td>
99
+ <td colspan="4" width="620">
100
+ <table summary="Contact information" cellspacing="0" cellpadding="0" width="620">
101
+ <tr><td height="4" class="hairline">&#x00a0;</td></tr>
102
+ <tr><td height="34"class="contact">&#x00a0;</td></tr>
103
+ <tr>
104
+
105
+ <td align="center" class="contact" id="contact_info">
106
+ <p id="address">Premailer Test<br>
107
+ <a href="http://dialect.ca/?utm_source=Premailer&utm_medium=Test+Suite&utm_campaign=Premailer">by Dialect</a><br>
108
+ Vancouver Island, British Columbia<br>
109
+ 250 555.2222</p>
110
+ </td>
111
+
112
+ </tr>
113
+ <tr><td height="34"class="contact">&#x00a0;</td></tr>
114
+ <tr><td height="4" class="hairline">&#x00a0;</td></tr>
115
+ </table>
116
+ </td>
117
+ <td class="frame" width="13">&#x00a0;</td>
118
+ </tr>
119
+
120
+ <tr>
121
+ <td class="frame" width="13">&#x00a0;</td>
122
+
123
+ <td colspan="4" class="content" height="60">&#x00a0;</td>
124
+ <td class="frame" width="13">&#x00a0;</td>
125
+ </tr>
126
+
127
+
128
+
129
+
130
+
131
+ <tr><td height="13" colspan="6" class="frame">&#x00a0;</td></tr>
132
+ <tr><td height="22" colspan="6" >&#x00a0;</td></tr>
133
+ <tr><td id="credit" colspan="6">Newsletter communications by<br><a href="http://dialect.ca/dialogue/?utm_source=Dialogue&utm_medium=Credit&utm_campaign=South+Hollow"><img src="inc/dialect.png" alt="Dialect" width="60" height="35" border="0"></a><br><unsubscribe>Click here to unsubscribe</unsubscribe></td></tr>
134
+
135
+ </table>
136
+
137
+ </div>
138
+ </body>
139
+ </html>
Binary file
Binary file
Binary file
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Premailer styles - should import
3
+ *
4
+ * Copyright (c) 2009 Dialect Communications Group (dialect.ca)
5
+ *
6
+ * $Package: Premailer $
7
+ * $Date: 2009-02-09 17:15:56 -0800 (Mon, 09 Feb 2009) $WCDATE$ $
8
+ * $Rev: 95 $WCREV$ $
9
+ */
10
+
11
+ .hide {
12
+ display: none;
13
+ }