metanorma-m3d 1.1.2 → 1.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6131eec8449a38233d4083a799eb00bd33ae67e90f53e5cdb8df0a7d84efcf94
4
- data.tar.gz: 16b4ce44dae95a5adcb3026f31dd76a5428292bcdd2d3e0c9cb0635482676ce8
3
+ metadata.gz: 673148621b29be98f5e5d8abf59cf94944055ea5b54a1fa9cdbdbdb40f33e61c
4
+ data.tar.gz: 95613dc525098720304cdc8f535ab8c8faeb6bc8ba70389616d807626f11891e
5
5
  SHA512:
6
- metadata.gz: d4e00f1260ee9ba8e3efc8f0ef6ceba2354feedf74953cde19564f15d0b67a43ce1977ecbac0af6dab2e5d7b40171cc396c75320652068c92f89999bd0f4cef1
7
- data.tar.gz: 1374576732f1ca8f9db5db4df7d3083c7d95893821948acf372679285edbd938d08b8cdf69b4b07eb50a59a455400844eb1d77f9f8cadf6b6341b5262c9d87d0
6
+ metadata.gz: b036f5179c539616665fc8c9b2700167dc3360c370496186a82f59d15a7c7a09eee5e581dbe04e63d15557dcf88868e2836e833b82d197cb77a66218585c2018
7
+ data.tar.gz: b18fbdde1043a7645167eff1b09111a4ad3b307c1ccad7021bc0c70a4c698759528fc1a2863578acc3c44604e9b6be5c4fa107e8490c89dbc5f8652bc3877752
data/.travis.yml CHANGED
@@ -8,9 +8,8 @@ rvm:
8
8
  - ruby-head
9
9
  before_install:
10
10
  - gem install bundler -v 2.0.1
11
- - npm install -g puppeteer
12
- - npm install
13
- - unset _JAVA_OPTIONS
11
+ - travis_retry sudo apt-get update
12
+ - sudo bash -c "curl -L https://raw.githubusercontent.com/metanorma/metanorma-linux-setup/master/ubuntu-install-puppeteer.sh | bash"
14
13
  matrix:
15
14
  allow_failures:
16
15
  - rvm: ruby-head
data/README.adoc CHANGED
@@ -1,8 +1,9 @@
1
1
  = Metanorma processor for M3AAWG documents (M3D)
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-m3d.svg["Gem Version", link="https://rubygems.org/gems/metanorma-m3d"]
4
- image:https://img.shields.io/travis/riboseinc/metanorma-m3d/master.svg["Build Status", link="https://travis-ci.org/riboseinc/metanorma-m3d"]
5
- image:https://codeclimate.com/github/riboseinc/metanorma-m3d/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/metanorma-m3d"]
4
+ image:https://img.shields.io/travis/metanorma/metanorma-m3d/master.svg["Build Status", link="https://travis-ci.org/metanorma/metanorma-m3d"]
5
+ image:https://ci.appveyor.com/api/projects/status/k09hlrs4njm7o2mv?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/metanorma-m3d"]
6
+ image:https://codeclimate.com/github/metanorma/metanorma-m3d/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-m3d"]
6
7
 
7
8
  WARNING: This gem is still under development.
8
9
 
@@ -13,9 +14,9 @@ _Formerly known as_ `asciidoctor-m3d`.
13
14
  This gem processes http://asciidoctor.org/[Asciidoctor] documents following
14
15
  a template for generating M3D documents.
15
16
 
16
- The gem currently inherits from the https://github.com/riboseinc/metanorma-standoc
17
+ The gem currently inherits from the https://github.com/metanorma/metanorma-standoc
17
18
  gem, and aligns closely to it. Refer to the ISO gem documentation
18
- for guidance, including https://github.com/riboseinc/metanorma-iso/wiki/Guidance-for-authoring
19
+ for guidance, including https://github.com/metanorma/metanorma-iso/wiki/Guidance-for-authoring
19
20
 
20
21
  The following outputs are generated.
21
22
 
@@ -64,102 +65,26 @@ $ asciidoctor -b m3d -r 'metanorma-m3d' a.adoc
64
65
 
65
66
  === Installation
