css_inline 0.10.3 → 0.10.4
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/README.md +7 -7
- data/ext/css_inline/Cargo.toml +3 -3
- data/ext/css_inline/src/lib.rs +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74d59e5067f2add7bdfaba4cfa4996d23228930b37f9291765b1f67bd76bacc2
|
4
|
+
data.tar.gz: 3dc31eb7364324ecc3de397dc8a2dd7fedb406a64c1160b5766b42fc4a824a1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e283837727353d4ce91e2d60d42cdaf7000103ea8cbc6ea83330e217a60d2572953eb6501c84376d0430be199d2dfba84213d44decb89621f6ab63189925f69d
|
7
|
+
data.tar.gz: 509885e47fb391530e675ff8c1e026348558ead1dcaab1361f52f039fe2d1d67f808d652b770213d12649cc88ba8f3db3f5a93b5e4a8653cd83817a7af1bee35
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# css_inline
|
2
2
|
|
3
|
-
[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/Stranger6667/css-inline/build.yml?style=flat-square&labelColor=555555&logo=github" height="20">](https://github.com/Stranger6667/css-inline)
|
3
|
+
[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/Stranger6667/css-inline/build.yml?style=flat-square&labelColor=555555&logo=github" height="20">](https://github.com/Stranger6667/css-inline/actions/workflows/build.yml)
|
4
4
|
[<img alt="ruby gems" src="https://img.shields.io/gem/v/css_inline?logo=ruby&style=flat-square" height="20">](https://rubygems.org/gems/css_inline)
|
5
5
|
[<img alt="codecov.io" src="https://img.shields.io/codecov/c/gh/Stranger6667/css-inline?logo=codecov&style=flat-square&token=tOzvV4kDY0" height="20">](https://app.codecov.io/github/Stranger6667/css-inline)
|
6
6
|
[<img alt="gitter" src="https://img.shields.io/gitter/room/Stranger6667/css-inline?style=flat-square" height="20">](https://gitter.im/Stranger6667/css-inline)
|
@@ -81,7 +81,7 @@ This results in faster execution times compared to employing parallel processing
|
|
81
81
|
|
82
82
|
For customization options use the `CSSInliner` class:
|
83
83
|
|
84
|
-
```
|
84
|
+
```ruby
|
85
85
|
require 'css_inline'
|
86
86
|
|
87
87
|
inliner = CSSInline::CSSInliner.new(keep_style_tags: true)
|
@@ -136,14 +136,14 @@ It consistently outperforms `premailer`, offering speed increases often exceedin
|
|
136
136
|
|
137
137
|
The table below provides a detailed comparison between `css_inline` and `premailer` when inlining CSS into an HTML document (like in the Usage section above):
|
138
138
|
|
139
|
-
| | `css_inline 0.10.
|
139
|
+
| | `css_inline 0.10.4` | `premailer 1.21.0 with Nokogiri 1.15.2` | Difference |
|
140
140
|
|-------------------|---------------------|------------------------------------------------|------------|
|
141
|
-
| Basic usage |
|
142
|
-
| Realistic email 1 |
|
143
|
-
| Realistic email 2 |
|
141
|
+
| Basic usage | 8.73 µs | 421.40 µs | **48.24x** |
|
142
|
+
| Realistic email 1 | 172.71 µs | 9.77 ms | **56.62x** |
|
143
|
+
| Realistic email 2 | 128.53 µs | Error: Cannot parse 0 calc((100% - 500px) / 2) | - |
|
144
144
|
|
145
145
|
Please refer to the `test/bench.rb` file to review the benchmark code.
|
146
|
-
The results displayed above were measured using stable `rustc 1.
|
146
|
+
The results displayed above were measured using stable `rustc 1.71.1` on Ruby `3.2.2`.
|
147
147
|
|
148
148
|
## Ruby support
|
149
149
|
|
data/ext/css_inline/Cargo.toml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
[package]
|
2
2
|
name = "css-inline-ruby"
|
3
|
-
version = "0.10.
|
4
|
-
authors = ["Dmitry Dygalo <
|
3
|
+
version = "0.10.4"
|
4
|
+
authors = ["Dmitry Dygalo <dmitry@dygalo.dev>"]
|
5
5
|
edition = "2021"
|
6
6
|
readme = "README.rdoc"
|
7
7
|
description = "High-performance library for inlining CSS into HTML 'style' attributes"
|
@@ -16,7 +16,7 @@ name = "css_inline"
|
|
16
16
|
crate-type = ["cdylib"]
|
17
17
|
|
18
18
|
[dependencies]
|
19
|
-
magnus = "0.
|
19
|
+
magnus = "0.6"
|
20
20
|
rayon = "1"
|
21
21
|
|
22
22
|
[dependencies.css-inline]
|
data/ext/css_inline/src/lib.rs
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css_inline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Dygalo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -84,7 +84,7 @@ description: |2
|
|
84
84
|
`css_inline` inlines CSS into HTML documents, using components from Mozilla's Servo project.
|
85
85
|
This process is essential for sending HTML emails as you need to use "style" attributes instead of "style" tags.
|
86
86
|
email:
|
87
|
-
-
|
87
|
+
- dmitry@dygalo.dev
|
88
88
|
executables: []
|
89
89
|
extensions:
|
90
90
|
- ext/css_inline/extconf.rb
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: 3.3.26
|
125
125
|
requirements:
|
126
126
|
- Rust >= 1.61.0
|
127
|
-
rubygems_version: 3.4.
|
127
|
+
rubygems_version: 3.4.18
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: High-performance library for inlining CSS into HTML 'style' attributes
|