xhtml_report_generator 3.1.0 → 3.1.1

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
2
  SHA1:
3
- metadata.gz: a3544c56a29c66abcc6c6ba3fb11ddc204b3198a
4
- data.tar.gz: aeb8c4b728b729c3d88e428297dc5f13f5871ecf
3
+ metadata.gz: ce3899bed47a5746df9f4d52760d89be86406c5a
4
+ data.tar.gz: fbbafc73adf8dfaaa48d4f85c0fa39701a623c13
5
5
  SHA512:
6
- metadata.gz: 102f3476494f50f9d96d5a735fe33ae4714d74a70f422b47c0930c613b891d724b23e5ec59624a9361cc21f3e2982bf626bea5c15d772470fc1421760802aa58
7
- data.tar.gz: f926db10047c34ddd95eaeb1a9eb7c0f0378cbfec795bc3999e4d8ce28478f813dd4284c7a4e41e97e8e15eb926aa3998eab84c0c3a15cbd96c6b9d2e12080aa
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
- _td_attrs = o[:td_attrs].clone
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
- elsif !h[:row_title].nil?
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
@@ -1,5 +1,5 @@
1
1
  module XhtmlReportGenerator
2
- VERSION = '3.1.0'
2
+ VERSION = '3.1.1'
3
3
  end
4
4
 
5
5
  # puts XhtmlReportGenerator::VERSION
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.0
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-09-30 00:00:00.000000000 Z
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