docx_templater 0.1.1 → 0.1.2

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ac6cfdb1bdabf1ef28636d52607f8db6d36d6473
4
+ data.tar.gz: 6a6b9141e4e07a3f67ae2940b0a6243d8d748ace
5
+ SHA512:
6
+ metadata.gz: 45b3f8e0579de24698d5e8b39ebd1bff6c4690a30f171c5428ccc05934850a858150dac23c37372ed45b8959e8a4657c65403f10a26a782062ed1adce05c3335
7
+ data.tar.gz: fdf4a1d02e1ef6faae7c6e81de5723ec75b5bc6f4b07b858362ed5f402aeda149907d9aad6e2a6ae318dad36fc3b762b3430cf2fb896f5e7fd2b75bef2854125
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
@@ -0,0 +1 @@
1
+ ���K }��f%=w�����GI���폆�@ _ �x���XڬJ��a��}E��B�63_r!�81T L���ʍ�`�H%5� !~dw��~A��zs� ��=Ok��SZ͌f�C͉����� ��\ט�>�@ص�N��$8��)��7����ľ<�����1AF�����*��]Y�p�A"��?ak���$�@R�i$�9�1:���F�9rUp��Kf�hG���d�^uI��'�O�>��f��u�'�5��o5S
@@ -1,4 +1,5 @@
1
- require 'zip/zipfilesystem'
1
+ # require 'zip/zipfilesystem'
2
+ require 'zip'
2
3
  require 'htmlentities'
3
4
  require 'docx/argument_combiner'
4
5
  require 'docx/document_replacer'
@@ -22,9 +23,9 @@ class DocxTemplater
22
23
 
23
24
  def replace_file_with_content(file_path, data_provider)
24
25
  # Rubyzip doesn't save it right unless saved like this: https://gist.github.com/e7d2855435654e1ebc52
25
- zf = Zip::ZipFile.new(file_path) # Put original file name here
26
+ zf = Zip::File.new(file_path) # Put original file name here
26
27
 
27
- buffer = Zip::ZipOutputStream.write_buffer do |out|
28
+ buffer = Zip::OutputStream.write_buffer do |out|
28
29
  zf.entries.each do |e|
29
30
  process_entry(e, out, data_provider)
30
31
  end
metadata CHANGED
@@ -1,37 +1,54 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docx_templater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Paul Smith
9
8
  - Michael Ries
10
9
  autorequire:
11
10
  bindir: bin
12
- cert_chain: []
11
+ cert_chain:
12
+ - |
13
+ -----BEGIN CERTIFICATE-----
14
+ MIIDMDCCAhigAwIBAgIBADANBgkqhkiG9w0BAQUFADA+MRAwDgYDVQQDDAdtaWNo
15
+ YWVsMRUwEwYKCZImiZPyLGQBGRYFcmllc2QxEzARBgoJkiaJk/IsZAEZFgNjb20w
16
+ HhcNMTMwMjA0MjM1MzMwWhcNMTQwMjA0MjM1MzMwWjA+MRAwDgYDVQQDDAdtaWNo
17
+ YWVsMRUwEwYKCZImiZPyLGQBGRYFcmllc2QxEzARBgoJkiaJk/IsZAEZFgNjb20w
18
+ ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDFsVFKtZEYbY29KZTqudSh
19
+ lACK/+uIuIabCr3r2QTNgCrJutM+uSCXQBgO+yMb/Z2qPmW99FHwB4G0vBn7sJS5
20
+ 4JjfaLTiplTUa6YHs2g5N8XRmzJvVK5woXhxSQOjZ3GIBtBhDHqTiGBvVKjyx4Kk
21
+ za6b3J2PfKkAxanaRgqnKerQ0CfIfdg8EBbO0SGhDYuDAn2gRD4T8Eqb9rWkW2RJ
22
+ ddg5pAejNni4dMhNexqbnxjLjQW06DQ2sXeNcZ2FtMy6ffqbLVZDFYLJ5eyWxTrq
23
+ P31tkHcB32HmP1f3VWW1gZ/xf9WH/hAvF5yB96Nbx670NVZd/yAJ+1xcUWtaKWl/
24
+ AgMBAAGjOTA3MAkGA1UdEwQCMAAwHQYDVR0OBBYEFGm8h9myjQDSVKZpu2t2ok49
25
+ e6utMAsGA1UdDwQEAwIEsDANBgkqhkiG9w0BAQUFAAOCAQEAIXeXWgmWJQUohHgR
26
+ 51Y5wKFR6I2AIbhn6WlhRqSNRt7y3/y1wTq8JSb30Mys12XWGbpPyw5DXDtd7lMW
27
+ gtQ5dQ9AwKHv5a4YrEQ58DAup8NrbL/LPnK+fZl1PVprcOOYKe/KW7wyzvVI07tn
28
+ dBtr3mifmnE1goVcm1lR2oWi/O8XIGDNLZTRpuqKM7Tla/OXBKHvELcs+gK6jlwE
29
+ cEsfL281Yatwf7NyKwuhlnRFBKk6BETA5mCtpkV1/8qfya/aFNnvt8NcQ5YQYAME
30
+ vrPQMiMiGzuc0M1gLGdEtyiKW8J0zoHYI+bsx2kpijE4YWQrGHRUVCoFRfR6c5Nd
31
+ ZppDpQ==
32
+ -----END CERTIFICATE-----
13
33
  date: 2012-08-03 00:00:00.000000000 Z
14
34
  dependencies:
15
35
  - !ruby/object:Gem::Dependency
16
36
  name: rubyzip
17
37
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
38
  requirements:
20
39
  - - ~>
21
40
  - !ruby/object:Gem::Version
22
- version: 0.9.9
41
+ version: 1.0.0
23
42
  type: :runtime
24
43
  prerelease: false
25
44
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
45
  requirements:
28
46
  - - ~>
29
47
  - !ruby/object:Gem::Version
30
- version: 0.9.9
48
+ version: 1.0.0
31
49
  - !ruby/object:Gem::Dependency
32
50
  name: htmlentities
33
51
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
52
  requirements:
36
53
  - - ~>
37
54
  - !ruby/object:Gem::Version
@@ -39,11 +56,38 @@ dependencies:
39
56
  type: :runtime
40
57
  prerelease: false
41
58
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
59
  requirements:
44
60
  - - ~>
45
61
  - !ruby/object:Gem::Version
46
62
  version: 4.3.1
63
+ - !ruby/object:Gem::Dependency
64
+ name: rake
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '10.1'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: '10.1'
77
+ - !ruby/object:Gem::Dependency
78
+ name: rspec
79
+ requirement: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ~>
82
+ - !ruby/object:Gem::Version
83
+ version: '2.14'
84
+ type: :development
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ version: '2.14'
47
91
  description: Uses a .docx file with keyword tags within '||' as a template. This gem
48
92
  will then open the .docx and replace those tags with dynamically defined content.
49
93
  email: pauls@basecampops.com
@@ -58,26 +102,25 @@ files:
58
102
  - lib/docx/placeholder_observer.rb
59
103
  homepage: http://rubygems.org/gems/docx_templater
60
104
  licenses: []
105
+ metadata: {}
61
106
  post_install_message:
62
107
  rdoc_options: []
63
108
  require_paths:
64
109
  - lib
65
110
  required_ruby_version: !ruby/object:Gem::Requirement
66
- none: false
67
111
  requirements:
68
- - - ! '>='
112
+ - - '>='
69
113
  - !ruby/object:Gem::Version
70
114
  version: '0'
71
115
  required_rubygems_version: !ruby/object:Gem::Requirement
72
- none: false
73
116
  requirements:
74
- - - ! '>='
117
+ - - '>='
75
118
  - !ruby/object:Gem::Version
76
119
  version: '0'
77
120
  requirements: []
78
121
  rubyforge_project:
79
- rubygems_version: 1.8.23
122
+ rubygems_version: 2.0.6
80
123
  signing_key:
81
- specification_version: 3
124
+ specification_version: 4
82
125
  summary: Uses a .docx as a template and replaces 'tags' within || with other content
83
126
  test_files: []
metadata.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ (�x�Q>������v� b������~|l=�fā��ŔW���4`&�w��2$B��د3���<�k˺,ݠ��3ὄo���L���.�T����v��Ğ�nS�r�!���i"�$7t��M��d��v߂�8!"B�đ�(6
2
+ �E8��"g}��Y������_ݵ\>�l��� Sw���MH�A��[ 5lV��Vu�#X��� ~�㰠���󜸵�=D#�9�W�pV��0�PW�` q ��5��G