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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d8d2712433f3db952944c6e9838e8e43fab2f4a
4
- data.tar.gz: d2b37ef44857c24d13377ce081c8762b1581ff7a
3
+ metadata.gz: 05992a8037cbdeb0e3f4b2837e5b96969c25f924
4
+ data.tar.gz: 00c9070e1d5030b941675757009e6f0db1fbddf3
5
5
  SHA512:
6
- metadata.gz: 9a3db409b76d4910bbd591cee2f61e6a8d7995fd6cc3aa5656e4510e8b1cc70c95ee2a36d0572eea1f4ed429f0c50df7bb60b5cac622d708ea87cd4e5f608143
7
- data.tar.gz: 0e68fbac12573ae6923346164c67ad615b2c1f1fd1622e8a74112a4da24bc05ee34fc25c837506850c175ff1e70939253fbde283de14c98833ba27356cb08019
6
+ metadata.gz: 5eedaa29303ba795de7bef50b77c7fc2a9d976551fbca501eb22f8b116249da521ceea0ebfbb2c7dbe01d9e86cc04901fbd56279c6c7ca83e3da3bd368a75a00
7
+ data.tar.gz: e57c895e43c494e86efe64c1ef1a224bbb138076843cc0405916c9c17eb3305edc6dae29a5a361e25e23b552121f074b2479fd17aa3c0ef0b6ecdb2a07a5af54
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- docx_tools (0.0.2)
4
+ docx_tools (0.0.3)
5
5
  nokogiri (~> 1.6, >= 1.6.6)
6
6
  rubyzip (~> 1.1, >= 1.1.7)
7
7
 
@@ -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|
@@ -1,4 +1,4 @@
1
1
  module DocxTools
2
2
 
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
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.2
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-04 00:00:00.000000000 Z
11
+ date: 2015-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri