metanorma-rsd 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51c4102bc001dc19bc10c2bf3a9eaf9fb0d2100def61fef3c08ecdd5b595d4e4
4
- data.tar.gz: 28fa084daca19abe6844672e35bc3f031a6ba2cac2fec2ba48b4c9daf657ece3
3
+ metadata.gz: bd135dc477c1cdda2a664abfbe8858a7ca6a5c0b3363c9f921ec35fb5c2ea8c2
4
+ data.tar.gz: 945bd2db157159b2d941c3c22861a64b49a0244f194ae5dc6a62b17c0964c320
5
5
  SHA512:
6
- metadata.gz: b78323895e12b2114979579386f96fed0378527c3fdd2ea3e355dd115660373e5bb1d6dc57953e11144b305a78192baa864a21b0489b28d51691aaafdae13dce
7
- data.tar.gz: efea17a8b467bf0d8b6ab0ee6d86a00065f4788e0f52b3ebeabdb2e0e4f5e39a5f8786c23734460777365136c798dea5b5f7c1c5512b3cb6e02b484b4384a899
6
+ metadata.gz: b0cf44d0d48ca7dcb84b8b4b8a966a09fd29a36e0f38c823ab2d2974322912a5986a9e3ff0546c9c4f7a0a325c78277d29d0360e2de5ca5481ee9518e5165f61
7
+ data.tar.gz: 9571db00eeef3bcea837382359f80ef5c2a67d535c344e63579414e9b8c41c97506650786ec4eec0ffa6b45d5d6e7afad50c7fcd76e7d87b3ab4a4381bc7f1bd
@@ -7,11 +7,9 @@ rvm:
7
7
  - 2.3
8
8
  - ruby-head
9
9
  before_install:
10
- - gem update --system
11
10
  - gem install bundler -v 2.0.1
12
- - npm install -g puppeteer
13
- - npm install
14
- - 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"
15
13
  matrix:
16
14
  allow_failures:
17
15
  - rvm: ruby-head
@@ -1,8 +1,9 @@
1
1
  = AsciiRSD: Asciidoctor processor for Ribose Standard Documents (RSD)
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-rsd.svg["Gem Version", link="https://rubygems.org/gems/metanorma-rsd"]
4
- image:https://img.shields.io/travis/riboseinc/metanorma-rsd/master.svg["Build Status", link="https://travis-ci.org/riboseinc/metanorma-rsd"]
5
- image:https://codeclimate.com/github/riboseinc/metanorma-rsd/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/metanorma-rsd"]
4
+ image:https://img.shields.io/travis/metanorma/metanorma-rsd/master.svg["Build Status", link="https://travis-ci.org/metanorma/metanorma-rsd"]
5
+ image:https://ci.appveyor.com/api/projects/status/wyay9a5q5eaj147d?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/metanorma-rsd"]
6
+ image:https://codeclimate.com/github/metanorma/metanorma-rsd/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-rsd"]
6
7
 
7
8
  WARNING: This gem is still under development.
8
9
 
@@ -11,9 +12,9 @@ WARNING: This gem is still under development.
11
12
  This gem processes http://asciidoctor.org/[Asciidoctor] documents following
12
13
  a template for generating RSD documents.
13
14
 
14
- The gem currently inherits from the https://github.com/riboseinc/metanorma-standoc
15
+ The gem currently inherits from the https://github.com/metanorma/metanorma-standoc
15
16
  gem, and aligns closely to it. Refer to the ISO gem documentation
16
- for guidance, including https://github.com/riboseinc/metanorma-iso/wiki/Guidance-for-authoring
17
+ for guidance, including https://github.com/metanorma/metanorma-iso/wiki/Guidance-for-authoring
17
18
 
18
19
  The following outputs are generated.
19
20
 
@@ -62,108 +63,28 @@ $ asciidoctor -b rsd -r 'metanorma-rsd' a.adoc
62
63
 
63
64
  === Installation
64
65
 
65
- If you are using a Mac, the https://github.com/riboseinc/metanorma-macos-setup
66
+ If you are using a Mac, the https://github.com/metanorma/metanorma-macos-setup
66
67
  repository has instructions on setting up your machine to run Metanorma
67
68
  scripts such as this one. You need only run the following in a Terminal console:
68
69
 
69
70
  [source,console]
70
71
  ----
