spree_html_email 0.70.1 → 0.70.2

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.
data/README.md CHANGED
@@ -1,20 +1,9 @@
1
- SpreeHtmlEmail
1
+ Spree Html Email
2
2
  ==============
3
3
 
4
- Introduction goes here.
4
+ Adds HTML Email support to Spree.
5
5
 
6
+ Provides an html layout for all emails and html templates for all of Spree's built in emails. Uses the premailer-rails3 gem to inline CSS which works better for a lot of mail client (i.e. gmail).
6
7
 
7
- Example
8
- =======
9
8
 
10
- Example goes here.
11
-
12
- Testing
13
- -------
14
-
15
- Be sure to add the rspec-rails gem to your Gemfile and then create a dummy test app for the specs to run against.
16
-
17
- $ bundle exec rake test app
18
- $ bundle exec rspec spec
19
-
20
- Copyright (c) 2011 [name of extension creator], released under the New BSD License
9
+ Copyright (c) 2011 Joshua Nussbaum, released under the New BSD License
@@ -1,7 +1,8 @@
1
1
  !!! html
2
2
  %html
3
3
  %head
4
- %link{:rel => 'stylesheet', :type => 'text/css', :media => 'screen', :href => "http://#{Spree::Config[:site_url] }#{asset_path('email/screen')}"}
4
+ %style{:type => 'text/css'}
5
+ = render 'shared/email/stylesheet'
5
6
  %body
6
7
  #wrapper
7
8
  %header
@@ -1 +1,2 @@
1
- = link_to(image_tag("http://#{Spree::Config[:site_url]}#{ image_path(Spree::Config[:logo]) }"), "http://#{ Spree::Config[:site_url] }")
1
+ #logo
2
+ = link_to(image_tag("http://#{Spree::Config[:site_url]}#{ asset_path(Spree::Config[:logo]) }"), "http://#{ Spree::Config[:site_url] }")
@@ -0,0 +1,119 @@
1
+ :sass
2
+ $background-color: #15D
3
+ $border-color: #AAA
4
+ $text-color: #222
5
+ $box-shadow-color: #665
6
+ $table-border: 1px solid #ccc
7
+ $table-row-alt-color: #eee
8
+ $table-row-divider: 1px solid #DDD
9
+
10
+ body
11
+ font-family: sans-serif
12
+ background: $background-color
13
+ color: $text-color
14
+
15
+ a
16
+ color: $text-color
17
+ font-weight: bold
18
+
19
+ h1, h2, h3, h4
20
+ font-weight: bold
21
+ color: $background-color
22
+
23
+ h1
24
+ font-size: 22px
25
+ margin: 10px 0
26
+
27
+ p
28
+ margin: 10px 0
29
+
30
+ header
31
+ #logo
32
+
33
+ #wrapper
34
+ margin: 0px auto 30px
35
+ width: 600px
36
+ background: white
37
+ padding: 20px 40px 40px
38
+ box-shadow: 4px 5px 4px $box-shadow-color
39
+
40
+ footer
41
+ font-size: 11px
42
+
43
+ table
44
+ display: table
45
+ border: $table-border
46
+ border-right-color: $border-color
47
+ border-bottom-color: $border-color
48
+ width: 100%
49
+ border-collapse: collapse
50
+ margin-bottom: 5px
51
+
52
+ .number
53
+ text-align: right
54
+ min-width: 45px
55
+
56
+ th
57
+ background: $background-color
58
+ color: white
59
+ padding: 7px 10px
60
+ text-shadow: $text-color 1px 1px 0px
61
+ font-weight: bold
62
+
63
+ tr.alt td
64
+ background: $table-row-alt-color
65
+
66
+ td
67
+ border-bottom: $table-row-divider
68
+ padding: 6px 10px
69
+
70
+ &.name
71
+ min-width: 180px
72
+
73
+ &.title, &.subtotal
74
+ font-weight: bold
75
+
76
+ table.split
77
+ td
78
+ width: 50%
79
+
80
+ #order_total
81
+ font-weight: bold
82
+
83
+ #subtotal-row td, #order-total td
84
+ border-top: solid 1px $border-color
85
+
86
+ #addresses
87
+ width: 600px
88
+
89
+ .address
90
+ width: 292px
91
+
92
+ &#billing
93
+ float: left
94
+
95
+ &#shipping
96
+ float: right
97
+
98
+
99
+
100
+ .address
101
+ margin: 10px 0
102
+ border: $table-border
103
+ border-right-color: $border-color
104
+ border-bottom-color: $border-color
105
+
106
+ h2
107
+ font-size: 16px
108
+ display: block
109
+ margin: 0
110
+ padding: 8px
111
+ background: $background-color
112
+ color: white
113
+ text-shadow: $text-color 1px 1px 0px
114
+
115
+ .details
116
+ padding: 10px
117
+
118
+ .full-name
119
+ font-weight: bold
@@ -1,2 +1,3 @@
1
1
  require 'spree_core'
