lm_docstache 1.3.0 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ae5d34672eaa5bce54718805fd2984f6a016b258f0376f3aa6707bb7c04d701
4
- data.tar.gz: d9aacd28e9f78e7b194e6fd32fa9948d997b171427f8e425f376214eda044602
3
+ metadata.gz: 0ab76fe58e63d2b57612f1b63cde29861a5552f08549dfdef6487127d63ee30c
4
+ data.tar.gz: 397def49df4c8a2fcb5688c5b52ca2d1b2940b9efebf37747ff745b33b4561d5
5
5
  SHA512:
6
- metadata.gz: ea353f13320611862bb5081806a05320b99d76fb1ae4cdc5693af1d75c9419d997458b0319142825fc76f302c19613aafc7e232cd506b9ba1134570317db7b5f
7
- data.tar.gz: fbbb70c2866c3c344efeb5c99ff748d7b53c51796512c0e485718523f1894aa7dff40a03f5a4fc3b4c9f3cff1f87ec082b3f3d1ad2159acb43d3b907d14441c7
6
+ metadata.gz: 55ab02fac2c3e0033522d89d739be8fb16c2431952dea35485c9f1d6aca2264c6d8bb06ab2fb0e9a491f03077e54c870802c77ff51888a03a53208dc86d2bcbc
7
+ data.tar.gz: 0b9ac7bfac5f4a106d12da49a75291f1a5740a154e64641db1d93caa9187089c028de6e12648b074079867750b65fbced6de6cff48b7bad64d2acbea1cfaccb9
@@ -1,4 +1,7 @@
1
1
  # Changelog
2
+ ## 1.3.1
3
+ * Fix bug searching accross xml nodes for e-signature tags.
4
+
2
5
  ## 1.3.0
3
6
  * Add support for e-signature tags
4
7
 
@@ -23,7 +23,7 @@ module LMDocstache
23
23
 
24
24
  def usable_signature_tags
25
25
  @documents.values.flat_map do |document|
26
- document.css('w|t')
26
+ document.css('w|p')
27
27
  .select { |tag| tag.text =~ /\[\[sig_.+?\]\]/ }
28
28
  .flat_map { |tag| tag.text.scan(/\[\[sig_.+?\]\]/) }
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module LMDocstache
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
@@ -5,8 +5,8 @@ require "lm_docstache/version"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "lm_docstache"
7
7
  s.version = LMDocstache::VERSION
8
- s.authors = ["Roey Chasman", "Jonathan Stevens", "Will Cosgrove"]
9
- s.email = ["roey@lawmatics.com", "jonathan@lawmatics.com", "will@willcosgrove.com"]
8
+ s.authors = ["Roey Chasman", "Frederico Assunção", "Jonathan Stevens", "Will Cosgrove"]
9
+ s.email = ["roey@lawmatics.com", "fred@lawmatics.com", "jonathan@lawmatics.com", "will@willcosgrove.com"]
10
10
  s.homepage = "https://www.lawmatics.com"
11
11
  s.summary = %q{Merges Hash of Data into Word docx template files using mustache syntax}
12
12
  s.description = %q{Integrates data into MS Word docx template files. Processing supports loops and replacement of strings of data both outside and within loops.}
@@ -35,7 +35,7 @@ end
35
35
  describe 'integration test', integration: true do
36
36
  let(:data) { LMDocstache::TestData::DATA }
37
37
  let(:base_path) { SPEC_BASE_PATH.join('example_input') }
38
- let(:input_file) { "#{base_path}/ExampleTemplate.docx" }
38
+ let(:input_file) { "#{base_path}/ExampleTemplate2.docx" }
39
39
  let(:output_dir) { "#{base_path}/tmp" }
40
40
  let(:output_file) { "#{output_dir}/IntegrationTestOutput.docx" }
41
41
  let(:document) { LMDocstache::Document.new(input_file) }
@@ -64,11 +64,19 @@ describe 'integration test', integration: true do
64
64
  end
65
65
 
66
66
  it 'has the expected amount of usable tags' do
67
- expect(document.usable_tags.count).to be(27)
67
+ expect(document.usable_tags.count).to be(30)
68
+ end
69
+
70
+ it 'has the expected amount of signature tags' do
71
+ expect(document.signature_tags.count).to be(6)
72
+ end
73
+
74
+ it 'has the expected amount of usable signature tags' do
75
+ expect(document.usable_signature_tags.count).to be(6)
68
76
  end
69
77
 
70
78
  it 'has the expected amount of unique tag names' do
71
- expect(document.usable_tag_names.count).to be(16)
79
+ expect(document.usable_tag_names.count).to be(18)
72
80
  end
73
81
 
74
82
  it 'renders file using data' do
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lm_docstache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roey Chasman
8
+ - Frederico Assunção
8
9
  - Jonathan Stevens
9
10
  - Will Cosgrove
10
- autorequire:
11
+ autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2020-09-03 00:00:00.000000000 Z
14
+ date: 2020-09-16 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: nokogiri
@@ -92,6 +93,7 @@ description: Integrates data into MS Word docx template files. Processing suppor
92
93
  loops and replacement of strings of data both outside and within loops.
93
94
  email:
94
95
  - roey@lawmatics.com
96
+ - fred@lawmatics.com
95
97
  - jonathan@lawmatics.com
96
98
  - will@willcosgrove.com
97
99
  executables: []
@@ -116,6 +118,7 @@ files:
116
118
  - spec/data_scope_spec.rb
117
119
  - spec/empty_data_scope_spec.rb
118
120
  - spec/example_input/ExampleTemplate.docx
121
+ - spec/example_input/ExampleTemplate2.docx
119
122
  - spec/example_input/blank.docx
120
123
  - spec/example_input/word/document.xml
121
124
  - spec/integration_spec.rb
@@ -125,7 +128,7 @@ homepage: https://www.lawmatics.com
125
128
  licenses:
126
129
  - MIT
127
130
  metadata: {}
128
- post_install_message:
131
+ post_install_message:
129
132
  rdoc_options: []
130
133
  require_paths:
131
134
  - lib
@@ -141,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
144
  version: '0'
142
145
  requirements: []
143
146
  rubygems_version: 3.0.3
144
- signing_key:
147
+ signing_key:
145
148
  specification_version: 4
146
149
  summary: Merges Hash of Data into Word docx template files using mustache syntax
147
150
  test_files:
@@ -149,6 +152,7 @@ test_files:
149
152
  - spec/data_scope_spec.rb
150
153
  - spec/empty_data_scope_spec.rb
151
154
  - spec/example_input/ExampleTemplate.docx
155
+ - spec/example_input/ExampleTemplate2.docx
152
156
  - spec/example_input/blank.docx
153
157
  - spec/example_input/word/document.xml
154
158
  - spec/integration_spec.rb