71
- $ bash <(curl -s https://raw.githubusercontent.com/riboseinc/metanorma-macos-setup/master/metanorma-setup)
72
+ $ bash <(curl -s https://raw.githubusercontent.com/metanorma/metanorma-macos-setup/master/metanorma-setup)
72
73
  $ gem install metanorma-rsd
73
74
  $ gem install metanorma-cli
74
75
  ----
75
76
 
77
+ == Documentation
76
78
 
77
- == Approach
79
+ See https://www.metanorma.com/author/rsd/[The RSD flavor of Metanorma]
78
80
 
79
- === Document model
80
-
81
- The Ribose Standard Document model used in this gem is an instance of the
82
- https://github.com/riboseinc/isodoc-models[StandardDocument model].
83
-
84
- The Metanorma XML format intends to introduce rigor into the RSD
85
- standards authoring process, and is prescribed in a separate document.
86
-
87
- === Asciidoctor
88
-
89
- Asciidoctor has been selected as the authoring tool to generate the document
90
- model representation of RSD standards. It is a document formatting tool like
91
- Markdown and DocBook, which combines the relative ease of use of the former
92
- (using relatively lightweight markup), and the rigor and expressively of the
93
- latter (it has a well-defined syntax, and was in fact initially developed as a
94
- DocBook document authoring tool). Asciidoctor has built-in capability to output
95
- Text, DocBook and HTML; so it can be used to preview the file as it is being
96
- authored.
97
-
98
- Generating documents via a document model substantially automated formatting
99
- associated with the document, including automating numbering of headings, figures,
100
- tables etc, and automatically generating references and citations.
101
-
102
- == Document Attributes
103
-
104
- === Common attributes
105
-
106
- The gem relies on Asciidoctor document attributes to provide necessary
107
- metadata about the document. The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
108
- gem documents the Asciidoctor document attributes common to all metanorma gems. These include:
109
-
110
- `:edition:`:: The document edition
111
-
112
- `:revdate:`:: The date the document was last updated
113
-
114
- `:copyright-year:`:: The year which will be claimed as when the copyright for
115
- the document was issued
116
-
117
- `:title:`:: The main component of the English title of the document
118
- (mandatory). (The first line of the AsciiDoc document, which contains the title
119
- introduced with `=`, is ignored)
120
-
121
- `:doctype:`:: The document type (see RSD deliverables: The different types of
122
- RSD publications) (mandatory). The permitted types are:
123
- +
124
- --
125
- * policy-and-procedures
126
- * best-practices
127
- * supporting-document
128
- * report
129
- * legal
130
- * directives
131
- * proposal
132
- * standard
133
- --
134
-
135
- `:status:``:: The document status. The permitted types are: `proposal`,
136
- `working-draft`, `committee-draft`, `draft-standard`, `final-draft`,
137
- `published`, `withdrawn`.
138
-
139
- `:committee:`:: The name of the relevant RSD committee (mandatory)
140
- `:committee-type:`:: The type of the relevant RSD committee (mandatory): `technical`
141
- or `provisional`.
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
- === Attributes specific to RSD:
149
-
150
- `:security:` :: Security level classification, e.g., "confidential", "client confidential"
151
-
152
- == Asciidoctor features specific to RSD
153
-
154
- The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
155
- gem documents the customisations of Asciidoctor markup common to all metanorma gems.
156
- The following markup is specific to this gem:
157
-
158
- * `+[keyword]#...#+`: encodes keywords, such as "MUST", "MUST NOT". (Encoded as
159
- `<span class="keyword">...</span>`.
160
81
 
161
82
  == Data Models
162
83
 
163
84
  The RSD Standard Document format is an instance of the
164
- https://github.com/riboseinc/isodoc-models[StandardDocument model]. Details of
85
+ https://github.com/metanorma/metanorma-model-standoc[StandardDocument model]. Details of
165
86
  this general model can be found on its page. Details of the RSD modifications
166
- to this general model can be found on the https://github.com/riboseinc/rsd[RSD model]
87
+ to this general model can be found on the https://github.com/metanorma/metanorma-model-rsd[RSD model]
167
88
  repository.
168
89
 
169
90
  == Examples
@@ -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>
@@ -102,7 +102,7 @@ module Asciidoctor
102
102
  result << "</rsd-standard>"
103
103
  result = textcleanup(result)
104
104
  ret1 = cleanup(Nokogiri::XML(result))
105
- validate(ret1)
105
+ validate(ret1) unless @novalid
106
106
  ret1.root.add_namespace(nil, RSD_NAMESPACE)
107
107
  ret1
108
108
  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 Rsd
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-rsd.
18
18
  DESCRIPTION
19
19
 
20
- spec.homepage = "https://github.com/riboseinc/metanorma-rsd"
20
+ spec.homepage = "https://github.com/metanorma/metanorma-rsd"
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-rsd
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
@@ -241,6 +241,7 @@ files:
241
241
  - LICENSE
242
242
  - README.adoc
243
243
  - Rakefile
244
+ - appveyor.yml
244
245
  - bin/console
245
246
  - bin/rspec
246
247
  - bin/setup
@@ -249,6 +250,7 @@ files:
249
250
  - lib/asciidoctor/rsd/converter.rb
250
251
  - lib/asciidoctor/rsd/isodoc.rng
251
252
  - lib/asciidoctor/rsd/isostandard.rng
253
+ - lib/asciidoctor/rsd/reqt.rng
252
254
  - lib/asciidoctor/rsd/rsd.rng
253
255
  - lib/isodoc/rsd/html/header.html
254
256
  - lib/isodoc/rsd/html/html_rsd_intro.html
@@ -270,7 +272,7 @@ files:
270
272
  - lib/metanorma/rsd/processor.rb
271
273
  - lib/metanorma/rsd/version.rb
272
274
  - metanorma-rsd.gemspec
273
- homepage: https://github.com/riboseinc/metanorma-rsd
275
+ homepage: https://github.com/metanorma/metanorma-rsd
274
276
  licenses:
275
277
  - BSD-2-Clause
276
278
  metadata: {}