2
2
  require 'spree_html_email/engine'
3
+ require 'premailer-rails3'
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_html_email'
5
- s.version = '0.70.1'
5
+ s.version = '0.70.2'
6
6
  s.summary = 'HTML email support for Spree'
7
7
  s.description = "Provides html email templates for all Spree's outgoing emails"
8
8
  s.required_ruby_version = '>= 1.8.7'
@@ -17,9 +17,8 @@ Gem::Specification.new do |s|
17
17
  s.requirements << 'none'
18
18
 
19
19
  s.add_dependency 'spree_core', '>= 0.70.0'
20
- s.add_dependency 'spree_auth', '>= 0.70.0'
21
- s.add_dependency 'sass-rails', '>= 3.1.0'
22
20
  s.add_dependency 'haml-rails', '>= 0.3'
21
+ s.add_dependency 'premailer-rails3', '~> 1.0.1'
23
22
 
24
23
  s.add_development_dependency 'rspec-rails'
25
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_html_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.70.1
4
+ version: 0.70.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-11 00:00:00.000000000Z
12
+ date: 2012-01-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
16
- requirement: &80372960 !ruby/object:Gem::Requirement
16
+ requirement: &88396500 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,43 +21,32 @@ dependencies:
21
21
  version: 0.70.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *80372960
24
+ version_requirements: *88396500
25
25
  - !ruby/object:Gem::Dependency
26
- name: spree_auth
27
- requirement: &80372360 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: 0.70.0
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *80372360
36
- - !ruby/object:Gem::Dependency
37
- name: sass-rails
38
- requirement: &80371830 !ruby/object:Gem::Requirement
26
+ name: haml-rails
27
+ requirement: &88396270 !ruby/object:Gem::Requirement
39
28
  none: false
40
29
  requirements:
41
30
  - - ! '>='
42
31
  - !ruby/object:Gem::Version
43
- version: 3.1.0
32
+ version: '0.3'
44
33
  type: :runtime
45
34
  prerelease: false
46
- version_requirements: *80371830
35
+ version_requirements: *88396270
47
36
  - !ruby/object:Gem::Dependency
48
- name: haml-rails
49
- requirement: &80359030 !ruby/object:Gem::Requirement
37
+ name: premailer-rails3
38
+ requirement: &88396040 !ruby/object:Gem::Requirement
50
39
  none: false
51
40
  requirements:
52
- - - ! '>='
41
+ - - ~>
53
42
  - !ruby/object:Gem::Version
54
- version: '0.3'
43
+ version: 1.0.1
55
44
  type: :runtime
56
45
  prerelease: false
57
- version_requirements: *80359030
46
+ version_requirements: *88396040
58
47
  - !ruby/object:Gem::Dependency
59
48
  name: rspec-rails
60
- requirement: &80358590 !ruby/object:Gem::Requirement
49
+ requirement: &88395850 !ruby/object:Gem::Requirement
61
50
  none: false
62
51
  requirements:
63
52
  - - ! '>='
@@ -65,7 +54,7 @@ dependencies:
65
54
  version: '0'
66
55
  type: :development
67
56
  prerelease: false
68
- version_requirements: *80358590
57
+ version_requirements: *88395850
69
58
  description: Provides html email templates for all Spree's outgoing emails
70
59
  email: joshnuss@gmail.com
71
60
  executables: []
@@ -81,13 +70,6 @@ files:
81
70
  - README.md
82
71
  - Rakefile
83
72
  - Versionfile
84
- - app/assets/javascripts/admin/spree_html_email.js
85
- - app/assets/javascripts/store/spree_html_email.js
86
- - app/assets/stylesheets/admin/spree_html_email.css
87
- - app/assets/stylesheets/email/email.css.sass
88
- - app/assets/stylesheets/email/reset.css.sass
89
- - app/assets/stylesheets/email/screen.css
90
- - app/assets/stylesheets/store/spree_html_email.css
91
73
  - app/mailers/order_mailer_decorator.rb
