bootstrap-email 1.0.0.alpha3.1 → 1.0.0.alpha4

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: 75655e6d12a24abed3f9cf4fee65bc198210d1e9289196b8df80bd53791c21b2
4
- data.tar.gz: 365aedf89fa3f0818ecb6808762d75045855e542172d5ad3440cb5c69dbdc748
3
+ metadata.gz: 56d39a3ac5d5ab4d55c407432aa0cc9145a259b6b256de499a9cbfdadaf927f5
4
+ data.tar.gz: 9d14f30d758ca9db6f33c3bac05bc5a09027039be8b52e2e452c6b4bd0100f3c
5
5
  SHA512:
6
- metadata.gz: 80c34ce66af8e2024fa3547a08c1ec4330ddf77c7e25297753edd164b54586f811c19b2722df572f296fa006227b950c0803e7769fc7a523ed4cba0c1bc451d1
7
- data.tar.gz: 38b53f2516bbd1f46fea866b06170174d89333f7d8b44a42bb36d7220af717ae97ab0e9967898ded0544584d120b59bde6d22c78023e562c1254460db6c7c9f0
6
+ metadata.gz: 462b7d5c6ab1b834d9973c12161e870d0b283cba5f435a42f3633fad517aa32667eda4876b4cf0f068b4d068a5db95e8c53d90c887f2e2b0e067cf3c23ce08eb
7
+ data.tar.gz: 2d1cdd1c3e5c7782f36056befd955b82d8a6e6a8c09ea2c3305fdb8be2f3a2383ceac7dd7e40dd9bd890ee8435fb2c7c79e3e0ce6ba2f2c3c8cffbb5e496c297
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.alpha3.1
1
+ 1.0.0.alpha4
@@ -1,6 +1,6 @@
1
1
  @each $space, $value in $spacers {
2
- table.stack-x.gap-#{$space},
3
- table.stack-x.gap-lg-#{$space} {
2
+ table.stack-row.gap-#{$space},
3
+ table.stack-row.gap-lg-#{$space} {
4
4
  & > tbody > tr > td {
5
5
  padding-right: $value;
6
6
  &:last-child {
@@ -8,8 +8,8 @@
8
8
  }
9
9
  }
10
10
  }
11
- table.stack-y.gap-#{$space},
12
- table.stack-y.gap-lg-#{$space} {
11
+ table.stack-col.gap-#{$space},
12
+ table.stack-col.gap-lg-#{$space} {
13
13
  & > tbody > tr {
14
14
  & > td {
15
15
  padding-bottom: $value;
@@ -27,13 +27,13 @@
27
27
  }
28
28
 
29
29
  @each $align in $vertical-align {
30
- table.stack-valign-#{$align} > tbody > tr > td {
30
+ table.stack-ay-#{$align} > tbody > tr > td {
31
31
  vertical-align: $align;
32
32
  }
33
33
  }
34
34
 
35
35
  @each $align in $text-align {
36
- table.stack-align-#{$align} > tbody > tr > td {
36
+ table.stack-ax-#{$align} > tbody > tr > td {
37
37
  text-align: $align;
38
38
  }
39
39
  }
@@ -1,5 +1,5 @@
1
1
  @each $align in $vertical-align {
2
- @include valign-util('.valign-#{$align}') {
2
+ @include valign-util('.ay-#{$align}') {
3
3
  vertical-align: $align !important;
4
4
  }
5
5
  }
@@ -15,7 +15,6 @@ if defined?(Rails)
15
15
  require 'action_mailer'
16
16
  end
17
17
 
18
- require_relative 'bootstrap-email/initialize'
19
18
  require_relative 'bootstrap-email/config'
20
19
  require_relative 'bootstrap-email/setup'
21
20
  require_relative 'bootstrap-email/erb'
@@ -48,6 +48,8 @@ module BootstrapEmail
48
48
  html,
49
49
  with_html_string: true,
50
50
  preserve_reset: false,
51
+ adapter: :nokogiri_fast,
52
+ output_encoding: 'US-ASCII',
51
53
  css_string: css_string
52
54
  )
