docx-builder 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/Gemfile.lock +1 -1
- data/lib/docx/builder/version.rb +1 -1
- data/lib/docx/utils.rb +2 -0
- data/templates/table.xml.erb +59 -57
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c674153401f4e42ab67eccc7a50a19e1bfafb922811c41a84ad6852b5e964e5
|
4
|
+
data.tar.gz: 222cc137ca19121929f605707dac66b229b7bb978b121ae831b71c050d53c789
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 654f026cd5a8703bf57cfa187271e439d2f207544728cf6be0f5c4c40d1df500821d2469ca93d045cff3002c6f9d9583407a8d81e1ff661fca31c5430af6a373
|
7
|
+
data.tar.gz: 6132bca8810e80e20599d5125c59e5f946a0373d7c527f41e95b2827d2a955f5fb0ef87f25ae22f91cf91c59021fdf154799011c3584c83c9c08af8c2fa21423
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
data/lib/docx/builder/version.rb
CHANGED
data/lib/docx/utils.rb
CHANGED
data/templates/table.xml.erb
CHANGED
@@ -1,54 +1,19 @@
|
|
1
|
-
|
2
|
-
<w:
|
3
|
-
<w:
|
4
|
-
|
5
|
-
|
6
|
-
<w:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<w:trPr>
|
18
|
-
<w:trHeight w:val="315"/>
|
19
|
-
</w:trPr>
|
20
|
-
<% data[:columns].each do |column| %>
|
21
|
-
<w:tc>
|
22
|
-
<w:tcPr>
|
23
|
-
<w:tcW w:w="<%= (column[:width].to_f / 100) * data[:table_width].to_i * 15 %>" w:type="dxa"/>
|
24
|
-
<w:tcBorders>
|
25
|
-
<w:top w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
26
|
-
<w:left w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
27
|
-
<w:bottom w:val="single" w:sz="8" w:space="0" w:color="000000"/>
|
28
|
-
<w:right w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
29
|
-
</w:tcBorders>
|
30
|
-
<w:vAlign w:val="center"/>
|
31
|
-
</w:tcPr>
|
32
|
-
<w:p w:rsidR="00080F99" w:rsidRPr="00E71341" w:rsidRDefault="00080F99" w:rsidP="00E653AF">
|
33
|
-
<w:pPr>
|
34
|
-
<w:jc w:val="center"/>
|
35
|
-
</w:pPr>
|
36
|
-
<w:r w:rsidRPr="00E71341">
|
37
|
-
<w:rPr>
|
38
|
-
<w:rFonts w:ascii="<%= data[:font_family] %>" w:hAnsi="<%= data[:font_family] %>" w:cs="<%= data[:font_family] %>"/>
|
39
|
-
<w:b/>
|
40
|
-
<w:bCs/>
|
41
|
-
<w:color w:val="000000"/>
|
42
|
-
<w:lang w:val="pt-BR" w:eastAsia="pt-BR"/>
|
43
|
-
<w:sz w:val="<%= data[:font_size].to_i * 2 %>" />
|
44
|
-
</w:rPr>
|
45
|
-
<w:t><%= column[:description] %></w:t>
|
46
|
-
</w:r>
|
47
|
-
</w:p>
|
48
|
-
</w:tc>
|
49
|
-
<% end %>
|
50
|
-
</w:tr>
|
51
|
-
<% data[:rows].each do |row| %>
|
1
|
+
<% unless data.nil? %>
|
2
|
+
<w:tbl>
|
3
|
+
<w:tblPr>
|
4
|
+
<w:tblW w:w="<%= data[:table_width].to_i * 15 %>" w:type="dxa"/>
|
5
|
+
<w:tblInd w:w="-626" w:type="dxa"/>
|
6
|
+
<w:tblCellMar>
|
7
|
+
<w:left w:w="70" w:type="dxa"/>
|
8
|
+
<w:right w:w="70" w:type="dxa"/>
|
9
|
+
</w:tblCellMar>
|
10
|
+
<w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/>
|
11
|
+
</w:tblPr>
|
12
|
+
<w:tblGrid>
|
13
|
+
<% data[:columns].each do |column| %>
|
14
|
+
<w:gridCol w:w="<%= (column[:width].to_f / 100) * data[:table_width].to_i * 15 %>"/>
|
15
|
+
<% end %>
|
16
|
+
</w:tblGrid>
|
52
17
|
<w:tr w:rsidR="00080F99" w:rsidRPr="00E71341" w:rsidTr="00E653AF">
|
53
18
|
<w:trPr>
|
54
19
|
<w:trHeight w:val="315"/>
|
@@ -60,27 +25,64 @@
|
|
60
25
|
<w:tcBorders>
|
61
26
|
<w:top w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
62
27
|
<w:left w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
63
|
-
<w:bottom w:val="single" w:sz="
|
28
|
+
<w:bottom w:val="single" w:sz="8" w:space="0" w:color="000000"/>
|
64
29
|
<w:right w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
65
30
|
</w:tcBorders>
|
66
31
|
<w:vAlign w:val="center"/>
|
67
32
|
</w:tcPr>
|
68
|
-
<w:p w:rsidR="00080F99" w:rsidRPr="00E71341" w:rsidRDefault="
|
33
|
+
<w:p w:rsidR="00080F99" w:rsidRPr="00E71341" w:rsidRDefault="00080F99" w:rsidP="00E653AF">
|
69
34
|
<w:pPr>
|
70
35
|
<w:jc w:val="center"/>
|
71
36
|
</w:pPr>
|
72
|
-
<w:r>
|
37
|
+
<w:r w:rsidRPr="00E71341">
|
73
38
|
<w:rPr>
|
74
39
|
<w:rFonts w:ascii="<%= data[:font_family] %>" w:hAnsi="<%= data[:font_family] %>" w:cs="<%= data[:font_family] %>"/>
|
40
|
+
<w:b/>
|
41
|
+
<w:bCs/>
|
75
42
|
<w:color w:val="000000"/>
|
76
43
|
<w:lang w:val="pt-BR" w:eastAsia="pt-BR"/>
|
77
44
|
<w:sz w:val="<%= data[:font_size].to_i * 2 %>" />
|
78
45
|
</w:rPr>
|
79
|
-
<w:t><%=
|
46
|
+
<w:t><%= column[:description] %></w:t>
|
80
47
|
</w:r>
|
81
48
|
</w:p>
|
82
49
|
</w:tc>
|
83
50
|
<% end %>
|
84
51
|
</w:tr>
|
85
|
-
|
86
|
-
|
52
|
+
<% data[:rows].each do |row| %>
|
53
|
+
<w:tr w:rsidR="00080F99" w:rsidRPr="00E71341" w:rsidTr="00E653AF">
|
54
|
+
<w:trPr>
|
55
|
+
<w:trHeight w:val="315"/>
|
56
|
+
</w:trPr>
|
57
|
+
<% data[:columns].each do |column| %>
|
58
|
+
<w:tc>
|
59
|
+
<w:tcPr>
|
60
|
+
<w:tcW w:w="<%= (column[:width].to_f / 100) * data[:table_width].to_i * 15 %>" w:type="dxa"/>
|
61
|
+
<w:tcBorders>
|
62
|
+
<w:top w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
63
|
+
<w:left w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
64
|
+
<w:bottom w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
65
|
+
<w:right w:val="single" w:sz="4" w:space="0" w:color="000000"/>
|
66
|
+
</w:tcBorders>
|
67
|
+
<w:vAlign w:val="center"/>
|
68
|
+
</w:tcPr>
|
69
|
+
<w:p w:rsidR="00080F99" w:rsidRPr="00E71341" w:rsidRDefault="005549E3" w:rsidP="00E653AF">
|
70
|
+
<w:pPr>
|
71
|
+
<w:jc w:val="center"/>
|
72
|
+
</w:pPr>
|
73
|
+
<w:r>
|
74
|
+
<w:rPr>
|
75
|
+
<w:rFonts w:ascii="<%= data[:font_family] %>" w:hAnsi="<%= data[:font_family] %>" w:cs="<%= data[:font_family] %>"/>
|
76
|
+
<w:color w:val="000000"/>
|
77
|
+
<w:lang w:val="pt-BR" w:eastAsia="pt-BR"/>
|
78
|
+
<w:sz w:val="<%= data[:font_size].to_i * 2 %>" />
|
79
|
+
</w:rPr>
|
80
|
+
<w:t><%= row[column[:name]] %></w:t>
|
81
|
+
</w:r>
|
82
|
+
</w:p>
|
83
|
+
</w:tc>
|
84
|
+
<% end %>
|
85
|
+
</w:tr>
|
86
|
+
<% end %>
|
87
|
+
</w:tbl>
|
88
|
+
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docx-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tecnologia Cashme
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Builds a new docx file using ERB template
|
14
14
|
email:
|