92
74
  - app/mailers/shipment_mailer_decorator.rb
93
75
  - app/mailers/user_mailer_decorator.rb
@@ -99,6 +81,7 @@ files:
99
81
  - app/views/shared/email/_header.html.haml
100
82
  - app/views/shared/email/_order_details.html.haml
101
83
  - app/views/shared/email/_shipment_details.html.haml
84
+ - app/views/shared/email/_stylesheet.html.haml
102
85
  - app/views/shipment_mailer/shipped_email.html.haml
103
86
  - app/views/user_mailer/reset_password_instructions.html.haml
104
87
  - config/locales/en.yml
@@ -1 +0,0 @@
1
- //= require admin/spree_core
@@ -1 +0,0 @@
1
- //= require store/spree_core
@@ -1,3 +0,0 @@
1
- /*
2
- *= require admin/spree_core
3
- */
@@ -1,115 +0,0 @@
1
- $background-color: #15D
2
- $border-color: #AAA
3
- $text-color: #222
4
- $box-shadow-color: #665
5
- $table-border: 1px solid #ccc
6
- $table-row-alt-color: #eee
7
- $table-row-divider: 1px solid #DDD
8
-
9
- body
10
- font-family: sans-serif
11
- background: $background-color
12
- color: $text-color
13
-
14
- a
15
- color: $text-color
16
- font-weight: bold
17
-
18
- h1, h2, h3, h4
19
- font-weight: bold
20
- color: $background-color
21
-
22
- h1
23
- font-size: 22px
24
- margin: 10px 0
25
-
26
- p
27
- margin: 10px 0
28
-
29
- #wrapper
30
- margin: 0px auto 30px
31
- width: 600px
32
- background: white
33
- padding: 20px 40px 40px
34
- box-shadow: 4px 5px 4px $box-shadow-color
35
- border-radius: 0 0px 4px
36
-
37
- footer
38
- font-size: 11px
39
-
40
- table
41
- display: table
42
- border: $table-border
43
- border-right-color: $border-color
44
- border-bottom-color: $border-color
45
- width: 100%
46
-
47
- .number
48
- text-align: right
49
- min-width: 45px
50
-
51
- th
52
- background: $background-color
53
- color: white
54
- padding: 7px 10px
55
- text-shadow: $text-color 1px 1px 0px
56
- font-weight: bold
57
-
58
- tr.alt td
59
- background: $table-row-alt-color
60
-
61
- td
62
- border-bottom: $table-row-divider
63
- padding: 6px 10px
64
- border-style: inset
65
-
66
- &.name
67
- min-width: 180px
68
-
69
- &.title, &.subtotal
70
- font-weight: bold
71
-
72
- table.split
73
- td
74
- width: 50%
75
-
76
- #order_total
77
- font-weight: bold
78
-
79
- #subtotal-row td, #order-total td
80
- border-top: solid 1px $border-color
81
-
82
- #addresses
83
- width: 600px
84
-
85
- .address
86
- width: 292px
87
-
88
- &#billing
89
- float: left
90
-
91
- &#shipping
92
- float: right
93
-
94
-
95
-
96
- .address
97
- margin: 10px 0
98
- border: $table-border
99
- border-right-color: $border-color
100
- border-bottom-color: $border-color
101
-
102
- h2
103
- font-size: 16px
104
- display: block
105
- margin: 0
106
- padding: 8px
107
- background: $background-color
108
- color: white
109
- text-shadow: $text-color 1px 1px 0px
110
-
111
- .details
112
- padding: 10px
113
-
114
- .full-name
115
- font-weight: bold
@@ -1,20 +0,0 @@
1
- html, body, div, form, fieldset, legend, label
2
- margin: 0
3
- padding: 0
4
-
5
- table
6
- border-collapse: collapse
7
- border-spacing: 0
8
-
9
- th, td
10
- text-align: left
11
- vertical-align: top
12
-
13
- h1, h2, h3, h4, h5, h6, th, td, caption
14
- font-weight: normal
15
-
16
- img
17
- border: 0
18
-
19
- header, footer, section
20
- display: block
@@ -1,4 +0,0 @@
1
- /*
2
- *= require email/reset
3
- *= require email/email
4
- */
@@ -1,3 +0,0 @@
1
- /*
2
- *= require store/spree_core
3
- */