docxtor 0.1.1 → 0.2.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.
Files changed (43) hide show
  1. data/.ruby-version +1 -1
  2. data/Gemfile +1 -0
  3. data/README.md +88 -44
  4. data/lib/docxtor.rb +3 -0
  5. data/lib/docxtor/document/builder.rb +18 -3
  6. data/lib/docxtor/document/element.rb +9 -2
  7. data/lib/docxtor/generator.rb +7 -2
  8. data/lib/docxtor/package/builder.rb +2 -11
  9. data/lib/docxtor/reference_builder.rb +29 -0
  10. data/lib/docxtor/running_element.rb +69 -0
  11. data/lib/docxtor/running_elements_builder.rb +18 -0
  12. data/lib/docxtor/template_parser.rb +3 -10
  13. data/lib/docxtor/version.rb +1 -1
  14. data/spec/docxtor/document/builder_spec.rb +2 -4
  15. data/spec/docxtor/document/paragraph_spec.rb +8 -8
  16. data/spec/docxtor/document/root_spec.rb +21 -5
  17. data/spec/docxtor/document/table_of_contents_spec.rb +1 -5
  18. data/spec/docxtor/docxtor_spec.rb +6 -6
  19. data/spec/docxtor/package/builder_spec.rb +51 -11
  20. data/spec/docxtor/reference_builder_spec.rb +27 -0
  21. data/spec/docxtor/running_element_spec.rb +38 -0
  22. data/spec/docxtor/running_elements_builder_spec.rb +25 -0
  23. data/spec/docxtor/support/contexts/xml_builder_context.rb +0 -2
  24. data/spec/docxtor/template_parser_spec.rb +3 -3
  25. data/templates/default/[Content_Types].xml +1 -5
  26. data/templates/default/_rels/.rels +1 -4
  27. data/templates/default/docProps/app.xml +1 -0
  28. data/templates/default/docProps/core.xml +1 -0
  29. metadata +150 -154
  30. data/spec/docxtor/support/examples/.gitkeep +0 -0
  31. data/spec/docxtor/support/matchers/wordprocessingml_matchers.rb +0 -42
  32. data/spec/docxtor/support/matchers/xpath_matchers.rb +0 -46
  33. data/templates/default/word/_rels/document.xml.rels +0 -13
  34. data/templates/default/word/endnotes.xml +0 -17
  35. data/templates/default/word/fontTable.xml +0 -31
  36. data/templates/default/word/footer1.xml +0 -35
  37. data/templates/default/word/footer2.xml +0 -48
  38. data/templates/default/word/footnotes.xml +0 -17
  39. data/templates/default/word/numbering.xml +0 -212
  40. data/templates/default/word/settings.xml +0 -107
  41. data/templates/default/word/styles.xml +0 -368
  42. data/templates/default/word/theme/theme1.xml +0 -2
  43. data/templates/default/word/websettings.xml +0 -4
@@ -1,3 +1,3 @@
1
1
  module Docxtor
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -2,15 +2,13 @@ require 'spec_helper'
2
2
 
3
3
  module Docxtor
4
4
  describe Document::Builder do
5
- include WordprocessingMLMatchers
6
-
7
- subject { Document::Builder.new do
5
+ subject { Document::Builder.new [] do
8
6
  p "Hi"
9
7
  end
10
8
  }
11
9
 
12
10
  it 'contains body' do
13
- subject.content.should contain_body
11
+ expect { subject.content.include? "body" }
14
12
  end
15
13
  end
16
14
  end
@@ -18,36 +18,36 @@ module Docxtor
18
18
  }
19
19
 
20
20
  it 'contains reference to style' do
21
- subject.should contain_element_style(:p)
21
+ expect { subject.include? "w:pStyle" }
22
22
  end
23
23
 
24
24
  it 'contains spacing property' do
25
- subject.should contain_element_property(:p, :spacing)
25
+ expect { subject.include? "w:spacing" }
26
26
  end
27
27
 
28
28
  it 'contains font size property' do
29
- subject.should contain_element_property(:p, :sz)
29
+ expect { subject.include? "w:sz" }
30
30
  end
31
31
 
32
32
  it 'contains complex font size property' do
33
- subject.should contain_element_property(:p, :szCs)
33
+ expect { subject.include? "w:szCs" }
34
34
  end
35
35
 
36
36
  it 'contains indentiation property' do
37
- subject.should contain_element_property(:p, :ind)
37
+ expect { subject.include? "w:ind" }
38
38
  end
