xhtml_report_generator 3.1.0 → 3.1.1
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/lib/xhtml_report_generator/custom.rb +9 -2
- data/lib/xhtml_report_generator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce3899bed47a5746df9f4d52760d89be86406c5a
|
4
|
+
data.tar.gz: fbbafc73adf8dfaaa48d4f85c0fa39701a623c13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb379c087b9e0d94f7e77a6b01c3852d29523832329e889aaf36ae2a656861e9ac6f6d1f8d88e8c996afe548edf73045ec1204d83a86b9245620d6e232ef923b
|
7
|
+
data.tar.gz: 369d5b373277e4c198f608c88bee07ac4dd871e8cbaecc1d1a8b3e8d5a4816a39e50192d2bef9a0c8c4554d811bfa4e03a787a77ac18c3022f36f296f101247a
|
@@ -416,8 +416,10 @@ module Custom
|
|
416
416
|
elsif ((i == 0 || j ==0) && (0x3 & o[:headers])==0x3)
|
417
417
|
col = row.add_element("th", o[:th_attrs])
|
418
418
|
else
|
419
|
-
|
419
|
+
# we need to deepcopy the attributes
|
420
|
+
_td_attrs = Marshal.load(Marshal.dump(o[:td_attrs]))
|
420
421
|
|
422
|
+
# check all special criteria
|
421
423
|
o[:special].each do |h|
|
422
424
|
# check if the current cell is a candidate for special
|
423
425
|
if !h[:col_index].nil?
|
@@ -436,13 +438,18 @@ module Custom
|
|
436
438
|
elsif h[:row_index].is_a?(Integer)
|
437
439
|
next if (h[:row_index] != i) # skip if not at index
|
438
440
|
end
|
439
|
-
|
441
|
+
elsif !h[:row_title].nil?
|
440
442
|
next if !row_titles[i].match(h[:row_title])
|
441
443
|
end
|
442
444
|
|
443
445
|
# here we are a candidate for special, so we check if we meet the condition
|
446
|
+
# puts h[:attributes].inspect
|
447
|
+
# puts "cell value row #{i} col #{j}: #{table_data[i][j]}"
|
448
|
+
# puts h[:condition].call(table_data[i][j]).inspect
|
444
449
|
if h[:condition].call(table_data[i][j])
|
445
450
|
h[:attributes].each { |attr, val|
|
451
|
+
# debug, verify deepcopy
|
452
|
+
# puts "objects are equal: #{_td_attrs[attr].equal?(o[:td_attrs][attr])}"
|
446
453
|
if !_td_attrs[attr].nil?
|
447
454
|
# assume the existing attribute is a string (other types don't make much sense for html)
|
448
455
|
_td_attrs[attr] << val
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xhtml_report_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Widmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: "The generator can be used to create html or xhtml files. It comes with
|
14
14
|
many utility functions.\n \nThe javascript to render the table of contents, the
|