proforma-prawn-renderer 1.0.0.pre.alpha → 1.0.0.pre.alpha.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
  SHA256:
3
- metadata.gz: ac74c9e31440fb51da3a35d2a83f66d4d2003bade1012dffb0607fe30317de96
4
- data.tar.gz: ca3305a73f6bd5f1f3de011b6606e8e43ef5820aac35e380282f99bf86bde3ef
3
+ metadata.gz: '0479b9058c96eae6a94f416e7bce8e7e0fb31f91bc5d3021009fc8f4a54b58d9'
4
+ data.tar.gz: 664abe0e730eb2d794d6c8b3dfd3cb03e383d2a26f0dc2c181d43e481a476836
5
5
  SHA512:
6
- metadata.gz: c570b4a567c7160b32044d7d5204ed5d967528ea776f1975cf8de54f1af5e6a94763ae6a0820010ac8855527b66eac23b7e0f8e7a1aa78aec2727e2883469d3d
7
- data.tar.gz: 3473499c3ecf5cfb7a0dd704c666aa208e107d954d78837d366936caaa4b31b8cd0086fae33151e9a99dc165cd27c6a740a238182600352b37c67790743d6bba
6
+ metadata.gz: a4f3016b95207055cff15d09ba98851b4af766bb97bd90a4880db1cd4d4f74f24318c227fb73fbc1a4d2d178981d54b7f8a70dc815c6193192a1c5bce912aeff
7
+ data.tar.gz: e6d94a0e12d694f1e12f725fff86055711688c9e0a3c3784da80ec264a26fdb0a9a5b3a78d617ea60d6a0e5f378c85734661dc01c094d1f204a21b83a2b14999
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- proforma-prawn-renderer (1.0.0.pre.alpha)
4
+ proforma-prawn-renderer (1.0.0.pre.alpha.1)
5
5
  prawn (~> 2)
6
6
  prawn-table (~> 0)
7
7
 
@@ -40,7 +40,7 @@ module Proforma
40
40
 
41
41
  def value_cell_style(column, column_index, total_columns)
42
42
  base_value_cell_style.merge(
43
- align: column.align,
43
+ align: column.align.to_s.to_sym,
44
44
  padding: value_cell_padding(column_index, total_columns)
45
45
  )
46
46
  end
@@ -14,8 +14,8 @@ module Proforma
14
14
  # This class understands how to ender a Proforma::Modeling::Table component.
15
15
  class TableRenderer < Renderer
16
16
  def render(table)
17
- row_for_widths = table.header.rows.first
18
- column_widths = row_for_widths ? make_column_widths(row_for_widths) : {}
17
+ prototype_row = table.header.rows.first
18
+ column_widths = prototype_row ? make_column_widths(prototype_row) : {}
19
19
 
20
20
  pdf.table(
21
21
  make_all_rows(table),
@@ -35,7 +35,11 @@ module Proforma
35
35
  def make_rows(section, cell_style)
36
36
  section.rows.map do |row|
37
37
  row.cells.map do |cell|
38
- pdf.make_cell(cell.text.to_s, cell_style)
38
+ immediate_style = {}.tap do |hash|
39
+ hash[:align] = cell.align.to_s.to_sym
40
+ end
41
+
42
+ pdf.make_cell(cell.text.to_s, cell_style.merge(immediate_style))
39
43
  end
40
44
  end
41
45
  end
@@ -9,6 +9,6 @@
9
9
 
10
10
  module Proforma
11
11
  class PrawnRenderer
12
- VERSION = '1.0.0-alpha'
12
+ VERSION = '1.0.0-alpha.1'
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proforma-prawn-renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha
4
+ version: 1.0.0.pre.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ruggio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-20 00:00:00.000000000 Z
11
+ date: 2019-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prawn