39
39
 
40
40
  context 'nested run' do
41
41
  it 'is bold' do
42
- subject.should contain_element_property(:r, :b)
42
+ expect { subject.include? "<w:b/>" }
43
43
  end
44
44
 
45
45
  it 'is italic' do
46
- subject.should contain_element_property(:r, :i)
46
+ expect { subject.include? "<w:i/>" }
47
47
  end
48
48
 
49
49
  it 'is underlined' do
50
- subject.should contain_element_property(:r, :u)
50
+ expect { subject.include? "<w:u/>" }
51
51
  end
52
52
  end
53
53
 
@@ -4,16 +4,32 @@ module Docxtor
4
4
  describe Document::Root do
5
5
  include_context "xmlbuilder" do
6
6
 
7
- subject {
8
- Document::Root.new(:style => 1) do
7
+ it 'appends element to elements' do
8
+ root = Document::Root.new(:style => 1) do
9
9
  p do
10
10
  w "Hi"
11
11
  end
12
12
  end
13
- }
14
13
 
15
- it 'appends element to elements' do
16
- subject.elements.first.should be_instance_of Docxtor::Document::Paragraph
14
+ expect { root.elements.first.should be_instance_of Docxtor::Document::Paragraph }
15
+ end
16
+
17
+ it "ignores certain known methods" do
18
+ root = Document::Root.new(:style => 1) do
19
+ footer "2013"
20
+ end
21
+
22
+ expect { root.elements.empty? }
23
+ end
24
+
25
+ it "throws an error if unknown method is passed" do
26
+ root = begin
27
+ Document::Root.new(:style => 1) { bla "Ble" }
28
+ rescue NoMethodError
29
+ "UnknownMethod"
30
+ end
31
+
32
+ expect { root == "UnknownMethod" }
17
33
  end
18
34
  end
19
35
  end
@@ -7,11 +7,7 @@ module Docxtor
7
7
  subject { render(Document::TableOfContents, 'Contents') }
8
8
 
9
9
  it 'contains gallery of document parts' do
10
- subject.should contain_gallery_of_document_parts
11
- end
12
-
13
- it 'contains heading text' do
14
- subject.should contain_sdt_content_heading
10
+ expect { subject.include? "docPartGallery" }
15
11
  end
16
12
  end
17
13
  end
@@ -1,13 +1,13 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Docxtor, "#generate" do
4
- context "when supplied all the same parameters that Generator takes" do
4
+ context "when supplied with all the same parameters that Generator takes" do
5
5
  it 'does not throw errors' do
6
- deny { rescuing {
7
- Docxtor.generate do
8
- p "Paragraph"
9
- end
10
- } }
6
+ expect {
7
+ Docxtor.generate do
8
+ p "Paragraph"
9
+ end
10
+ }
11
11
  end
12
12
  end
13
13
  end
@@ -1,8 +1,34 @@
1
+ require 'tempfile'
1
2
  require 'spec_helper'
2
3
 
3
4
  module Docxtor
4
5
  describe Package::Builder do
5
- subject { Package::Builder.new({}, Package::Part.new("word/document.xml", 'content')) }
6
+ let(:document) { double("Document::Builder") }
7
+ let(:part) { double("Package::Part") }
8
+ let(:header) { double("RunningElement") }
9
+
10
+ subject { Package::Builder.new([part, document, header]) }
11
+ before do
12
+ part.stub(:filename) {"word/settings.xml"}
13
+ part.stub(:content) {"settings"}
14
+
15
+ document.stub(:filename) {"word/document.xml"}
16
+ document.stub(:content) {"content"}
17
+
18
+ header.stub(:type) {:header}
19
+ header.stub(:filename) {"word/header1.xml"}
20
+ header.stub(:content) {"header"}
21
+ end
22
+
23
+ describe "#initialize" do
24
+ it "builds list of package parts from provided arguments" do
25
+ document_part = subject.parts.find {|part| part.filename == "word/document.xml"}
26
+ expect {
27
+ !document.nil?
28
+ subject.parts.count == 3
29
+ }
30
+ end
31
+ end
6
32
 
7
33
  include_context 'integration' do
8
34
  context "given filepath and source document" do
@@ -15,21 +41,35 @@ module Docxtor
15
41
  end
16
42
 
17
43
  context 'after serialization' do
