inline_styles_mailer 0.0.1 → 0.0.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/CHANGELOG.md +7 -0
- data/README.md +9 -5
- data/inline_styles_mailer.gemspec +1 -1
- data/lib/inline_styles_mailer/version.rb +1 -1
- metadata +13 -12
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -4,9 +4,11 @@ Using Jack Danger's excellent [Inline Styles](https://github.com/jackdanger/inli
|
|
4
4
|
|
5
5
|
The Inline Styles gem helps you embed CSS styles into your markup so that you can send pretty HTML emails that won't get butchered by email clients that strip out CSS. Or, more precisely, will help reduce the amount of butchering (even with inline CSS some styles, like background images, are often cut out).
|
6
6
|
|
7
|
+
This gem stands on the shoulder's of the [inline_styles](https://github.com/jackdanger/inline_styles) and [sass-rails](https://github.com/rails/sass-rails) gem, merely adding some code to make it more convenient to use.
|
8
|
+
|
7
9
|
## Installation
|
8
10
|
|
9
|
-
If you're using
|
11
|
+
If you're using Bundler:
|
10
12
|
|
11
13
|
```ruby
|
12
14
|
gem 'inline_styles_mailer'
|
@@ -14,7 +16,7 @@ gem 'inline_styles_mailer'
|
|
14
16
|
|
15
17
|
## Usage
|
16
18
|
|
17
|
-
If you
|
19
|
+
If you keep things simple, then it's just one line:
|
18
20
|
|
19
21
|
```ruby
|
20
22
|
class FooMailer < ActionMailer::Base
|
@@ -27,9 +29,9 @@ class FooMailer < ActionMailer::Base
|
|
27
29
|
end
|
28
30
|
```
|
29
31
|
|
30
|
-
If you have a CSS file <code>app/assets/stylesheets/
|
32
|
+
If you have a CSS file <code>app/assets/stylesheets/_foo_mailer.css.scss</code> then it will get automatically applied to the mail using the inline_styles gem. That name (<code>_foo_mailer.css.scss</code>) is based on the mailer class name, FooMailer.
|
31
33
|
|
32
|
-
Want to use a different file?
|
34
|
+
Want to use a different file? Declare <code>use_stylesheet</code>:
|
33
35
|
|
34
36
|
```ruby
|
35
37
|
class FooMailer < ActionMailer::Base
|
@@ -44,7 +46,9 @@ class FooMailer < ActionMailer::Base
|
|
44
46
|
end
|
45
47
|
```
|
46
48
|
|
47
|
-
The location of that file, and the fact that it uses [SASS](http://sass-lang.com/) is fixed at this time.
|
49
|
+
The location of that file (<code>app/assets/stylesheets/</code>), and the fact that it uses [SASS](http://sass-lang.com/) is fixed at this time.
|
50
|
+
|
51
|
+
<strong>TODO</strong>: get it to work out what sort of preprocessing, if any, to do based on the filename.
|
48
52
|
|
49
53
|
## Development
|
50
54
|
|
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = InlineStylesMailer::VERSION
|
8
8
|
s.authors = ["Bill Horsman"]
|
9
9
|
s.email = ["bill@logicalcobwebs.com"]
|
10
|
-
s.homepage = ""
|
10
|
+
s.homepage = "https://github.com/billhorsman/inline_styles_mailer"
|
11
11
|
s.summary = %q{Convenient use of inline_styles gem with Rails 3.1}
|
12
12
|
s.description = %q{Convenient use of inline_styles gem with Rails 3.1}
|
13
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_styles_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-06 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70359248851080 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70359248851080
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: inline_styles
|
27
|
-
requirement: &
|
27
|
+
requirement: &70359248840280 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70359248840280
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rails
|
38
|
-
requirement: &
|
38
|
+
requirement: &70359248839080 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '3.1'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70359248839080
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: sass-rails
|
49
|
-
requirement: &
|
49
|
+
requirement: &70359248838200 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70359248838200
|
58
58
|
description: Convenient use of inline_styles gem with Rails 3.1
|
59
59
|
email:
|
60
60
|
- bill@logicalcobwebs.com
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- .gitignore
|
66
66
|
- .rspec
|
67
67
|
- .rvmrc
|
68
|
+
- CHANGELOG.md
|
68
69
|
- Gemfile
|
69
70
|
- LICENSE
|
70
71
|
- README.md
|
@@ -79,7 +80,7 @@ files:
|
|
79
80
|
- spec/foo_mailer.rb
|
80
81
|
- spec/inline_styles_mailer/inline_styles_mailer_spec.rb
|
81
82
|
- spec/spec_helper.rb
|
82
|
-
homepage:
|
83
|
+
homepage: https://github.com/billhorsman/inline_styles_mailer
|
83
84
|
licenses: []
|
84
85
|
post_install_message:
|
85
86
|
rdoc_options: []
|
@@ -93,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
94
|
version: '0'
|
94
95
|
segments:
|
95
96
|
- 0
|
96
|
-
hash:
|
97
|
+
hash: -2803439903542406270
|
97
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
99
|
none: false
|
99
100
|
requirements:
|
@@ -102,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
103
|
version: '0'
|
103
104
|
segments:
|
104
105
|
- 0
|
105
|
-
hash:
|
106
|
+
hash: -2803439903542406270
|
106
107
|
requirements: []
|
107
108
|
rubyforge_project: inline_styles_mailer
|
108
109
|
rubygems_version: 1.8.10
|