docx-builder 0.4.0 → 0.4.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/Gemfile.lock +18 -18
- data/lib/docx/builder/version.rb +1 -1
- data/lib/docx/builder/xml_processor.rb +3 -3
- 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: a1c29b476ddb4b801b85285265394883fb2464c0a5bb1cb816ecfcfe184e9f4b
|
|
4
|
+
data.tar.gz: d492f70245fa1043bbdbe864c9c6a2e227d4d0900610de8dbe990dcfc42af2b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11dca49bb7b0d8ce52b0fc7345af69d695cd9fc7a9165cf79e62c5979a7b3e82bd0d63a9370bea9ae3eed1a2ca9b4779975d2f9e560dc815a0aeacc84d886697
|
|
7
|
+
data.tar.gz: 95a102b5f72f34fc32e6be1cc37738681cb075a6e5237a7e79432b7e465fc5032721c026a0004fba1bd2324ddc907d0b6bacb02bb8ed1831f668b42adb3f27f7
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
docx-builder (0.4.
|
|
4
|
+
docx-builder (0.4.1)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
@@ -14,30 +14,30 @@ GEM
|
|
|
14
14
|
byebug (11.1.3)
|
|
15
15
|
diff-lcs (1.5.0)
|
|
16
16
|
mini_portile2 (2.8.0)
|
|
17
|
-
nokogiri (1.13.
|
|
17
|
+
nokogiri (1.13.10)
|
|
18
18
|
mini_portile2 (~> 2.8.0)
|
|
19
19
|
racc (~> 1.4)
|
|
20
20
|
parallel (1.22.1)
|
|
21
|
-
parser (3.1.
|
|
21
|
+
parser (3.1.3.0)
|
|
22
22
|
ast (~> 2.4.1)
|
|
23
|
-
racc (1.6.
|
|
23
|
+
racc (1.6.1)
|
|
24
24
|
rainbow (3.1.1)
|
|
25
25
|
rake (13.0.6)
|
|
26
|
-
regexp_parser (2.
|
|
26
|
+
regexp_parser (2.6.1)
|
|
27
27
|
rexml (3.2.5)
|
|
28
|
-
rspec (3.
|
|
29
|
-
rspec-core (~> 3.
|
|
30
|
-
rspec-expectations (~> 3.
|
|
31
|
-
rspec-mocks (~> 3.
|
|
32
|
-
rspec-core (3.
|
|
33
|
-
rspec-support (~> 3.
|
|
34
|
-
rspec-expectations (3.
|
|
28
|
+
rspec (3.12.0)
|
|
29
|
+
rspec-core (~> 3.12.0)
|
|
30
|
+
rspec-expectations (~> 3.12.0)
|
|
31
|
+
rspec-mocks (~> 3.12.0)
|
|
32
|
+
rspec-core (3.12.0)
|
|
33
|
+
rspec-support (~> 3.12.0)
|
|
34
|
+
rspec-expectations (3.12.0)
|
|
35
35
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
36
|
-
rspec-support (~> 3.
|
|
37
|
-
rspec-mocks (3.
|
|
36
|
+
rspec-support (~> 3.12.0)
|
|
37
|
+
rspec-mocks (3.12.1)
|
|
38
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
39
|
-
rspec-support (~> 3.
|
|
40
|
-
rspec-support (3.
|
|
39
|
+
rspec-support (~> 3.12.0)
|
|
40
|
+
rspec-support (3.12.0)
|
|
41
41
|
rubocop (0.93.1)
|
|
42
42
|
parallel (~> 1.10)
|
|
43
43
|
parser (>= 2.7.1.5)
|
|
@@ -47,7 +47,7 @@ GEM
|
|
|
47
47
|
rubocop-ast (>= 0.6.0)
|
|
48
48
|
ruby-progressbar (~> 1.7)
|
|
49
49
|
unicode-display_width (>= 1.4.0, < 2.0)
|
|
50
|
-
rubocop-ast (1.
|
|
50
|
+
rubocop-ast (1.24.0)
|
|
51
51
|
parser (>= 3.1.1.0)
|
|
52
52
|
ruby-progressbar (1.11.0)
|
|
53
53
|
rubyzip (2.3.2)
|
|
@@ -69,4 +69,4 @@ DEPENDENCIES
|
|
|
69
69
|
rubyzip
|
|
70
70
|
|
|
71
71
|
BUNDLED WITH
|
|
72
|
-
2.
|
|
72
|
+
2.3.17
|
data/lib/docx/builder/version.rb
CHANGED
|
@@ -8,7 +8,7 @@ module Docx
|
|
|
8
8
|
document.gsub(/\{\{.*?\}\}/m) do |match|
|
|
9
9
|
ret = match.include?('>') ? join_variable_tags(match) : match
|
|
10
10
|
Docx::Builder.logger.debug("Before cleaning: #{ret}")
|
|
11
|
-
ret =
|
|
11
|
+
ret = Docx::Builder::Cleaners.single_quote_cleaner(ret)
|
|
12
12
|
ret = insert_null_placeholder(ret)
|
|
13
13
|
Docx::Builder.logger.debug("After cleaning: #{ret}")
|
|
14
14
|
ret
|
|
@@ -19,7 +19,7 @@ module Docx
|
|
|
19
19
|
before = match.gsub(/<(.*)/m, '')
|
|
20
20
|
inside = match.scan(/<w:t.*?>([^>]*?)<.w:t>/m).join
|
|
21
21
|
after = match.gsub(/.*>([^>]+)$/m, '\\1')
|
|
22
|
-
[before, inside, after].join
|
|
22
|
+
[before, inside, after].join
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def self.clean_spaces_inside_variables(match)
|
|
@@ -33,7 +33,7 @@ module Docx
|
|
|
33
33
|
|
|
34
34
|
def self.insert_null_placeholder(expression)
|
|
35
35
|
placeholder = Docx::Builder.configuration.null_placeholder
|
|
36
|
-
expression.gsub(/\{\{%\s(
|
|
36
|
+
expression.gsub(/\{\{%\s(.+?)\s%\}\}/) do |_m|
|
|
37
37
|
"{{% (#{Regexp.last_match(1)} || '#{placeholder}') %}}"
|
|
38
38
|
end
|
|
39
39
|
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.
|
|
4
|
+
version: 0.4.1
|
|
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-
|
|
11
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Builds a new docx file using ERB template
|
|
14
14
|
email:
|