44
+ before do
45
+ @tempfile = Tempfile.new("test.docx")
46
+ subject.save(@tempfile.path)
47
+ zip_input_stream = Zip::ZipInputStream.open(@tempfile.path)
48
+
49
+ while (entry = zip_input_stream.get_next_entry)
50
+ @document_entry = entry if entry.name == "word/document.xml"
51
+ @header_entry = entry if entry.name = "word/header1.xml"
52
+ end
53
+ end
54
+
55
+ after do
56
+ @tempfile.unlink
57
+ end
58
+
18
59
  it 'contains data' do
19
- string_io = subject.to_stream
20
- expect { string_io.size > 0 }
60
+ expect { @tempfile.size > 0 }
21
61
  end
22
62
 
23
63
  it 'contains document part' do
24
- string_io = subject.to_stream
25
- istream = Zip::ZipInputStream.open_buffer(string_io)
26
-
27
- deny { rescuing {
28
- document_entry = istream.get_next_entry
64
+ expect {
65
+ @document_entry
66
+ }
67
+ end
29
68
 
30
- expect { document_entry != nil }
31
- expect { document_entry.name == "word/document.xml" }
32
- } }
69
+ it 'contains running elements part' do
70
+ expect {
71
+ @header_entry
72
+ }
33
73
  end
34
74
  end
