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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 11e20b7691dbedbdf57290098bb3c04de1661229
4
- data.tar.gz: a31e9746597220dcf68b68597d6f403065d03f27
2
+ SHA256:
3
+ metadata.gz: c7f7e3344abd0ff825ff02d118f014a8676c4e150753e6e9096ccdadef07eac8
4
+ data.tar.gz: 3c43d307498731879e123ce50baebe9b71e0c203274a495d4ba158ffd0f6c510
5
5
  SHA512:
6
- metadata.gz: 2584dea335782a7d206f500fbf4f9c4f167e619980b95c2ccb50bcc4796d471d308a1d372c2e3a13ea6eff0075d73394f647e3fb9755a0e5f89e66b2be37ac52
7
- data.tar.gz: 33324d1b9d50d358dee7ab497f98754f8ea1e911815f771e8138551190f82882432710d15f63c95c3ba0e5fe0f1393727201e29004daf58b88e340483d6f34e1
6
+ metadata.gz: 940a14e38d002673c933da78a80aef9b68adb2a77bf4a243f8cdb134e50a9342e3606c2005792c0411cff79fffa269a711dcf639aad51036481f066630291b24
7
+ data.tar.gz: f9b791e61f0f3a4f78a34460f3128dc127c5d067c94e09508f70d8310c6a9af5e8558e81b39fd6b2d7a3202ab54a9f9dbd54510aa81aa7198b58fa8e15e48941
@@ -153,5 +153,8 @@ Metrics/BlockLength:
153
153
  - 'Rakefile'
154
154
  - 'spec/**/*.rb'
155
155
 
156
+ Style/MutableConstant:
157
+ Enabled: false
158
+
156
159
  Style/Encoding:
157
160
  Enabled: false
@@ -40,6 +40,7 @@ module Inky
40
40
  html = Nokogiri::HTML.public_send(parse_cmd, str)
41
41
  transform_doc(html)
42
42
  string = html.to_html
43
+ string.gsub!(INTERIM_TH_TAG_REGEX, 'th')
43
44
  Inky::Core.re_inject_raws(string, raws)
44
45
  end
45
46
 
@@ -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
- %{<th #{attributes}><a href="#{component.attr('href')}"#{target}>#{inner}</a></th>}
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
- %{<th class="#{classes}" #{_pass_through_attributes(component)}><table><tr><th>#{inner}</th>#{expander}</tr></table></th>}
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)
@@ -1,6 +1,6 @@
1
1
  module Inky
2
2
  module Rails
3
- VERSION = '1.3.7.4'.freeze
3
+ VERSION = '1.3.7.5'.freeze
4
4
  end
5
5
  NODE_VERSION, GEM_VERSION = Rails::VERSION.rpartition('.').map(&:freeze)
6
6
  end
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
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-02-27 00:00:00.000000000 Z
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
- rubyforge_project:
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