html_inline_css 0.1.5 → 0.1.6
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/LICENSE.txt +1 -1
- data/README.md +6 -5
- data/html_inline_css.gemspec +2 -1
- data/lib/html_inline_css/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d47ba20463100eb48864902018b709e5534e6f55
|
4
|
+
data.tar.gz: 435b6eceba951c0278a06c5950fa42c9c09e623d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 700b3a5a5c219939b868a11d5105aa4fb0a1f25d5911c21efd81691630c499ac5c2c4036b68bc161b6cd74e61c2246681b056fc7857d265e95fc0ff4afc01150
|
7
|
+
data.tar.gz: f3a3d892c7866577baf63b50efc1858d9d5f3d97ee64ca611008abe05ef9393e2108f111bada3d1657676337157123bec47191b24b6ba7388b2615e46e5f4dd3
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# HtmlInlineCss
|
2
2
|
|
3
|
-
This gem was created to inline css in html mails
|
4
|
-
|
3
|
+
This gem was created to inline css in html mails but can be used anywhere you want to inline css.
|
5
4
|
Be aware that the gem not yet is ready for production. Feel free to fork and build upon it yourself.
|
6
5
|
|
7
6
|
## Installation
|
@@ -23,13 +22,15 @@ Or install it yourself as:
|
|
23
22
|
## Usage
|
24
23
|
|
25
24
|
```ruby
|
26
|
-
|
27
|
-
|
25
|
+
html = "<html><head><style>div {border: 1px solid #e5e5e5;}</style></head><body><div> Foo bar </div></body></html>"
|
26
|
+
html_with_inline_css = InlineCssString::CSS.inline_css(html)
|
28
27
|
|
29
|
-
|
28
|
+
html_with_inline_css => "<div style='border:1px solid #e5e5e5;'> Foo Bar </div>"
|
30
29
|
```
|
31
30
|
|
31
|
+
```ruby
|
32
32
|
Be aware that the "InlineCssString::CSS.inline_css(string)" will remove all <html>,<head>,<style> and <body> tags.
|
33
|
+
```
|
33
34
|
|
34
35
|
## Contributing
|
35
36
|
|
data/html_inline_css.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["niiicolai@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Inline CSS}
|
13
|
-
spec.description = %q{A ruby script
|
13
|
+
spec.description = %q{A ruby script that can inline CSS on a string with html.}
|
14
14
|
spec.homepage = "https://github.com/niiicolai/html_inline_css"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
@@ -29,4 +29,5 @@ Gem::Specification.new do |spec|
|
|
29
29
|
|
30
30
|
spec.add_development_dependency "bundler", "~> 1.10"
|
31
31
|
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "nokogiri"
|
32
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html_inline_css
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolai Berg Andersen
|
@@ -38,7 +38,21 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
-
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: nokogiri
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: A ruby script that can inline CSS on a string with html.
|
42
56
|
email:
|
43
57
|
- niiicolai@gmail.com
|
44
58
|
executables: []
|