35
75
  end
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+
3
+ module Docxtor
4
+ describe ReferenceBuilder do
5
+ let(:element) { double("Document::RunningElement") }
6
+
7
+ subject { ReferenceBuilder.new([element]) }
8
+
9
+ before do
10
+ element.stub(:name) { "header1.xml" }
11
+ element.stub(:reference_type) { "header" }
12
+ element.stub(:reference_id=) { "rId1" }
13
+ element.stub(:reference_id) { "rId1" }
14
+ end
15
+
16
+ it "responds to #filename" do
17
+ expect { subject.respond_to? :filename }
18
+ end
19
+
20
+ it "renders xml with element's reference info" do
21
+ expect {
22
+ subject.content.include?("Relationship")
23
+ subject.content.include?("header1.xml")
24
+ }
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,38 @@
1
+ require 'spec_helper'
2
+
3
+ module Docxtor
4
+ describe RunningElement do
5
+ subject { RunningElement.new :footer, 1, :pagenum, {:pages => "odd"} }
6
+
7
+ it "can have referenve_id assigned to it" do
8
+ subject.reference_id = "rId1"
9
+
10
+ expect { subject.reference_id == "rId1" }
11
+ end
12
+
13
+ it "responds to 'reference_name'" do
14
+ expect { subject.reference_name == "footerReference" }
15
+ end
16
+
17
+ it "responds to 'name'" do
18
+ expect { subject.name == "footer1.xml" }
19
+ end
20
+
21
+ it "responds to 'filename'" do
22
+ expect { subject.filename == "word/footer1.xml" }
23
+ end
24
+
25
+ it "responds to 'reference_type'" do
26
+ expect { subject.reference_type == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" }
27
+ end
28
+
29
+ describe "#content" do
30
+ it "returns xml with correct contents markup" do
31
+ expect {
32
+ subject.content.include? "instrText"
33
+ subject.content.include? "PAGE"
34
+ }
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ module Docxtor
4
+ describe RunningElementsBuilder do
5
+ subject {
6
+ RunningElementsBuilder.new do
7
+ header :pagenum, :align => :center
8
+ footer "Made by me", :pages => :odd
9
+ footer "2013", :pages => :even
10
+ end
11
+ }
12
+
13
+ it "has elements" do
14
+ expect { subject.respond_to?(:elements) }
15
+ end
16
+
17
+ describe "#elements" do
18
+ it "returns a list of running elements" do
19
+ expect {
20
+ subject.elements.count == 3
21
+ }
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,7 +1,5 @@
1
1
  module Docxtor
2
2
  shared_context 'xmlbuilder' do
3
- include WordprocessingMLMatchers
4
-
5
3
  def render(klass, *args, &block)
6
4
  builder = Builder::XmlMarkup.new
7
5
  klass.new(*args, &block).render(builder)
@@ -3,15 +3,15 @@ require 'spec_helper'
3
3
  module Docxtor
4
4
  describe TemplateParser do
5
5
  include_context 'integration' do
6
- subject { TemplateParser.new(template) }
6
+ subject { TemplateParser.new }
7
7
 
8
8
  it 'finds exact count of template files' do
9
9
  expected = Dir.chdir(template) {
10
10
  Dir[TemplateParser::FILES_PATTERN].
11
11
  delete_if { |file| File.directory?(file) }.
12
- length
12
+ count
13
13
  }
14
- expect { subject.parts.length == expected }
14
+ expect { subject.parts.count == expected }
15
15
  end
16
16
  end
17
17
  end
@@ -4,13 +4,9 @@
4
4
  <Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels"/>
5
5
  <Default ContentType="application/xml" Extension="xml"/>
6
6
  <Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" PartName="/word/document.xml"/>
7
- <Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml" PartName="/word/numbering.xml"/>
8
7
  <Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml" PartName="/word/styles.xml"/>
9
- <Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml" PartName="/word/endnotes.xml"/>
10
8
  <Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml" PartName="/word/settings.xml"/>
11
9
  <Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml" PartName="/word/footer2.xml"/>
12
10
  <Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml" PartName="/word/footer1.xml"/>
13
- <Override ContentType="application/vnd.openxmlformats-officedocument.theme+xml" PartName="/word/theme/theme1.xml"/>
14
11
  <Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml" PartName="/word/fontTable.xml"/>
15
- <Override ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml" PartName="/word/webSettings.xml"/>
16
- </Types>
12
+ </Types>
@@ -1,4 +1 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
- <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
3
- <Relationship Id="rId1" Target="word/document.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"/>
4
- </Relationships>
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/></Relationships>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"/>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?><cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
metadata CHANGED
@@ -1,163 +1,167 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: docxtor
3
- version: !ruby/object:Gem::Version
4
- hash: 25
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 1
10
- version: 0.1.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Irina Bednova, Vasiliy Yorkin
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-09-23 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2013-12-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: bundler
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 9
29
- segments:
30
- - 1
31
- - 3
32
- version: "1.3"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.3'
33
22
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rake
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
47
38
  type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: nokogiri
51
39
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: nokogiri
48
+ requirement: !ruby/object:Gem::Requirement
53
49
  none: false
54
- requirements:
50
+ requirements:
55
51
  - - ~>
56
- - !ruby/object:Gem::Version
57
- hash: 7
58
- segments:
59
- - 1
60
- - 4
61
- - 0
52
+ - !ruby/object:Gem::Version
62
53
  version: 1.4.0
63
54
  type: :development
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: rspec
67
55
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.4.0
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
69
65
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
77
70
  type: :development
78
- version_requirements: *id004
79
- - !ruby/object:Gem::Dependency
80
- name: rspec-xml
81
71
  prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: rspec-xml
80
+ requirement: !ruby/object:Gem::Requirement
83
81
  none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
91
86
  type: :development
92
- version_requirements: *id005
93
- - !ruby/object:Gem::Dependency
94
- name: wrong
95
87
  prerelease: false
96
- requirement: &id006 !ruby/object:Gem::Requirement
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: wrong
96
+ requirement: !ruby/object:Gem::Requirement
97
97
  none: false
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- hash: 3
102
- segments:
103
- - 0
104
- version: "0"
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
105
102
  type: :development
106
- version_requirements: *id006
107
- - !ruby/object:Gem::Dependency
108
- name: builder
109
103
  prerelease: false
110
- requirement: &id007 !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
111
105
  none: false
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- hash: 3
116
- segments:
117
- - 0
118
- version: "0"
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: builder
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
119
118
  type: :runtime
120
- version_requirements: *id007
121
- - !ruby/object:Gem::Dependency
122
- name: rubytree
123
119
  prerelease: false
124
- requirement: &id008 !ruby/object:Gem::Requirement
120
+ version_requirements: !ruby/object:Gem::Requirement
125
121
  none: false
126
- requirements:
127
- - - ">="
128
- - !ruby/object:Gem::Version
129
- hash: 3
130
- segments:
131
- - 0
132
- version: "0"
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubytree
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
133
134
  type: :runtime
134
- version_requirements: *id008
135
- - !ruby/object:Gem::Dependency
136
- name: rubyzip
137
135
  prerelease: false
138
- requirement: &id009 !ruby/object:Gem::Requirement
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: rubyzip
144
+ requirement: !ruby/object:Gem::Requirement
139
145
  none: false
140
- requirements:
141
- - - "="
142
- - !ruby/object:Gem::Version
143
- hash: 41
144
- segments:
145
- - 0
146
- - 9
147
- - 9
146
+ requirements:
147
+ - - '='
148
+ - !ruby/object:Gem::Version
148
149
  version: 0.9.9
149
150
  type: :runtime
150
- version_requirements: *id009
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - '='
156
+ - !ruby/object:Gem::Version
157
+ version: 0.9.9
151
158
  description: Ruby docx generator, provides simple DSL for building word documents
152
- email:
159
+ email:
153
160
  - howeveririna@gmail.com, vasiliy.yorkin@gmail.com
154
161
  executables: []
155
-
156
162
  extensions: []
157
-
158
163
  extra_rdoc_files: []
159
-
160
- files:
164
+ files:
161
165
  - .coveralls.yml
162
166
  - .gitignore
163
167
  - .rspec
@@ -181,6 +185,9 @@ files:
181
185
  - lib/docxtor/generator.rb
182
186
  - lib/docxtor/package/builder.rb
183
187
  - lib/docxtor/package/part.rb
188
+ - lib/docxtor/reference_builder.rb
189
+ - lib/docxtor/running_element.rb
190
+ - lib/docxtor/running_elements_builder.rb
184
191
  - lib/docxtor/template_parser.rb
185
192
  - lib/docxtor/version.rb
186
193
  - spec/docxtor/document/builder_spec.rb
@@ -192,61 +199,50 @@ files:
192
199
  - spec/docxtor/package/builder_spec.rb
193
200
  - spec/docxtor/package/part_spec.rb
194
201
  - spec/docxtor/prerequisites_spec.rb
202
+ - spec/docxtor/reference_builder_spec.rb
203
+ - spec/docxtor/running_element_spec.rb
204
+ - spec/docxtor/running_elements_builder_spec.rb
195
205
  - spec/docxtor/support/contexts/integration_context.rb
196
206
  - 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
207
  - spec/docxtor/template_parser_spec.rb
201
208
  - spec/spec_helper.rb
202
209
  - templates/.gitkeep
203
210
  - templates/default/[Content_Types].xml
204
211
  - 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
212
+ - templates/default/docProps/app.xml
213
+ - templates/default/docProps/core.xml
216
214
  homepage: http://github.com/docxtor/docxtor
217
- licenses:
215
+ licenses:
218
216
  - MIT
219
217
  post_install_message:
220
218
  rdoc_options: []
221
-
222
- require_paths:
219
+ require_paths:
223
220
  - lib
224
- required_ruby_version: !ruby/object:Gem::Requirement
221
+ required_ruby_version: !ruby/object:Gem::Requirement
225
222
  none: false
226
- requirements:
227
- - - ">="
228
- - !ruby/object:Gem::Version
229
- hash: 3
230
- segments:
223
+ requirements:
224
+ - - ! '>='
225
+ - !ruby/object:Gem::Version
226
+ version: '0'
227
+ segments:
231
228
  - 0
232
- version: "0"
233
- required_rubygems_version: !ruby/object:Gem::Requirement
229
+ hash: -2610134093399067772
230
+ required_rubygems_version: !ruby/object:Gem::Requirement
234
231
  none: false
235
- requirements:
236
- - - ">="
237
- - !ruby/object:Gem::Version
238
- hash: 3
239
- segments:
232
+ requirements:
233
+ - - ! '>='
234
+ - !ruby/object:Gem::Version
235
+ version: '0'
236
+ segments:
240
237
  - 0
241
- version: "0"
238
+ hash: -2610134093399067772
242
239
  requirements: []
243
-
244
240
  rubyforge_project:
245
- rubygems_version: 1.8.15
241
+ rubygems_version: 1.8.23
246
242
  signing_key:
247
243
  specification_version: 3
248
244
  summary: Ruby docx generator
249
- test_files:
245
+ test_files:
250
246
  - spec/docxtor/document/builder_spec.rb
251
247
  - spec/docxtor/document/heading_spec.rb
252
248
  - spec/docxtor/document/paragraph_spec.rb
@@ -256,10 +252,10 @@ test_files:
256
252
  - spec/docxtor/package/builder_spec.rb
257
253
  - spec/docxtor/package/part_spec.rb
258
254
  - spec/docxtor/prerequisites_spec.rb
255
+ - spec/docxtor/reference_builder_spec.rb
256
+ - spec/docxtor/running_element_spec.rb
257
+ - spec/docxtor/running_elements_builder_spec.rb
259
258
  - spec/docxtor/support/contexts/integration_context.rb
260
259
  - 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
260
  - spec/docxtor/template_parser_spec.rb
265
261
  - spec/spec_helper.rb