inky-rb 1.3.7.4 → 1.3.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +3 -0
- data/lib/inky.rb +1 -0
- data/lib/inky/component_factory.rb +7 -2
- data/lib/inky/rails/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c7f7e3344abd0ff825ff02d118f014a8676c4e150753e6e9096ccdadef07eac8
|
4
|
+
data.tar.gz: 3c43d307498731879e123ce50baebe9b71e0c203274a495d4ba158ffd0f6c510
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 940a14e38d002673c933da78a80aef9b68adb2a77bf4a243f8cdb134e50a9342e3606c2005792c0411cff79fffa269a711dcf639aad51036481f066630291b24
|
7
|
+
data.tar.gz: f9b791e61f0f3a4f78a34460f3128dc127c5d067c94e09508f70d8310c6a9af5e8558e81b39fd6b2d7a3202ab54a9f9dbd54510aa81aa7198b58fa8e15e48941
|
data/.rubocop.yml
CHANGED
data/lib/inky.rb
CHANGED
@@ -12,6 +12,11 @@ module Inky
|
|
12
12
|
tags = tags.to_set if tags.respond_to? :to_set
|
13
13
|
IGNORED_ON_PASSTHROUGH = tags.freeze
|
14
14
|
|
15
|
+
# These constants are used to circumvent an issue with JRuby Nokogiri.
|
16
|
+
# For more details see https://github.com/zurb/inky-rb/pull/94
|
17
|
+
INTERIM_TH_TAG = 'inky-interim-th'.freeze
|
18
|
+
INTERIM_TH_TAG_REGEX = %r{(?<=\<|\<\/)#{Regexp.escape(INTERIM_TH_TAG)}}
|
19
|
+
|
15
20
|
def _pass_through_attributes(elem)
|
16
21
|
elem.attributes.reject { |e| IGNORED_ON_PASSTHROUGH.include?(e.downcase) }.map do |name, value|
|
17
22
|
%{#{name}="#{value}" }
|
@@ -60,7 +65,7 @@ module Inky
|
|
60
65
|
def _transform_menu_item(component, inner)
|
61
66
|
target = _target_attribute(component)
|
62
67
|
attributes = _combine_attributes(component, 'menu-item')
|
63
|
-
%{
|
68
|
+
%{<#{INTERIM_TH_TAG} #{attributes}><a href="#{component.attr('href')}"#{target}>#{inner}</a></#{INTERIM_TH_TAG}>}
|
64
69
|
end
|
65
70
|
|
66
71
|
def _transform_container(component, inner)
|
@@ -91,7 +96,7 @@ module Inky
|
|
91
96
|
subrows = component.elements.css(".row").to_a.concat(component.elements.css("row").to_a)
|
92
97
|
expander = %{<th class="expander"></th>} if large_size.to_i == column_count && subrows.empty?
|
93
98
|
|
94
|
-
%{
|
99
|
+
%{<#{INTERIM_TH_TAG} class="#{classes}" #{_pass_through_attributes(component)}><table><tr><th>#{inner}</th>#{expander}</tr></table></#{INTERIM_TH_TAG}>}
|
95
100
|
end
|
96
101
|
|
97
102
|
def _transform_block_grid(component, inner)
|
data/lib/inky/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inky-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.7.
|
4
|
+
version: 1.3.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ZURB
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foundation_emails
|
@@ -293,8 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: '0'
|
295
295
|
requirements: []
|
296
|
-
|
297
|
-
rubygems_version: 2.6.13
|
296
|
+
rubygems_version: 3.0.3
|
298
297
|
signing_key:
|
299
298
|
specification_version: 4
|
300
299
|
summary: Inky is an HTML-based templating language that converts simple HTML into
|