premailer-plus 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,185 @@
1
+ # Capabilities of e-mail clients
2
+ #
3
+ # Sources
4
+ # * http://www.campaignmonitor.com/blog/archives/2007/04/a_guide_to_css_support_in_emai_2.html
5
+ # * http://www.campaignmonitor.com/blog/archives/2007/11/do_image_maps_work_in_html_ema.html
6
+ # * http://www.campaignmonitor.com/blog/archives/2007/11/how_forms_perform_in_html_emai.html
7
+ # * http://www.xavierfrenette.com/articles/css-support-in-webmail/
8
+ # * http://www.email-standards.org/
9
+ # Updated 2007-11-28
10
+ #
11
+ # Support: 1 = SAFE, 2 = POOR, 3 = RISKY
12
+ elements:
13
+ map:
14
+ support: 2
15
+ unsupported_in: [Gmail]
16
+ area:
17
+ support: 2
18
+ unsupported_in: [Gmail]
19
+ form:
20
+ support: 3
21
+ unsupported_in: [dotMac, Old Yahoo, AOL, Live Mail, Outlook 07, Outlook 03]
22
+ link:
23
+ support: 2
24
+ unsupported_in: [Gmail, Hotmail, Old Yahoo]
25
+ attributes:
26
+ ismap:
27
+ support: 2
28
+ unsupported_in: [Gmail]
29
+ css_properties:
30
+ background-color:
31
+ support: 2
32
+ unsupported_in: [Notes 6, Eudora, dotMac]
33
+ background-image:
34
+ support: 3
35
+ unsupported_in: [Outlook 07, Gmail, Live Mail, Notes 6, Eudora, dotMac]
36
+ background-image-position:
37
+ support: 3
38
+ unsupported_in: [Outlook 07, Gmail, Live Mail, Notes 6, Eudora, dotMac]
39
+ background-repeat:
40
+ support: 3
41
+ unsupported_in: [Outlook 07, Gmail, Live Mail, Notes 6, Eudora]
42
+ background-position:
43
+ support: 3
44
+ unsupported_in: [Old Yahoo, Outlook 07, Gmail, Live Mail, Hotmail, Notes 6, Eudora]
45
+ border: &border_shorthand
46
+ support: 2
47
+ unsupported_in: [Notes 6, Eudora]
48
+ border-bottom: *border_shorthand
49
+ border-left: *border_shorthand
50
+ border-right: *border_shorthand
51
+ border-top: *border_shorthand
52
+ border-collapse:
53
+ support: 3
54
+ unsupported_in: [Entourage, Notes 6, Eudora]
55
+ border-spacing:
56
+ support: 3
57
+ unsupported_in: [Outlook 03, Outlook 07, Live Mail, Entourage, Hotmail, Notes 6, Eudora]
58
+ bottom:
59
+ support: 3
60
+ unsupported_in: [New Yahoo, AOL, Outlook 07, Gmail, Live Mail, Notes 6, Eudora]
61
+ caption-side:
62
+ support: 3
63
+ unsupported_in: [Outlook 03, New Yahoo, AOL, Outlook 07, Mac Mail, Entourage, Hotmail, Notes 6, Eudora]
64
+ clear:
65
+ support: 3
66
+ unsupported_in: [Outlook 07, Notes 6, Eudora, dotMac]
67
+ clip:
68
+ support: 3
69
+ unsupported_in: [New Yahoo, Outlook 07, Live Mail, Notes 6, Eudora]
70
+ color:
71
+ support: 1
72
+ unsupported_in: [Eudora, dotMac]
73
+ cursor:
74
+ support: 3
75
+ unsupported_in: [Outlook 07, Gmail, Entourage, Notes 6, Eudora]
76
+ direction:
77
+ support: 3
78
+ unsupported_in: [Outlook 07, Entourage, Eudora]
79
+ display:
80
+ support: 2
81
+ unsupported_in: [Outlook 07, Eudora]
82
+ empty-cells:
83
+ support: 3
84
+ unsupported_in: [Outlook 03, AOL, Outlook 07, Entourage, Hotmail, Notes 6, Eudora]
85
+ font-size:
86
+ support: 1
87
+ unsupported_in: [Eudora, dotMac]
88
+ font-style:
89
+ support: 1
90
+ unsupported_in: [Eudora, dotMac]
91
+ font-weight:
92
+ support: 1
93
+ unsupported_in: [Eudora, dotMac]
94
+ font-family:
95
+ support: 2
96
+ unsupported_in: [Gmail, Eudora, dotMac]
97
+ font-variant:
98
+ support: 2
99
+ unsupported_in: [Notes 6, Eudora, dotMac]
100
+ float:
101
+ support: 3
102
+ unsupported_in: [Outlook 07, Gmail, Eudora, dotMac]
103
+ height:
104
+ support: 3
105
+ unsupported_in: [Outlook 07, Gmail, Notes 6, Eudora, dotMac]
106
+ left:
107
+ support: 3
108
+ unsupported_in: [New Yahoo, Outlook 07, Gmail, Live Mail, Notes 6, Eudora]
109
+ letter-spacing:
110
+ support: 2
111
+ unsupported_in: [Notes 6, Eudora]
112
+ line-height:
113
+ support: 2
114
+ unsupported_in: [Notes 6, Eudora, dotMac]
115
+ list-style-image:
116
+ support: 3
117
+ unsupported_in: [Outlook 07, Gmail, Live Mail, Notes 6, Eudora, dotMac]
118
+ list-style-position:
119
+ support: 3
120
+ unsupported_in: [Old Yahoo, Outlook 07, Hotmail, Notes 6, Eudora]
121
+ list-style-type:
122
+ support: 3
123
+ unsupported_in: [Outlook 07, Live Mail, Hotmail, Eudora]
124
+ margin: &margin_shorthand
125
+ support: 3
126
+ unsupported_in: [AOL, Live Mail, Hotmail, Notes 6, Eudora, dotMac]
127
+ margin-bottom: *margin_shorthand
128
+ margin-left: *margin_shorthand
129
+ margin-right: *margin_shorthand
130
+ margin-top: *margin_shorthand
131
+ opacity:
132
+ support: 3
133
+ unsupported_in: [Outlook 03, New Yahoo, Outlook 07, Gmail, Live Mail, Entourage, Hotmail, Notes 6, Eudora]
134
+ overflow:
135
+ support: 3
136
+ unsupported_in: [Outlook 07, Entourage, Notes 6, Eudora]
137
+ padding: &padding_shorthand
138
+ support: 2
139
+ unsupported_in: [Notes 6, Eudora, dotMac]
140
+ padding-bottom: *padding_shorthand
141
+ padding-left: *padding_shorthand
142
+ padding-right: *padding_shorthand
143
+ padding-top: *padding_shorthand
144
+ position:
145
+ support: 3
146
+ unsupported_in: [New Yahoo, Old Yahoo, Outlook 07, Gmail, Live Mail, Hotmail, Notes 6, Eudora]
147
+ table-layout:
148
+ support: 2
149
+ unsupported_in: [Notes 6, Eudora]
150
+ text-align:
151
+ support: 1
152
+ unsupported_in: [Eudora]
153
+ text-decoration:
154
+ support: 1
155
+ unsupported_in: [Eudora]
156
+ text-indent:
157
+ support: 2
158
+ unsupported_in: [Notes 6, Eudora]
159
+ text-transform:
160
+ support: 2
161
+ unsupported_in: [Notes 6, Eudora]
162
+ top:
163
+ support: 3
164
+ unsupported_in: [New Yahoo, Outlook 07, Gmail, Live Mail, Notes 6, Eudora]
165
+ right:
166
+ support: 3
167
+ unsupported_in: [New Yahoo, Outlook 07, Gmail, Live Mail, Notes 6, Eudora]
168
+ vertical-align:
169
+ support: 3
170
+ unsupported_in: [Outlook 07, Notes 6, Eudora]
171
+ visibility:
172
+ support: 3
173
+ unsupported_in: [Outlook 07, Gmail, Notes 6, Eudora]
174
+ white-space:
175
+ support: 3
176
+ unsupported_in: [Outlook 03, AOL, Notes 6, Eudora]
177
+ width:
178
+ support: 3
179
+ unsupported_in: [Outlook 07, Notes 6, Eudoram, dotMac]
180
+ word-spacing:
181
+ support: 3
182
+ unsupported_in: [Outlook 07, Notes 6, Eudora]
183
+ z-index:
184
+ support: 3
185
+ unsupported_in: [New Yahoo, Gmail, Live Mail, Notes 6, Eudora]
@@ -0,0 +1,88 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{premailer-plus}
8
+ s.version = "0.1.3"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Mike Green"]
12
+ s.date = %q{2009-11-11}
13
+ s.default_executable = %q{premailer_plus}
14
+ s.email = %q{mike.is.green@gmail.com}
15
+ s.executables = ["premailer_plus"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE",
18
+ "README.textile"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ ".gitignore",
23
+ "LICENSE",
24
+ "README.textile",
25
+ "Rakefile",
26
+ "VERSION.yml",
27
+ "bin/premailer_plus",
28
+ "lib/html_to_plain_text.rb",
29
+ "lib/premailer.rb",
30
+ "misc/client_support.yaml",
31
+ "premailer-plus.gemspec",
32
+ "test/fixtures/client_support.html",
33
+ "test/fixtures/test-import.css",
34
+ "test/fixtures/test-with-folding.html",
35
+ "test/fixtures/test.css",
36
+ "test/fixtures/test.html",
37
+ "test/fixtures/test2.css",
38
+ "test/fixtures/test2.html",
39
+ "test/fixtures/test3-import.css",
40
+ "test/fixtures/test3-noimport.css",
41
+ "test/fixtures/test3-out.html",
42
+ "test/fixtures/test3.css",
43
+ "test/fixtures/test3.html",
44
+ "test/images/content_bg.jpg",
45
+ "test/images/inset.jpg",
46
+ "test/speed.rb",
47
+ "test/test_convert_to_plain_text.rb",
48
+ "test/test_helper.rb",
49
+ "test/test_link_resolver.rb",
50
+ "test/test_premailer.rb",
51
+ "test/test_premailer_download.rb"
52
+ ]
53
+ s.homepage = %q{http://github.com/mikedamage/premailer-plus}
54
+ s.rdoc_options = ["--charset=UTF-8"]
55
+ s.require_paths = ["lib"]
56
+ s.rubygems_version = %q{1.3.5}
57
+ s.summary = %q{Miscellaneous improvements and fixes to Alex Dunae's Premailer gem}
58
+ s.test_files = [
59
+ "test/speed.rb",
60
+ "test/test_convert_to_plain_text.rb",
61
+ "test/test_helper.rb",
62
+ "test/test_link_resolver.rb",
63
+ "test/test_premailer.rb",
64
+ "test/test_premailer_download.rb"
65
+ ]
66
+
67
+ if s.respond_to? :specification_version then
68
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
69
+ s.specification_version = 3
70
+
71
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
72
+ s.add_runtime_dependency(%q<hpricot>, [">= 0.8.1"])
73
+ s.add_runtime_dependency(%q<htmlentities>, [">= 4.1.0"])
74
+ s.add_runtime_dependency(%q<css_parser>, [">= 0.9.0"])
75
+ s.add_runtime_dependency(%q<text-reform>, [">= 0.2.0"])
76
+ else
77
+ s.add_dependency(%q<hpricot>, [">= 0.8.1"])
78
+ s.add_dependency(%q<htmlentities>, [">= 4.1.0"])
79
+ s.add_dependency(%q<css_parser>, [">= 0.9.0"])
80
+ s.add_dependency(%q<text-reform>, [">= 0.2.0"])
81
+ end
82
+ else
83
+ s.add_dependency(%q<hpricot>, [">= 0.8.1"])
84
+ s.add_dependency(%q<htmlentities>, [">= 4.1.0"])
85
+ s.add_dependency(%q<css_parser>, [">= 0.9.0"])
86
+ s.add_dependency(%q<text-reform>, [">= 0.2.0"])
87
+ end
88
+ end
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-ca" lang="en-ca">
3
+ <head>
4
+ <title>Premailer Test Page</title>
5
+ </head>
6
+ <body>
7
+ /* one of each warning levels should be present */
8
+ <p style="color: red; border: 1px solid red; width: 50%;">Test page.</p>
9
+ </body>
10
+ </html>
@@ -0,0 +1,4 @@
1
+ body, #container {
2
+ color: #fff;
3
+ background: #1c2815 none;
4
+ }
@@ -0,0 +1,77 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-ca" lang="en-ca">
3
+ <head>
4
+ <title>Premailer Test Page</title>
5
+ <link rel="schema.dc" href="http://www.purl.org/dc/elements/1.1/" />
6
+ <meta name="dc.creator" content="Alex Dunae - dunae.ca" />
7
+ <meta name="description" content="Premailer (http://code.dunae.ca/premailer.web/) test page" />
8
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
9
+ <link rel="stylesheet" type="text/css" href="test.css" />
10
+ <style type="text/css">
11
+ /* these styles should overwrite linked styles */
12
+ body, #container {
13
+ color: #ffe;
14
+ }
15
+
16
+ #container {
17
+ width: 90%;
18
+ margin: 0 auto;
19
+ }
20
+ </style>
21
+ </head>
22
+ <body>
23
+ <div id="container">
24
+ <table id="frame" width="740" cellpadding="10" cellspacing="0"><tr><td>
25
+ <table id="head" cellspacing="0" cellpadding="0" width="720">
26
+ <tr>
27
+ <td>
28
+ <p>Having trouble reading this email? You can <a href="#">read it on our web site</a>.</p>
29
+ </td>
30
+ </tr>
31
+ </table>
32
+
33
+ <table id="content" cellspacing="0" width="720">
34
+ <tr valign="top">
35
+ <td>
36
+ <!-- MAIN CONTENT BEGINS -->
37
+
38
+ <h1>Premailer Test Page</h1>
39
+
40
+ <img src="images/inset.jpg" alt="Inset image" class="feature right" />
41
+
42
+ <p class="intro">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
43
+
44
+ <p>Sed quis justo ut velit mattis adipiscing. Sed in mauris et libero dapibus varius. Quisque quis neque sed neque tincidunt scelerisque. Praesent vitae velit sit amet libero pharetra rhoncus. Phasellus laoreet. Sed nibh. Integer venenatis odio vitae neque. Quisque et mi ac libero blandit interdum. Suspendisse vitae massa. Suspendisse purus ligula, egestas in, ultrices non, fermentum at, lorem.</p>
45
+
46
+ <h2>Links</h2>
47
+
48
+ <ul class="spacious">
49
+ <li><a href="/">Relative path to root</a></li>
50
+ <li><a href="http://code.dunae.ca/">Absolute path to root</a></li>
51
+ <li><a href="http://example.com/">Different domain</a></li>
52
+ <li><a href="images/">Relative path to sub-directory</a></li>
53
+ </ul>
54
+
55
+ <p>Vestibulum <strong>tristique adipiscing</strong> nisi. Suspendisse bibendum pretium justo. Vestibulum nec ante. Nulla mollis molestie nibh. Curabitur facilisis neque a risus. Curabitur aliquam gravida nisl. Sed consectetuer. Nullam interdum faucibus quam. Suspendisse pulvinar orci nec metus. Vivamus nonummy. Nam dignissim arcu a metus. Mauris leo. Nulla facilisi. Ut varius. Duis ultricies tristique magna. Vestibulum in lorem vitae diam pharetra vehicula. Suspendisse condimentum. Curabitur dictum magna eget tellus.</p>
56
+ <!-- MAIN CONTENT ENDS -->
57
+ </td>
58
+ </tr>
59
+ </table>
60
+
61
+ <table id="legal" cellspacing="0" cellpadding="0" width="720">
62
+ <tr>
63
+ <td class="left" width="50%" height="120" valign="top">
64
+ <p>This e-mail was sent to <b>test@example.com</b><br />
65
+ <a href="#">Click here</a> to <i>instantly</i> unsubscribe.</p>
66
+ </td>
67
+ <td class="right" width="50%" height="120" valign="top">
68
+ <p>Sent by <a href="http://example.com/" title="Test Co. web site">Test Co.</a><br />
69
+ Vancouver Island, BC, Canada</p>
70
+ </td>
71
+ </tr>
72
+ </table>
73
+
74
+ </td></tr></table><!-- / #frame -->
75
+ </div><!-- / #container -->
76
+ </body>
77
+ </html>
@@ -0,0 +1,90 @@
1
+ /*
2
+ Premailer (http://code.dunae.ca/premailer.web/) test stylesheet
3
+ */
4
+
5
+ body, #container {
6
+ color: #fff;
7
+ background: #1c2815 none;
8
+ }
9
+
10
+ #container {
11
+ margin: 0;
12
+ width: 100%;
13
+ font-size: 12px;
14
+ }
15
+
16
+ #frame {
17
+ margin: 0 auto;
18
+ width: 740px;
19
+ }
20
+
21
+ td {
22
+ font-family: Georgia, Times, serif;
23
+ line-height: 18px;
24
+ }
25
+
26
+ #head td {
27
+ text-align: center;
28
+ font-size: 11px;
29
+ }
30
+
31
+
32
+ #head td, #head a,
33
+ #legal td, #legal a{
34
+ color: #fff;
35
+ background: #1c2815 none;
36
+ }
37
+
38
+ #head a, #legal a { text-decoration: underline; }
39
+
40
+ #content h1 {
41
+ font-style: italic;
42
+ font-size: 24px;
43
+ }
44
+
45
+ #content td {
46
+ padding: 18px 0;
47
+ color: #666;
48
+ background: #deddc9 url("images/content_bg.jpg") repeat-y center top;
49
+ border-color: #fff;
50
+ border-style: solid;
51
+ border-width: 10px;
52
+ }
53
+
54
+ .feature {
55
+ border: 3px solid #fff;
56
+ }
57
+
58
+ img.right {
59
+ margin: 0 36px 27px;
60
+ float: right;
61
+ }
62
+
63
+
64
+ #content a {
65
+ color: #900;
66
+ background-color: transparent;
67
+ font-weight: bold;
68
+ }
69
+
70
+ #content h1,
71
+ #content td h2,
72
+ #content td p {
73
+ padding: 0 36px 9px;
74
+ }
75
+
76
+ ul.spacious li {
77
+ margin: 18px;
78
+ }
79
+
80
+ .intro {
81
+ font-size: 18px;
82
+ }
83
+
84
+ #legal td { padding-top: 27px; }
85
+
86
+ #legal p { margin: 0 36px; font-size: 11px; }
87
+
88
+ #legal a { text-decoration: underline; }
89
+
90
+ #legal .right { text-align: right; }