asciidoctor-iso 0.9.3 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +36 -15
- data/README.adoc +3 -0
- data/asciidoctor-iso.gemspec +4 -4
- data/docs/customisation.adoc +178 -0
- data/docs/guidance.adoc +436 -0
- data/docs/quickstart.adoc +375 -0
- data/lib/asciidoctor/iso/base.rb +17 -5
- data/lib/asciidoctor/iso/biblio.rng +253 -48
- data/lib/asciidoctor/iso/cleanup_ref.rb +8 -4
- data/lib/asciidoctor/iso/isodoc.rng +1 -1
- data/lib/asciidoctor/iso/isostandard.rng +1 -1
- data/lib/asciidoctor/iso/lists.rb +0 -1
- data/lib/asciidoctor/iso/ref.rb +5 -60
- data/lib/asciidoctor/iso/section.rb +4 -2
- data/lib/asciidoctor/iso/utils.rb +6 -0
- data/lib/asciidoctor/iso/validate.rb +16 -1
- data/lib/asciidoctor/iso/validate_section.rb +5 -5
- data/lib/asciidoctor/iso/version.rb +1 -1
- data/spec/asciidoctor-iso/blocks_spec.rb +4 -4
- data/spec/asciidoctor-iso/cleanup_spec.rb +5 -5
- data/spec/asciidoctor-iso/isobib_cache_spec.rb +9 -11
- data/spec/asciidoctor-iso/refs_spec.rb +1 -1
- data/spec/asciidoctor-iso/section_spec.rb +5 -5
- data/spec/asciidoctor-iso/validate_spec.rb +83 -31
- data/spec/metanorma/processor_spec.rb +1 -1
- metadata +14 -11
@@ -1,35 +1,5 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
RSpec.describe "warns when year resource fetched through isobib does not match specified year" do
|
4
|
-
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/There was no match for 1066/).to_stderr }
|
5
|
-
#{ISOBIB_BLANK_HDR}
|
6
|
-
[bibliography]
|
7
|
-
== Normative References
|
8
|
-
|
9
|
-
* [[[iso123,ISO 123:1066]]] _Standard_
|
10
|
-
INPUT
|
11
|
-
end
|
12
|
-
|
13
|
-
RSpec.describe "warns when resource with part number not found on ISO website" do
|
14
|
-
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/The provided document part may not exist, or the document may no longer be published in parts/).to_stderr }
|
15
|
-
#{ISOBIB_BLANK_HDR}
|
16
|
-
[bibliography]
|
17
|
-
== Normative References
|
18
|
-
|
19
|
-
* [[[iso123,ISO 00000-001]]] _Standard_
|
20
|
-
INPUT
|
21
|
-
end
|
22
|
-
|
23
|
-
RSpec.describe "warns when resource without part number not found on ISO website" do
|
24
|
-
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/If you wanted to cite all document parts for the reference/).to_stderr }
|
25
|
-
#{ISOBIB_BLANK_HDR}
|
26
|
-
[bibliography]
|
27
|
-
== Normative References
|
28
|
-
|
29
|
-
* [[[iso123,ISO 00000]]] _Standard_
|
30
|
-
INPUT
|
31
|
-
end
|
32
|
-
|
33
3
|
RSpec.describe "warns when missing a title" do
|
34
4
|
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Table should have title/).to_stderr }
|
35
5
|
#{VALIDATING_BLANK_HDR}
|
@@ -488,7 +458,7 @@ RSpec.describe "Warning if no normative references" do
|
|
488
458
|
INPUT
|
489
459
|
end
|
490
460
|
|
491
|
-
RSpec.describe "Warning if final section is not Bibliography" do
|
461
|
+
RSpec.describe "Warning if final section is not named Bibliography" do
|
492
462
|
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{There are sections after the final Bibliography}).to_stderr }
|
493
463
|
#{VALIDATING_BLANK_HDR}
|
494
464
|
|
@@ -519,6 +489,33 @@ RSpec.describe "Warning if final section is not Bibliography" do
|
|
519
489
|
INPUT
|
520
490
|
end
|
521
491
|
|
492
|
+
RSpec.describe "Warning if final section is not styled Bibliography" do
|
493
|
+
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Section not marked up as \[bibliography\]!}).to_stderr }
|
494
|
+
#{VALIDATING_BLANK_HDR}
|
495
|
+
|
496
|
+
.Foreword
|
497
|
+
Foreword
|
498
|
+
|
499
|
+
== Scope
|
500
|
+
|
501
|
+
[bibliography]
|
502
|
+
== Normative References
|
503
|
+
|
504
|
+
== Terms and Definitions
|
505
|
+
|
506
|
+
== Clause
|
507
|
+
|
508
|
+
[appendix]
|
509
|
+
== Appendix A
|
510
|
+
|
511
|
+
[appendix]
|
512
|
+
== Appendix B
|
513
|
+
|
514
|
+
== Bibliography
|
515
|
+
|
516
|
+
INPUT
|
517
|
+
end
|
518
|
+
|
522
519
|
RSpec.describe "Warning if English title intro and no French title intro" do
|
523
520
|
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No French Title Intro!}).to_stderr }
|
524
521
|
= Document title
|
@@ -751,3 +748,58 @@ RSpec.describe "validates document against ISO XML schema" do
|
|
751
748
|
INPUT
|
752
749
|
end
|
753
750
|
|
751
|
+
|
752
|
+
RSpec.describe "Warning if terms mismatches IEV" do
|
753
|
+
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Term "automation" does not match IEV 103-01-02 "functional"}).to_stderr }
|
754
|
+
#{VALIDATING_BLANK_HDR}
|
755
|
+
|
756
|
+
[bibliography]
|
757
|
+
== Normative References
|
758
|
+
* [[[iev,IEV]]], _iev_
|
759
|
+
|
760
|
+
== Terms and definitions
|
761
|
+
=== Automation
|
762
|
+
|
763
|
+
[.source]
|
764
|
+
<<iev,clause="103-01-02">>
|
765
|
+
INPUT
|
766
|
+
end
|
767
|
+
|
768
|
+
RSpec.describe "No warning if English term matches IEV" do
|
769
|
+
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{does not match IEV 103-01-02}).to_stderr }
|
770
|
+
#{VALIDATING_BLANK_HDR}
|
771
|
+
|
772
|
+
[bibliography]
|
773
|
+
== Normative References
|
774
|
+
* [[[iev,IEV]]], _iev_
|
775
|
+
|
776
|
+
== Terms and definitions
|
777
|
+
=== Functional
|
778
|
+
|
779
|
+
[.source]
|
780
|
+
<<iev,clause="103-01-02">>
|
781
|
+
INPUT
|
782
|
+
end
|
783
|
+
|
784
|
+
RSpec.describe "No warning if French term matches IEV" do
|
785
|
+
specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{does not match IEV 103-01-02}).to_stderr }
|
786
|
+
= Document title
|
787
|
+
Author
|
788
|
+
:docfile: test.adoc
|
789
|
+
:nodoc:
|
790
|
+
:no-isobib:
|
791
|
+
:language: fr
|
792
|
+
|
793
|
+
[bibliography]
|
794
|
+
== Normative References
|
795
|
+
* [[[iev,IEV]]], _iev_
|
796
|
+
|
797
|
+
== Terms and definitions
|
798
|
+
=== Fonctionnelle, f
|
799
|
+
|
800
|
+
[.source]
|
801
|
+
<<iev,clause="103-01-02">>
|
802
|
+
INPUT
|
803
|
+
end
|
804
|
+
|
805
|
+
|
@@ -14,7 +14,7 @@ RSpec.describe Metanorma::Iso::Processor do
|
|
14
14
|
|
15
15
|
it "registers output formats against metanorma" do
|
16
16
|
expect(processor.output_formats.sort.to_s).to be_equivalent_to <<~"OUTPUT"
|
17
|
-
[[:doc, "doc"], [:html, "html"], [:html_alt, "alt.html"]]
|
17
|
+
[[:doc, "doc"], [:html, "html"], [:html_alt, "alt.html"], [:xml, "xml"]]
|
18
18
|
OUTPUT
|
19
19
|
end
|
20
20
|
|
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.9.
|
4
|
+
version: 0.9.5
|
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-07-
|
11
|
+
date: 2018-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -53,33 +53,33 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: iev
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.1.
|
61
|
+
version: 0.1.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.1.
|
68
|
+
version: 0.1.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: relaton
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1
|
75
|
+
version: 0.0.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.1
|
82
|
+
version: 0.0.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,14 +226,14 @@ dependencies:
|
|
226
226
|
requirements:
|
227
227
|
- - "~>"
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: 0.2.
|
229
|
+
version: 0.2.5
|
230
230
|
type: :development
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - "~>"
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: 0.2.
|
236
|
+
version: 0.2.5
|
237
237
|
description: |
|
238
238
|
asciidoctor-iso lets you write ISO standards in AsciiDoc syntax.
|
239
239
|
|
@@ -261,6 +261,9 @@ files:
|
|
261
261
|
- Rakefile
|
262
262
|
- asciidoctor-iso.gemspec
|
263
263
|
- bin/rspec
|
264
|
+
- docs/customisation.adoc
|
265
|
+
- docs/guidance.adoc
|
266
|
+
- docs/quickstart.adoc
|
264
267
|
- lib/asciidoctor-iso.rb
|
265
268
|
- lib/asciidoctor/iso/base.rb
|
266
269
|
- lib/asciidoctor/iso/biblio.rng
|
@@ -319,7 +322,7 @@ files:
|
|
319
322
|
- spec/spec_helper.rb
|
320
323
|
homepage: https://github.com/riboseinc/asciidoctor-iso
|
321
324
|
licenses:
|
322
|
-
-
|
325
|
+
- BSD-2-Clause
|
323
326
|
metadata: {}
|
324
327
|
post_install_message:
|
325
328
|
rdoc_options: []
|