53
55
  self.doc = premailer.doc
@@ -82,13 +84,13 @@ module BootstrapEmail
82
84
  end
83
85
 
84
86
  def configure_html!
85
- BootstrapEmail::Converter::ForceEncoding.build(doc)
86
87
  BootstrapEmail::Converter::HeadStyle.build(doc)
87
88
  BootstrapEmail::Converter::VersionComment.build(doc)
88
89
  end
89
90
 
90
91
  def finalize_document!
91
- html = BootstrapEmail::Converter::ForceEncoding.replace(doc.to_html)
92
+ html = doc.to_html(encoding: 'US-ASCII')
93
+ html = BootstrapEmail::Converter::ForceEncoding.replace(html)
92
94
  case type
93
95
  when :rails
94
96
  (@mail.html_part || @mail).body = html
@@ -3,7 +3,7 @@ module BootstrapEmail
3
3
  class Align < Base
4
4
  def build
5
5
  ['left', 'center', 'right'].each do |type|
6
- full_type = "align-#{type}"
6
+ full_type = "ax-#{type}"
7
7
  each_node(".#{full_type}") do |node|
8
8
  align_helper(node, full_type, type)
9
9
  end
@@ -1,15 +1,13 @@
1
1
  module BootstrapEmail
2
2
  module Converter
3
3
  class ForceEncoding < Base
4
- def build
5
- body = doc.at_css('body')
6
- body.add_child('<force-encoding></force-encoding>')
7
- end
8
-
9
4
  def self.replace(html)
10
5
  # force utf-8 character encoded in iOS Mail: https://github.com/bootstrap-email/bootstrap-email/issues/50
11
- # this needs to be done after the document has been outputted to a string so it doesn't get converted
12
- html.sub('<force-encoding></force-encoding>', '<div id="force-encoding-to-utf-8" style="display: none;">&#10175;</div>')
6
+ # this needs to be done after the document has been outputted to a ascii string so it doesn't get converted
7
+ html.sub(
8
+ '<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">',
9
+ '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'
10
+ )
13
11
  end
14
12
  end
15
13
  end
@@ -2,12 +2,12 @@ module BootstrapEmail
2
2
  module Converter
3
3
  class Stack < Base
4
4
  def build
5
- stack_x
6
- stack_y
5
+ stack_row
6
+ stack_col
7
7
  end
8
8
 
9
- def stack_x
10
- each_node('.stack-x') do |node|
9
+ def stack_row
10
+ each_node('.stack-row') do |node|
11
11
  html = ''
12
12
  node.xpath('./*').each do |child|
13
13
  html += template('td', classes: 'stack-cell', contents: child.to_html)
@@ -16,8 +16,8 @@ module BootstrapEmail
16
16
  end
17
17
  end
18
18
 
19
- def stack_y
20
- each_node('.stack-y') do |node|
19
+ def stack_col
20
+ each_node('.stack-col') do |node|
21
21
  html = ''
22
22
  node.xpath('./*').each do |child|
23
23
  html += template('tr', classes: 'stack-cell', contents: child.to_html)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-email
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha3.1
4
+ version: 1.0.0.alpha4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Yamartino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-14 00:00:00.000000000 Z
11
+ date: 2021-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -129,7 +129,6 @@ files:
129
129
  - lib/bootstrap-email/converters/table.rb
130
130
  - lib/bootstrap-email/converters/version_comment.rb
131
131
  - lib/bootstrap-email/erb.rb
132
- - lib/bootstrap-email/initialize.rb
133
132
  - lib/bootstrap-email/rails/action_mailer.rb
134
133
  - lib/bootstrap-email/rails/engine.rb
135
134
  - lib/bootstrap-email/sass_cache.rb
@@ -1 +0,0 @@
1
- Premailer::Adapter.use = :nokogiri_fast