asciidoctor-iso 0.6.1 → 0.7.0
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 +4 -4
- data/.gitattributes +2 -0
- data/.travis.yml +5 -0
- data/Gemfile.lock +12 -10
- data/README.adoc +113 -16
- data/bin/rspec +18 -0
- data/lib/asciidoctor/iso/base.rb +30 -28
- data/lib/asciidoctor/iso/blocks.rb +33 -33
- data/lib/asciidoctor/iso/cleanup.rb +79 -33
- data/lib/asciidoctor/iso/cleanup_block.rb +71 -18
- data/lib/asciidoctor/iso/cleanup_ref.rb +35 -30
- data/lib/asciidoctor/iso/converter.rb +0 -3
- data/lib/asciidoctor/iso/front.rb +29 -16
- data/lib/asciidoctor/iso/html/isodoc.css +34 -0
- data/lib/asciidoctor/iso/html/wordstyle.css +138 -6
- data/lib/asciidoctor/iso/inline.rb +10 -22
- data/lib/asciidoctor/iso/isodoc.rng +66 -16
- data/lib/asciidoctor/iso/isostandard.rng +129 -15
- data/lib/asciidoctor/iso/lists.rb +49 -42
- data/lib/asciidoctor/iso/macros.rb +12 -8
- data/lib/asciidoctor/iso/section.rb +53 -37
- data/lib/asciidoctor/iso/table.rb +9 -1
- data/lib/asciidoctor/iso/utils.rb +18 -13
- data/lib/asciidoctor/iso/validate.rb +100 -24
- data/lib/asciidoctor/iso/validate_requirements.rb +106 -0
- data/lib/asciidoctor/iso/validate_section.rb +85 -65
- data/lib/asciidoctor/iso/validate_style.rb +68 -115
- data/lib/asciidoctor/iso/version.rb +1 -1
- data/spec/asciidoctor-iso/base_spec.rb +193 -0
- data/spec/asciidoctor-iso/blocks_spec.rb +426 -0
- data/spec/asciidoctor-iso/cleanup_spec.rb +687 -0
- data/spec/asciidoctor-iso/inline_spec.rb +159 -0
- data/spec/asciidoctor-iso/lists_spec.rb +189 -0
- data/spec/asciidoctor-iso/macros_spec.rb +20 -0
- data/spec/asciidoctor-iso/refs_spec.rb +194 -0
- data/spec/asciidoctor-iso/section_spec.rb +301 -0
- data/spec/asciidoctor-iso/table_spec.rb +307 -0
- data/spec/asciidoctor-iso/validate_spec.rb +749 -0
- data/spec/examples/english.yaml +69 -0
- data/spec/examples/rice.adoc +30 -28
- data/spec/examples/rice.doc +3035 -2865
- data/spec/examples/rice.html +281 -234
- data/spec/examples/rice.preview.html +30 -20
- data/spec/examples/rice.xml +250 -282
- data/spec/spec_helper.rb +87 -0
- metadata +17 -2
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
require "simplecov"
|
2
|
+
SimpleCov.start do
|
3
|
+
add_filter "/spec/"
|
4
|
+
end
|
5
|
+
|
6
|
+
require "bundler/setup"
|
7
|
+
require "asciidoctor"
|
8
|
+
require "asciidoctor-iso"
|
9
|
+
require "rspec/matchers"
|
10
|
+
require "equivalent-xml"
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
# Enable flags like --only-failures and --next-failure
|
14
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
15
|
+
|
16
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
17
|
+
config.disable_monkey_patching!
|
18
|
+
|
19
|
+
config.expect_with :rspec do |c|
|
20
|
+
c.syntax = :expect
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def strip_guid(x)
|
25
|
+
x.gsub(%r{ id="_[^"]+"}, ' id="_"').gsub(%r{ target="_[^"]+"}, ' target="_"')
|
26
|
+
end
|
27
|
+
|
28
|
+
ASCIIDOC_BLANK_HDR = <<~"HDR"
|
29
|
+
= Document title
|
30
|
+
Author
|
31
|
+
:docfile: test.adoc
|
32
|
+
:nodoc:
|
33
|
+
:novalid:
|
34
|
+
|
35
|
+
HDR
|
36
|
+
|
37
|
+
VALIDATING_BLANK_HDR = <<~"HDR"
|
38
|
+
= Document title
|
39
|
+
Author
|
40
|
+
:docfile: test.adoc
|
41
|
+
:nodoc:
|
42
|
+
|
43
|
+
HDR
|
44
|
+
|
45
|
+
BLANK_HDR = <<~"HDR"
|
46
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
47
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
48
|
+
<bibdata type="article">
|
49
|
+
<title>
|
50
|
+
</title>
|
51
|
+
<title>
|
52
|
+
</title>
|
53
|
+
<docidentifier>
|
54
|
+
<project-number/>
|
55
|
+
</docidentifier>
|
56
|
+
<contributor>
|
57
|
+
<role type="author"/>
|
58
|
+
<organization>
|
59
|
+
<name>ISO</name>
|
60
|
+
</organization>
|
61
|
+
</contributor>
|
62
|
+
<contributor>
|
63
|
+
<role type="publisher"/>
|
64
|
+
<organization>
|
65
|
+
<name>ISO</name>
|
66
|
+
</organization>
|
67
|
+
</contributor>
|
68
|
+
<script>Latn</script>
|
69
|
+
<status>
|
70
|
+
<stage>60</stage>
|
71
|
+
<substage>60</substage>
|
72
|
+
</status>
|
73
|
+
<copyright>
|
74
|
+
<from>#{Time.new.year}</from>
|
75
|
+
<owner>
|
76
|
+
<organization>
|
77
|
+
<name>ISO</name>
|
78
|
+
</organization>
|
79
|
+
</owner>
|
80
|
+
</copyright>
|
81
|
+
<editorialgroup>
|
82
|
+
<technical-committee/>
|
83
|
+
<subcommittee/>
|
84
|
+
<workgroup/>
|
85
|
+
</editorialgroup>
|
86
|
+
</bibdata>
|
87
|
+
HDR
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -279,12 +279,14 @@ files:
|
|
279
279
|
- ".rubocop.ribose.yml"
|
280
280
|
- ".rubocop.tb.yml"
|
281
281
|
- ".rubocop.yml"
|
282
|
+
- ".travis.yml"
|
282
283
|
- Gemfile
|
283
284
|
- Gemfile.lock
|
284
285
|
- Makefile
|
285
286
|
- README.adoc
|
286
287
|
- Rakefile
|
287
288
|
- asciidoctor-iso.gemspec
|
289
|
+
- bin/rspec
|
288
290
|
- lib/asciidoctor-iso.rb
|
289
291
|
- lib/asciidoctor/iso/base.rb
|
290
292
|
- lib/asciidoctor/iso/blocks.rb
|
@@ -312,9 +314,21 @@ files:
|
|
312
314
|
- lib/asciidoctor/iso/table.rb
|
313
315
|
- lib/asciidoctor/iso/utils.rb
|
314
316
|
- lib/asciidoctor/iso/validate.rb
|
317
|
+
- lib/asciidoctor/iso/validate_requirements.rb
|
315
318
|
- lib/asciidoctor/iso/validate_section.rb
|
316
319
|
- lib/asciidoctor/iso/validate_style.rb
|
317
320
|
- lib/asciidoctor/iso/version.rb
|
321
|
+
- spec/asciidoctor-iso/base_spec.rb
|
322
|
+
- spec/asciidoctor-iso/blocks_spec.rb
|
323
|
+
- spec/asciidoctor-iso/cleanup_spec.rb
|
324
|
+
- spec/asciidoctor-iso/inline_spec.rb
|
325
|
+
- spec/asciidoctor-iso/lists_spec.rb
|
326
|
+
- spec/asciidoctor-iso/macros_spec.rb
|
327
|
+
- spec/asciidoctor-iso/refs_spec.rb
|
328
|
+
- spec/asciidoctor-iso/section_spec.rb
|
329
|
+
- spec/asciidoctor-iso/table_spec.rb
|
330
|
+
- spec/asciidoctor-iso/validate_spec.rb
|
331
|
+
- spec/examples/english.yaml
|
318
332
|
- spec/examples/rice.adoc
|
319
333
|
- spec/examples/rice.doc
|
320
334
|
- spec/examples/rice.html
|
@@ -326,6 +340,7 @@ files:
|
|
326
340
|
- spec/examples/rice_images/rice_image3_1.png
|
327
341
|
- spec/examples/rice_images/rice_image3_2.png
|
328
342
|
- spec/examples/rice_images/rice_image3_3.png
|
343
|
+
- spec/spec_helper.rb
|
329
344
|
homepage: https://github.com/riboseinc/asciidoctor-iso
|
330
345
|
licenses:
|
331
346
|
- MIT
|