docxtor 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/.coveralls.yml +1 -0
  2. data/.gitignore +21 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +4 -0
  6. data/.wrong +1 -0
  7. data/Gemfile +18 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +117 -0
  10. data/Rakefile +7 -0
  11. data/TODO.md +5 -0
  12. data/docxtor.gemspec +32 -0
  13. data/lib/docxtor.rb +30 -0
  14. data/lib/docxtor/document/builder.rb +32 -0
  15. data/lib/docxtor/document/element.rb +96 -0
  16. data/lib/docxtor/document/heading.rb +13 -0
  17. data/lib/docxtor/document/page_break.rb +14 -0
  18. data/lib/docxtor/document/paragraph.rb +125 -0
  19. data/lib/docxtor/document/root.rb +17 -0
  20. data/lib/docxtor/document/table_of_contents.rb +95 -0
  21. data/lib/docxtor/generator.rb +13 -0
  22. data/lib/docxtor/package/builder.rb +35 -0
  23. data/lib/docxtor/package/part.rb +12 -0
  24. data/lib/docxtor/template_parser.rb +38 -0
  25. data/lib/docxtor/version.rb +3 -0
  26. data/spec/docxtor/document/builder_spec.rb +16 -0
  27. data/spec/docxtor/document/heading_spec.rb +9 -0
  28. data/spec/docxtor/document/paragraph_spec.rb +56 -0
  29. data/spec/docxtor/document/root_spec.rb +20 -0
  30. data/spec/docxtor/document/table_of_contents_spec.rb +18 -0
  31. data/spec/docxtor/docxtor_spec.rb +13 -0
  32. data/spec/docxtor/package/builder_spec.rb +37 -0
  33. data/spec/docxtor/package/part_spec.rb +16 -0
  34. data/spec/docxtor/prerequisites_spec.rb +9 -0
  35. data/spec/docxtor/support/contexts/integration_context.rb +6 -0
  36. data/spec/docxtor/support/contexts/xml_builder_context.rb +11 -0
  37. data/spec/docxtor/support/examples/.gitkeep +0 -0
  38. data/spec/docxtor/support/matchers/wordprocessingml_matchers.rb +42 -0
  39. data/spec/docxtor/support/matchers/xpath_matchers.rb +46 -0
  40. data/spec/docxtor/template_parser_spec.rb +18 -0
  41. data/spec/spec_helper.rb +35 -0
  42. data/templates/.gitkeep +0 -0
  43. data/templates/default/[Content_Types].xml +16 -0
  44. data/templates/default/_rels/.rels +4 -0
  45. data/templates/default/word/_rels/document.xml.rels +13 -0
  46. data/templates/default/word/endnotes.xml +17 -0
  47. data/templates/default/word/fontTable.xml +31 -0
  48. data/templates/default/word/footer1.xml +35 -0
  49. data/templates/default/word/footer2.xml +48 -0
  50. data/templates/default/word/footnotes.xml +17 -0
  51. data/templates/default/word/numbering.xml +212 -0
  52. data/templates/default/word/settings.xml +107 -0
  53. data/templates/default/word/styles.xml +368 -0
  54. data/templates/default/word/theme/theme1.xml +2 -0
  55. data/templates/default/word/websettings.xml +4 -0
  56. metadata +265 -0
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Тема Office"><a:themeElements><a:clrScheme name="Стандартная"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="1F497D"/></a:dk2><a:lt2><a:srgbClr val="EEECE1"/></a:lt2><a:accent1><a:srgbClr val="4F81BD"/></a:accent1><a:accent2><a:srgbClr val="C0504D"/></a:accent2><a:accent3><a:srgbClr val="9BBB59"/></a:accent3><a:accent4><a:srgbClr val="8064A2"/></a:accent4><a:accent5><a:srgbClr val="4BACC6"/></a:accent5><a:accent6><a:srgbClr val="F79646"/></a:accent6><a:hlink><a:srgbClr val="0000FF"/></a:hlink><a:folHlink><a:srgbClr val="800080"/></a:folHlink></a:clrScheme><a:fontScheme name="Стандартная"><a:majorFont><a:latin typeface="Cambria"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="MS ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="宋体"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Angsana New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="MS 明朝"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="宋体"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Cordia New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/></a:minorFont></a:fontScheme><a:fmtScheme name="Стандартная"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="1"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:shade val="51000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="80000"><a:schemeClr val="phClr"><a:shade val="93000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="94000"/><a:satMod val="135000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst><a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d><a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <w:webSettings xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
3
+ <w:optimizeForBrowser/>
4
+ </w:webSettings>
metadata ADDED
@@ -0,0 +1,265 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: docxtor
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 1
10
+ version: 0.1.1
11
+ platform: ruby
12
+ authors:
13
+ - Irina Bednova, Vasiliy Yorkin
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2013-09-23 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: bundler
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 9
29
+ segments:
30
+ - 1
31
+ - 3
32
+ version: "1.3"
33
+ type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: rake
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: nokogiri
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ~>
56
+ - !ruby/object:Gem::Version
57
+ hash: 7
58
+ segments:
59
+ - 1
60
+ - 4
61
+ - 0
62
+ version: 1.4.0
63
+ type: :development
64
+ version_requirements: *id003
65
+ - !ruby/object:Gem::Dependency
66
+ name: rspec
67
+ prerelease: false
68
+ requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 3
74
+ segments:
75
+ - 0
76
+ version: "0"
77
+ type: :development
78
+ version_requirements: *id004
79
+ - !ruby/object:Gem::Dependency
80
+ name: rspec-xml
81
+ prerelease: false
82
+ requirement: &id005 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
90
+ version: "0"
91
+ type: :development
92
+ version_requirements: *id005
93
+ - !ruby/object:Gem::Dependency
94
+ name: wrong
95
+ prerelease: false
96
+ requirement: &id006 !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ hash: 3
102
+ segments:
103
+ - 0
104
+ version: "0"
105
+ type: :development
106
+ version_requirements: *id006
107
+ - !ruby/object:Gem::Dependency
108
+ name: builder
109
+ prerelease: false
110
+ requirement: &id007 !ruby/object:Gem::Requirement
111
+ none: false
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ hash: 3
116
+ segments:
117
+ - 0
118
+ version: "0"
119
+ type: :runtime
120
+ version_requirements: *id007
121
+ - !ruby/object:Gem::Dependency
122
+ name: rubytree
123
+ prerelease: false
124
+ requirement: &id008 !ruby/object:Gem::Requirement
125
+ none: false
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ hash: 3
130
+ segments:
131
+ - 0
132
+ version: "0"
133
+ type: :runtime
134
+ version_requirements: *id008
135
+ - !ruby/object:Gem::Dependency
136
+ name: rubyzip
137
+ prerelease: false
138
+ requirement: &id009 !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - "="
142
+ - !ruby/object:Gem::Version
143
+ hash: 41
144
+ segments:
145
+ - 0
146
+ - 9
147
+ - 9
148
+ version: 0.9.9
149
+ type: :runtime
150
+ version_requirements: *id009
151
+ description: Ruby docx generator, provides simple DSL for building word documents
152
+ email:
153
+ - howeveririna@gmail.com, vasiliy.yorkin@gmail.com
154
+ executables: []
155
+
156
+ extensions: []
157
+
158
+ extra_rdoc_files: []
159
+
160
+ files:
161
+ - .coveralls.yml
162
+ - .gitignore
163
+ - .rspec
164
+ - .ruby-version
165
+ - .travis.yml
166
+ - .wrong
167
+ - Gemfile
168
+ - LICENSE.txt
169
+ - README.md
170
+ - Rakefile
171
+ - TODO.md
172
+ - docxtor.gemspec
173
+ - lib/docxtor.rb
174
+ - lib/docxtor/document/builder.rb
175
+ - lib/docxtor/document/element.rb
176
+ - lib/docxtor/document/heading.rb
177
+ - lib/docxtor/document/page_break.rb
178
+ - lib/docxtor/document/paragraph.rb
179
+ - lib/docxtor/document/root.rb
180
+ - lib/docxtor/document/table_of_contents.rb
181
+ - lib/docxtor/generator.rb
182
+ - lib/docxtor/package/builder.rb
183
+ - lib/docxtor/package/part.rb
184
+ - lib/docxtor/template_parser.rb
185
+ - lib/docxtor/version.rb
186
+ - spec/docxtor/document/builder_spec.rb
187
+ - spec/docxtor/document/heading_spec.rb
188
+ - spec/docxtor/document/paragraph_spec.rb
189
+ - spec/docxtor/document/root_spec.rb
190
+ - spec/docxtor/document/table_of_contents_spec.rb
191
+ - spec/docxtor/docxtor_spec.rb
192
+ - spec/docxtor/package/builder_spec.rb
193
+ - spec/docxtor/package/part_spec.rb
194
+ - spec/docxtor/prerequisites_spec.rb
195
+ - spec/docxtor/support/contexts/integration_context.rb
196
+ - spec/docxtor/support/contexts/xml_builder_context.rb
197
+ - spec/docxtor/support/examples/.gitkeep
198
+ - spec/docxtor/support/matchers/wordprocessingml_matchers.rb
199
+ - spec/docxtor/support/matchers/xpath_matchers.rb
200
+ - spec/docxtor/template_parser_spec.rb
201
+ - spec/spec_helper.rb
202
+ - templates/.gitkeep
203
+ - templates/default/[Content_Types].xml
204
+ - templates/default/_rels/.rels
205
+ - templates/default/word/_rels/document.xml.rels
206
+ - templates/default/word/endnotes.xml
207
+ - templates/default/word/fontTable.xml
208
+ - templates/default/word/footer1.xml
209
+ - templates/default/word/footer2.xml
210
+ - templates/default/word/footnotes.xml
211
+ - templates/default/word/numbering.xml
212
+ - templates/default/word/settings.xml
213
+ - templates/default/word/styles.xml
214
+ - templates/default/word/theme/theme1.xml
215
+ - templates/default/word/websettings.xml
216
+ homepage: http://github.com/docxtor/docxtor
217
+ licenses:
218
+ - MIT
219
+ post_install_message:
220
+ rdoc_options: []
221
+
222
+ require_paths:
223
+ - lib
224
+ required_ruby_version: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ hash: 3
230
+ segments:
231
+ - 0
232
+ version: "0"
233
+ required_rubygems_version: !ruby/object:Gem::Requirement
234
+ none: false
235
+ requirements:
236
+ - - ">="
237
+ - !ruby/object:Gem::Version
238
+ hash: 3
239
+ segments:
240
+ - 0
241
+ version: "0"
242
+ requirements: []
243
+
244
+ rubyforge_project:
245
+ rubygems_version: 1.8.15
246
+ signing_key:
247
+ specification_version: 3
248
+ summary: Ruby docx generator
249
+ test_files:
250
+ - spec/docxtor/document/builder_spec.rb
251
+ - spec/docxtor/document/heading_spec.rb
252
+ - spec/docxtor/document/paragraph_spec.rb
253
+ - spec/docxtor/document/root_spec.rb
254
+ - spec/docxtor/document/table_of_contents_spec.rb
255
+ - spec/docxtor/docxtor_spec.rb
256
+ - spec/docxtor/package/builder_spec.rb
257
+ - spec/docxtor/package/part_spec.rb
258
+ - spec/docxtor/prerequisites_spec.rb
259
+ - spec/docxtor/support/contexts/integration_context.rb
260
+ - spec/docxtor/support/contexts/xml_builder_context.rb
261
+ - spec/docxtor/support/examples/.gitkeep
262
+ - spec/docxtor/support/matchers/wordprocessingml_matchers.rb
263
+ - spec/docxtor/support/matchers/xpath_matchers.rb
264
+ - spec/docxtor/template_parser_spec.rb
265
+ - spec/spec_helper.rb