metanorma-iso 1.9.3 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iso/basicdoc.rng +21 -4
- data/lib/asciidoctor/iso/front.rb +9 -1
- data/lib/asciidoctor/iso/isodoc.rng +435 -78
- data/lib/asciidoctor/iso/isostandard.rng +7 -23
- data/lib/asciidoctor/iso/reqt.rng +23 -2
- data/lib/asciidoctor/iso/validate.rb +7 -7
- data/lib/asciidoctor/iso/validate_section.rb +1 -1
- data/lib/isodoc/iso/html/isodoc.css +1 -2
- data/lib/isodoc/iso/html/isodoc.scss +1 -1
- data/lib/isodoc/iso/html/wordstyle.css +16 -4
- data/lib/isodoc/iso/html/wordstyle.scss +16 -4
- data/lib/isodoc/iso/iso.amendment.xsl +174 -11
- data/lib/isodoc/iso/iso.international-standard.xsl +174 -11
- data/lib/isodoc/iso/presentation_xml_convert.rb +30 -22
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -3
- data/spec/asciidoctor/base_spec.rb +351 -178
- data/spec/asciidoctor/blank_spec.rb +38 -0
- data/spec/asciidoctor/blocks_spec.rb +28 -14
- data/spec/asciidoctor/cleanup_spec.rb +34 -20
- data/spec/asciidoctor/inline_spec.rb +10 -2
- data/spec/asciidoctor/section_spec.rb +3 -3
- data/spec/isodoc/i18n_spec.rb +4 -4
- data/spec/isodoc/inline_spec.rb +306 -245
- data/spec/isodoc/section_spec.rb +1 -1
- data/spec/isodoc/terms_spec.rb +11 -11
- data/spec/isodoc/xref_spec.rb +1397 -1376
- data/spec/metanorma/processor_spec.rb +4 -1
- data/spec/spec_helper.rb +14 -1
- metadata +34 -19
@@ -23,13 +23,16 @@ RSpec.describe Metanorma::Iso::Processor do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
it "generates IsoDoc XML from a blank document" do
|
26
|
-
|
26
|
+
input = <<~INPUT
|
27
27
|
#{ASCIIDOC_BLANK_HDR}
|
28
28
|
INPUT
|
29
|
+
output = <<~OUTPUT
|
29
30
|
#{BLANK_HDR}
|
30
31
|
<sections/>
|
31
32
|
</iso-standard>
|
32
33
|
OUTPUT
|
34
|
+
expect(xmlpp(processor.input_to_isodoc(input, nil)))
|
35
|
+
.to be_equivalent_to xmlpp(output)
|
33
36
|
end
|
34
37
|
|
35
38
|
it "generates HTML from IsoDoc XML" do
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
require "vcr"
|
2
|
+
|
3
|
+
VCR.configure do |config|
|
4
|
+
config.cassette_library_dir = "spec/vcr_cassettes"
|
5
|
+
config.hook_into :webmock
|
6
|
+
config.default_cassette_options = {
|
7
|
+
clean_outdated_http_interactions: true,
|
8
|
+
re_record_interval: 1512000,
|
9
|
+
record: :once,
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
1
13
|
require "simplecov"
|
2
14
|
SimpleCov.start do
|
3
15
|
add_filter "/spec/"
|
@@ -46,7 +58,8 @@ def xmlpp(xml)
|
|
46
58
|
s = ""
|
47
59
|
f = REXML::Formatters::Pretty.new(2)
|
48
60
|
f.compact = true
|
49
|
-
f.write(REXML::Document.new(xml
|
61
|
+
f.write(REXML::Document.new(xml
|
62
|
+
.gsub(%r{<fetched>20[0-9-]+</fetched>}, "<fetched/>")), s)
|
50
63
|
s
|
51
64
|
end
|
52
65
|
|
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.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: 2021-
|
11
|
+
date: 2021-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: isodoc
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 1.7.0
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 1.7.0
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: metanorma-standoc
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - "~>"
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
19
|
+
version: 1.11.0
|
34
20
|
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - "~>"
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
26
|
+
version: 1.11.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: mnconvert
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,6 +234,34 @@ dependencies:
|
|
248
234
|
- - "~>"
|
249
235
|
- !ruby/object:Gem::Version
|
250
236
|
version: '0.9'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: vcr
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - "~>"
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: 5.0.0
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - "~>"
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: 5.0.0
|
251
|
+
- !ruby/object:Gem::Dependency
|
252
|
+
name: webmock
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - ">="
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: '0'
|
258
|
+
type: :development
|
259
|
+
prerelease: false
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - ">="
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '0'
|
251
265
|
description: |
|
252
266
|
metanorma-iso lets you write ISO standards in AsciiDoc syntax.
|
253
267
|
|
@@ -339,6 +353,7 @@ files:
|
|
339
353
|
- metanorma-iso.gemspec
|
340
354
|
- spec/asciidoctor/amd_spec.rb
|
341
355
|
- spec/asciidoctor/base_spec.rb
|
356
|
+
- spec/asciidoctor/blank_spec.rb
|
342
357
|
- spec/asciidoctor/blocks_spec.rb
|
343
358
|
- spec/asciidoctor/cleanup_spec.rb
|
344
359
|
- spec/asciidoctor/inline_spec.rb
|
@@ -409,7 +424,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
409
424
|
- !ruby/object:Gem::Version
|
410
425
|
version: '0'
|
411
426
|
requirements: []
|
412
|
-
rubygems_version: 3.
|
427
|
+
rubygems_version: 3.2.22
|
413
428
|
signing_key:
|
414
429
|
specification_version: 4
|
415
430
|
summary: metanorma-iso lets you write ISO standards in AsciiDoc.
|