mjml-rb 0.2.34 → 0.2.35

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bae58d9f87e82dc3c39bd0c9fca4949bb2a953cf8e22a2dd56fa2d5ff057a566
4
- data.tar.gz: b892f3ed57cf49cf3935a60cd8abef4f232544b0bb2abf2999ef5a557b49849f
3
+ metadata.gz: e9c0aec079dca1d68d66f5530f699398aa09703219b750945dde850c519f20de
4
+ data.tar.gz: ef9c027b625aa1e5f6000ec8f574472f8f38590e7013812be64d7b469f138e94
5
5
  SHA512:
6
- metadata.gz: 320fa67da655fcb902557e784e8f1411ab94316b0c1d9e18b2890a6e25fba015ce159fe8ae6e404fbfa60273c9db3a0fdb45320abc9d72eba19a7eff8867706a
7
- data.tar.gz: e6e3176e0c1cf87791bac2625ea520c339a4059f9ef474b74e16cc2ffd6bd8c1664caa35bd429e2c963d4f39167051fbaf7e391669d44cec93e7788664e5d519
6
+ metadata.gz: c41b2a470fad579dc02b752577625b8008d04f00ae24404242eb846f24b02fadd2bd8154474fbe1336d707819253b705326a59d97af7047d4b99d8af8d2b7b73
7
+ data.tar.gz: f2ee9e775a83778c2ee2712505956bc2515198f5bc886aea0c4137844d24b2cd3782b7a38a4c42826c34c86d214f4e8105dcdfc5a8fcdcae85d9d7cf42ce8a7d
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
+
5
+ gem "minitest", group: :test
data/README.md CHANGED
@@ -46,4 +46,4 @@ bundle exec bin/mjml --migrate old.mjml -s
46
46
  > MJML templates the same way you render ERB — no extra runtime, no
47
47
  > `package.json`, no `node_modules`.
48
48
 
49
- Remaining parity work is tracked in [doc/TODO.md](/doc/TODO.md).
49
+ Remaining parity work is tracked in [npm ↔ Ruby Parity Audit](/docs/PARITY_AUDIT.md).
@@ -27,7 +27,11 @@ module MjmlRb
27
27
  HTML_VOID_TAGS = %w[area base br col embed hr img input link meta param source track wbr].freeze
28
28
 
29
29
  DEFAULT_FONTS = {
30
- "Roboto" => "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700"
30
+ "Open Sans" => "https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,700",
31
+ "Droid Sans" => "https://fonts.googleapis.com/css?family=Droid+Sans:300,400,500,700",
32
+ "Lato" => "https://fonts.googleapis.com/css?family=Lato:300,400,500,700",
33
+ "Roboto" => "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700",
34
+ "Ubuntu" => "https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700"
31
35
  }.freeze
32
36
 
33
37
  DOCUMENT_RESET_CSS = <<~CSS.freeze
@@ -114,7 +118,7 @@ module MjmlRb
114
118
  media_queries_tags = build_media_queries_tags(context[:breakpoint], context[:column_widths])
115
119
  component_styles_tag = build_style_tag(unique_strings(context[:component_head_styles]))
116
120
  user_styles_tag = build_style_tag(unique_strings(context[:user_styles]))
117
- preview_block = preview.empty? ? "" : %(<div style="display:none;max-height:0;overflow:hidden;opacity:0;">#{escape_html(preview)}</div>)
121
+ preview_block = preview.empty? ? "" : %(<div style="display:none;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">#{escape_html(preview)}</div>)
118
122
  html_attributes = {
119
123
  "lang" => context[:lang],
120
124
  "dir" => context[:dir],
@@ -122,7 +126,10 @@ module MjmlRb
122
126
  "xmlns:v" => "urn:schemas-microsoft-com:vml",
123
127
  "xmlns:o" => "urn:schemas-microsoft-com:office:office"
124
128
  }
125
- body_style = style_join("word-spacing" => "normal")
129
+ body_style = style_join(
130
+ "word-spacing" => "normal",
131
+ "background-color" => context[:background_color]
132
+ )
126
133
 
127
134
  html = <<~HTML
128
135
  <!doctype html>
@@ -1,3 +1,3 @@
1
1
  module MjmlRb
2
- VERSION = "0.2.34".freeze
2
+ VERSION = "0.2.35".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mjml-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.34
4
+ version: 0.2.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Andriichuk