66
67
 
67
- If you are using a Mac, the https://github.com/riboseinc/metanorma-macos-setup
68
+ If you are using a Mac, the https://github.com/metanorma/metanorma-macos-setup
68
69
  repository has instructions on setting up your machine to run Metanorma
69
70
  scripts such as this one. You need only run the following in a Terminal console:
70
71
 
71
72
  [source,console]
72
73
  ----
73
- $ bash <(curl -s https://raw.githubusercontent.com/riboseinc/metanorma-macos-setup/master/metanorma-setup)
74
+ $ bash <(curl -s https://raw.githubusercontent.com/metanorma/metanorma-macos-setup/master/metanorma-setup)
74
75
  $ gem install metanorma-m3d
75
76
  ----
76
77
 
78
+ == Documentation
77
79
 
78
- == Approach
79
-
80
- === Document model
81
-
82
- The Ribose Standard Document model is an instance of the
83
- https://github.com/riboseinc/isodoc-models[StandardDocument model].
84
-
85
- The M3D format ("M3D XML") intends to introduce rigor into the M3D
86
- standards authoring process, and is prescribed in a separate document.
87
-
88
- M3D XML is still under development, but it already contains all the markup
89
- needed to render a M3D document into HTML.
90
-
91
- === Asciidoctor
92
-
93
- Asciidoctor has been selected as the authoring tool to generate the document
94
- model representation of M3D standards. It is a document formatting tool like
95
- Markdown and DocBook, which combines the relative ease of use of the former
96
- (using relatively lightweight markup), and the rigor and expressively of the
97
- latter (it has a well-defined syntax, and was in fact initially developed as a
98
- DocBook document authoring tool). Asciidoctor has built-in capability to output
99
- Text, DocBook and HTML; so it can be used to preview the file as it is being
100
- authored.
101
-
102
- Generating documents via a document model substantially automated formatting
103
- associated with the document, including automating numbering of headings, figures,
104
- tables etc, and automatically generating references and citations.
105
-
106
- == Document Attributes
107
-
108
- === Common attributes
109
-
110
- The gem relies on Asciidoctor document attributes to provide necessary
111
- metadata about the document. The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
112
- gem documents the Asciidoctor document attributes common to all metanorma gems. These include:
113
-
114
- `:edition:`:: The document edition
115
-
116
- `:revdate:`:: The date the document was last updated
117
-
118
- `:copyright-year:`:: The year which will be claimed as when the copyright for
119
- the document was issued
120
-
121
- `:title:`:: The main component of the English title of the document
122
- (mandatory). (The first line of the AsciiDoc document, which contains the title
123
- introduced with `=`, is ignored)
124
-
125
- `:doctype:`:: The document type (see M3D deliverables: The different types of
126
- M3D publications) (mandatory). The permitted types are:
127
- +
128
- --
129
- code:: Code Artifact
130
- presentation:: Presentation
131
- proposal:: Proposal; includes IETF DRAFT
132
- standard:: Recommendation; includes IETF RFC
133
- report:: report
134
- --
135
-
136
- `:status:``:: The document status. The permitted types are: `proposal`,
137
- `working-draft`, `committee-draft`, `draft-standard`, `final-draft`,
138
- `published`, `withdrawn`.
139
-
140
- `:technical-committee:`:: The name of the relevant M3D technical committee
141
- (mandatory)
142
-
143
- `:language:` :: The language of the document (only `en` for now) (mandatory)
144
-
145
- The attribute `:draft:`, if present, includes review notes in the XML output;
146
- these are otherwise suppressed.
147
-
148
- == Asciidoctor features specific to CSAND
149
-
150
- The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
151
- gem documents the customisations of Asciidoctor markup common to all metanorma gems.
152
- The following markup is specific to this gem:
153
-
154
- * `+[keyword]#...#+`: encodes keywords, such as "MUST", "MUST NOT". (Encoded as
155
- `<span class="keyword">...</span>`.
80
+ See https://www.metanorma.com/author/m3d/[Author M^3^AAWG documents with Metanorma-M3D]
156
81
 
157
82
  == Data Models
158
83
 
159
84
  The M3D Standard Document format is an instance of the
160
- https://github.com/riboseinc/isodoc-models[StandardDocument model]. Details of
85
+ https://github.com/metanorma/metanorma-model-standoc[StandardDocument model]. Details of
161
86
  this general model can be found on its page. Details of the M3D modifications
162
- to this general model can be found on the https://github.com/riboseinc/m3d[M3D model]
87
+ to this general model can be found on the https://github.com/metanorma/metanorma-model-m3d[M3D model]
163
88
  repository.
164
89
 
165
90
  == Examples
data/appveyor.yml ADDED
@@ -0,0 +1,30 @@
1
+ version: '{build}'
2
+
3
+ environment:
4
+ matrix:
5
+ - RUBY_VERSION: 25
6
+ - RUBY_VERSION: 24
7
+ - RUBY_VERSION: 23
8
+ - RUBY_VERSION: _trunk
9
+
10
+ matrix:
11
+ allow_failures:
12
+ - RUBY_VERSION: _trunk
13
+
14
+ install:
15
+ - ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
16
+ - refreshenv
17
+
18
+ build_script:
19
+ - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
20
+ - bundle update
21
+ - bundle install
22
+
23
+ before_test:
24
+ - ruby -v
25
+ - gem -v
26
+ - bundle -v
27
+
28
+ test_script:
29
+ - bundle exec rake
30
+
@@ -156,9 +156,9 @@
156
156
  <zeroOrMore>
157
157
  <ref name="contact"/>
158
158
  </zeroOrMore>
159
- <optional>
159
+ <zeroOrMore>
160
160
  <ref name="uri"/>
161
- </optional>
161
+ </zeroOrMore>
162
162
  </element>
163
163
  </define>
164
164
  <define name="fullname">
@@ -246,9 +246,9 @@
246
246
  <optional>
247
247
  <ref name="abbreviation"/>
248
248
  </optional>
249
- <optional>
249
+ <zeroOrMore>
250
250
  <ref name="uri"/>
251
- </optional>
251
+ </zeroOrMore>
252
252
  <zeroOrMore>
253
253
  <ref name="org-identifier"/>
254
254
  </zeroOrMore>
@@ -469,12 +469,13 @@
469
469
  <value>film</value>
470
470
  <value>video</value>
471
471
  <value>broadcast</value>
472
- <value>graphic work</value>
472
+ <value>graphic_work</value>
473
473
  <value>music</value>
474
474
  <value>patent</value>
475
475
  <value>inbook</value>
476
476
  <value>incollection</value>
477
477
  <value>inproceedings</value>
478
+ <value>journal</value>
478
479
  </choice>
479
480
  </define>
480
481
  <define name="BibliographicItem">
@@ -739,39 +740,44 @@
739
740
  <element name="series">
740
741
  <optional>
741
742
  <attribute name="type">
742
- <choice>
743
- <value>main</value>
744
- <value>alt</value>
745
- </choice>
743
+ <ref name="SeriesType"/>
746
744
  </attribute>
747
745
  </optional>
748
746
  <choice>
749
- <ref name="btitle"/>
750
747
  <ref name="formattedref"/>
748
+ <group>
749
+ <ref name="btitle"/>
750
+ <optional>
751
+ <ref name="bplace"/>
752
+ </optional>
753
+ <optional>
754
+ <ref name="seriesorganization"/>
755
+ </optional>
756
+ <optional>
757
+ <ref name="abbreviation"/>
758
+ </optional>
759
+ <optional>
760
+ <ref name="seriesfrom"/>
761
+ </optional>
762
+ <optional>
763
+ <ref name="seriesto"/>
764
+ </optional>
765
+ <optional>
766
+ <ref name="seriesnumber"/>
767
+ </optional>
768
+ <optional>
769
+ <ref name="seriespartnumber"/>
770
+ </optional>
771
+ </group>
751
772
  </choice>
752
- <optional>
753
- <ref name="bplace"/>
754
- </optional>
755
- <optional>
756
- <ref name="seriesorganization"/>
757
- </optional>
758
- <optional>
759
- <ref name="abbreviation"/>
760
- </optional>
761
- <optional>
762
- <ref name="seriesfrom"/>
763
- </optional>
764
- <optional>
765
- <ref name="seriesto"/>
766
- </optional>
767
- <optional>
768
- <ref name="seriesnumber"/>
769
- </optional>
770
- <optional>
771
- <ref name="seriespartnumber"/>
772
- </optional>
773
773
  </element>
774
774
  </define>
775
+ <define name="SeriesType">
776
+ <choice>
777
+ <value>main</value>
778
+ <value>alt</value>
779
+ </choice>
780
+ </define>
775
781
  <define name="seriesorganization">
776
782
  <element name="organization">
777
783
  <text/>
@@ -849,6 +855,7 @@
849
855
  <value>includes</value>
850
856
  <value>instance</value>
851
857
  <value>partOf</value>
858
+ <value>hasDraft</value>
852
859
  </choice>
853
860
  </attribute>
854
861
  <element name="bibitem">
@@ -861,9 +868,6 @@
861
868
  </define>
862
869
  <define name="version">
863
870
  <element name="version">
864
- <optional>
865
- <ref name="vedition"/>
866
- </optional>
867
871
  <optional>
868
872
  <ref name="revision-date"/>
869
873
  </optional>
@@ -87,7 +87,7 @@ module Asciidoctor
87
87
  result << "</m3d-standard>"
88
88
  result = textcleanup(result)
89
89
  ret1 = cleanup(Nokogiri::XML(result))
90
- validate(ret1)
90
+ validate(ret1) unless @novalid
91
91
  ret1.root.add_namespace(nil, M3D_NAMESPACE)
92
92
  ret1
93
93
  end
@@ -18,6 +18,7 @@
18
18
  of this.
19
19
  -->
20
20
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
+ <include href="reqt.rng"/>
21
22
  <include href="biblio.rng">
22
23
  <define name="status">
23
24
  <element name="status">
@@ -0,0 +1,157 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <!--
4
+ Presupposes isodoc.rnc, is included in it
5
+ include "isodoc.rnc" { }
6
+ -->
7
+ <define name="requirement">
8
+ <element name="requirement">
9
+ <ref name="RequirementType"/>
10
+ </element>
11
+ </define>
12
+ <define name="recommendation">
13
+ <element name="recommendation">
14
+ <ref name="RequirementType"/>
15
+ </element>
16
+ </define>
17
+ <define name="permission">
18
+ <element name="permission">
19
+ <ref name="RequirementType"/>
20
+ </element>
21
+ </define>
22
+ <define name="RequirementType">
23
+ <optional>
24
+ <attribute name="obligation">
25
+ <ref name="ObligationType"/>
26
+ </attribute>
27
+ </optional>
28
+ <attribute name="id">
29
+ <data type="ID"/>
30
+ </attribute>
31
+ <optional>
32
+ <attribute name="filename"/>
33
+ </optional>
34
+ <optional>
35
+ <ref name="reqtitle"/>
36
+ </optional>
37
+ <optional>
38
+ <ref name="label"/>
39
+ </optional>
40
+ <optional>
41
+ <ref name="subject"/>
42
+ </optional>
43
+ <optional>
44
+ <ref name="reqinherit"/>
45
+ </optional>
46
+ <zeroOrMore>
47
+ <ref name="classification"/>
48
+ </zeroOrMore>
49
+ <zeroOrMore>
50
+ <choice>
51
+ <ref name="measurementtarget"/>
52
+ <ref name="specification"/>
53
+ <ref name="verification"/>
54
+ <ref name="import"/>
55
+ <ref name="description"/>
56
+ </choice>
57
+ </zeroOrMore>
58
+ <optional>
59
+ <ref name="reqt_references"/>
60
+ </optional>
61
+ <zeroOrMore>
62
+ <choice>
63
+ <ref name="requirement"/>
64
+ <ref name="recommendation"/>
65
+ <ref name="permission"/>
66
+ </choice>
67
+ </zeroOrMore>
68
+ </define>
69
+ <define name="reqtitle">
70
+ <element name="title">
71
+ <ref name="FormattedString"/>
72
+ </element>
73
+ </define>
74
+ <define name="label">
75
+ <element name="label">
76
+ <text/>
77
+ </element>
78
+ </define>
79
+ <define name="subject">
80
+ <element name="subject">
81
+ <text/>
82
+ </element>
83
+ </define>
84
+ <define name="reqinherit">
85
+ <element name="subject">
86
+ <text/>
87
+ </element>
88
+ </define>
89
+ <define name="measurementtarget">
90
+ <element name="measurement-target">
91
+ <ref name="RequirementSubpart"/>
92
+ </element>
93
+ </define>
94
+ <define name="specification">
95
+ <element name="specification">
96
+ <ref name="RequirementSubpart"/>
97
+ </element>
98
+ </define>
99
+ <define name="verification">
100
+ <element name="verification">
101
+ <ref name="RequirementSubpart"/>
102
+ </element>
103
+ </define>
104
+ <define name="import">
105
+ <element name="import">
106
+ <ref name="RequirementSubpart"/>
107
+ </element>
108
+ </define>
109
+ <define name="description">
110
+ <element name="description">
111
+ <ref name="RequirementSubpart"/>
112
+ </element>
113
+ </define>
114
+ <define name="reqt_references">
115
+ <element name="references">
116
+ <oneOrMore>
117
+ <ref name="bibitem"/>
118
+ </oneOrMore>
119
+ </element>
120
+ </define>
121
+ <define name="RequirementSubpart">
122
+ <optional>
123
+ <attribute name="type"/>
124
+ </optional>
125
+ <optional>
126
+ <attribute name="exclude">
127
+ <data type="boolean"/>
128
+ </attribute>
129
+ </optional>
130
+ <oneOrMore>
131
+ <ref name="BasicBlock"/>
132
+ </oneOrMore>
133
+ </define>
134
+ <define name="ObligationType">
135
+ <choice>
136
+ <value>requirement</value>
137
+ <value>recommendation</value>
138
+ <value>permission</value>
139
+ </choice>
140
+ </define>
141
+ <define name="classification">
142
+ <element name="classification">
143
+ <ref name="classification_tag"/>
144
+ <ref name="classification_value"/>
145
+ </element>
146
+ </define>
147
+ <define name="classification_tag">
148
+ <element name="tag">
149
+ <text/>
150
+ </element>
151
+ </define>
152
+ <define name="classification_value">
153
+ <element name="value">
154
+ <text/>
155
+ </element>
156
+ </define>
157
+ </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3d
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.3"
4
4
  end
5
5
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  Formerly known as asciidoctor-m3d.
18
18
  DESCRIPTION
19
19
 
20
- spec.homepage = "https://github.com/riboseinc/metanorma-m3d"
20
+ spec.homepage = "https://github.com/metanorma/metanorma-m3d"
21
21
  spec.license = "BSD-2-Clause"
22
22
 
23
23
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-25 00:00:00.000000000 Z
11
+ date: 2019-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -353,6 +353,7 @@ files:
353
353
  - LICENSE
354
354
  - README.adoc
355
355
  - Rakefile
356
+ - appveyor.yml
356
357
  - asciidoctor-m3d.gemspec.old
357
358
  - bin/console
358
359
  - bin/rspec
@@ -363,6 +364,7 @@ files:
363
364
  - lib/asciidoctor/m3d/isodoc.rng
364
365
  - lib/asciidoctor/m3d/isostandard.rng
365
366
  - lib/asciidoctor/m3d/m3d.rng
367
+ - lib/asciidoctor/m3d/reqt.rng
366
368
  - lib/isodoc/m3d/html/dots-w@2x.png
367
369
  - lib/isodoc/m3d/html/dots@2x.png
368
370
  - lib/isodoc/m3d/html/header.html
@@ -389,7 +391,7 @@ files:
389
391
  - lib/metanorma/m3d/processor.rb
390
392
  - lib/metanorma/m3d/version.rb
391
393
  - metanorma-m3d.gemspec
392
- homepage: https://github.com/riboseinc/metanorma-m3d
394
+ homepage: https://github.com/metanorma/metanorma-m3d
393
395
  licenses:
394
396
  - BSD-2-Clause
395
397
  metadata: {}