openxml_docx_templater 0.1.0 → 0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c09c24cbe7b55dc45dd32dff4b5364908ac04d1
|
4
|
+
data.tar.gz: 74aaa262f40b837e50786f30984c75562c19fdf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a141f4016ecb1049f560c19bec09cd41492adb0b7f377bea207db0347ad63eff0851c16f89e1ff79982863dc62d5a86e9734a9a5aba6207ead713164e68afabb
|
7
|
+
data.tar.gz: 50455c60ecab41687c829fa05023612bf5aa02fd8d46fed9e164aa9b01814cacda0919f2abbe866c9587f4d14fec123c898ad3b48d62e88c9a0c17a63d6a7faf
|
@@ -14,7 +14,7 @@ module OpenxmlDocxTemplater
|
|
14
14
|
tmpfiles = []
|
15
15
|
Zip::File.open(@template) do |zipfile|
|
16
16
|
%w(word/document.xml word/styles.xml).each do |xml_file|
|
17
|
-
content = zipfile.read(xml_file).refact
|
17
|
+
content = zipfile.read(xml_file).refact.force_encoding("utf-8")
|
18
18
|
|
19
19
|
docxeruby = DocxEruby.new(XmlReader.new(content))
|
20
20
|
out = docxeruby.evaluate(context)
|
@@ -12,7 +12,7 @@ module OpenxmlDocxTemplater
|
|
12
12
|
m = Regexp.last_match
|
13
13
|
if m.begin(0) > last_match_pos
|
14
14
|
text = @src[last_match_pos...m.begin(0)]
|
15
|
-
yield text, node_type(text)
|
15
|
+
yield text, node_type(text)
|
16
16
|
end
|
17
17
|
|
18
18
|
last_match_pos = m.end(0)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openxml_docx_templater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Ageev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|