docx_tools 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/docx_tools/mail_merge.rb +7 -1
- data/lib/docx_tools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05992a8037cbdeb0e3f4b2837e5b96969c25f924
|
4
|
+
data.tar.gz: 00c9070e1d5030b941675757009e6f0db1fbddf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eedaa29303ba795de7bef50b77c7fc2a9d976551fbca501eb22f8b116249da521ceea0ebfbb2c7dbe01d9e86cc04901fbd56279c6c7ca83e3da3bd368a75a00
|
7
|
+
data.tar.gz: e57c895e43c494e86efe64c1ef1a224bbb138076843cc0405916c9c17eb3305edc6dae29a5a361e25e23b552121f074b2479fd17aa3c0ef0b6ecdb2a07a5af54
|
data/Gemfile.lock
CHANGED
@@ -6,7 +6,7 @@ module DocxTools
|
|
6
6
|
|
7
7
|
def initialize(file_object)
|
8
8
|
self.document = Document.new(file_object)
|
9
|
-
self.part_list = PartList.new(document, %w[document.main header footer])
|
9
|
+
self.part_list = PartList.new(document, %w[document.main header footer settings])
|
10
10
|
process_merge_fields
|
11
11
|
end
|
12
12
|
|
@@ -72,6 +72,12 @@ module DocxTools
|
|
72
72
|
def process_merge_fields
|
73
73
|
self.part_list.each_part do |part|
|
74
74
|
part.root.remove_attribute('Ignorable')
|
75
|
+
|
76
|
+
# remove mail merge element from settings
|
77
|
+
part.xpath('.//w:mailMerge').each do |mail_merge|
|
78
|
+
mail_merge.remove
|
79
|
+
end
|
80
|
+
|
75
81
|
|
76
82
|
part.xpath('.//w:fldSimple/..').each do |parent|
|
77
83
|
parent.children.each do |child|
|
data/lib/docx_tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docx_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Deisz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|