metanorma-csand 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: 409f1f5dc7225f6a94fc558c1c210828c23a7776c487205ff8935cca4a793dba
4
- data.tar.gz: 2ba4b3f3d9cd9f042b7745546c9355e42cc0d617395733e678813f1d948d929a
3
+ metadata.gz: af08d3ed4c3516e625ef80cbf3a1b48dbded2282ea51c0990d610ac07d10aaef
4
+ data.tar.gz: e100e4c262f46515f1ef59e1922acbfb4a3c08a05d79e5b6ca8346c31678d56b
5
5
  SHA512:
6
- metadata.gz: aaa0be9c3b802be72e2091a17a368eadbb49db41ab7132a923cdd5e7344edf220eefa07f14a770b8958409ad37268d221338c162151a9671848bc8ac93414256
7
- data.tar.gz: 337cfe3ed1246f636718458b7e6699cb07a0dbeff6e29ba46d1685784cda56b7108031b8f9a74e3a2b331928e024676304ad41c6359f58b7a7e0a31f1f6ba138
6
+ metadata.gz: 6bf591357a2356b8c5c6d2712ff25bb2dc1a7d5fe20802e283167e6d866e5df6f0b29a0fbd3ece2796c13def36825a64439291b22ac6e8e48c3755fe52009b9b
7
+ data.tar.gz: 626e579087e81dce5d35314df29591470a46cabf12326fea0410e42acc047acf7910694164e6859f0cd07c0d9b9a724776c58ca83a0966ed7965a0ad855561fa
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
  = AsciiCSAND: Asciidoctor processor for CSA Normal Documents (CSAND)
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-csand.svg["Gem Version", link="https://rubygems.org/gems/metanorma-csand"]
4
- image:https://img.shields.io/travis/riboseinc/metanorma-csand/master.svg["Build Status", link="https://travis-ci.org/riboseinc/metanorma-csand"]
5
- image:https://codeclimate.com/github/riboseinc/metanorma-csand/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/metanorma-csand"]
4
+ image:https://img.shields.io/travis/metanorma/metanorma-csand/master.svg["Build Status", link="https://travis-ci.org/metanorma/metanorma-csand"]
5
+ image:https://ci.appveyor.com/api/projects/status/3hulwj0i2c4uc7n4?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/metanorma-csand"]
6
+ image:https://codeclimate.com/github/metanorma/metanorma-csand/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-csand"]
6
7
 
7
8
  WARNING: This gem is still under development.
8
9
 
@@ -13,9 +14,9 @@ _Formerly known as_ `asciidoctor-csand`.
13
14
  This gem processes http://asciidoctor.org/[Asciidoctor] documents following
14
15
  a template for generating CSAND 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
 
@@ -63,104 +64,19 @@ $ asciidoctor -b csand -r 'asciidoctor-csand' a.adoc
63
64
 
64
65
  === Installation
65
66
 
66
- If you are using a Mac, the https://github.com/riboseinc/metanorma-macos-setup
67
+ If you are using a Mac, the https://github.com/metanorma/metanorma-macos-setup
67
68
  repository has instructions on setting up your machine to run Metanorma
68
69
  scripts such as this one. You need only run the following in a Terminal console:
69
70
 
70
71
  [source,console]
71
72
  ----
72
- $ bash <(curl -s https://raw.githubusercontent.com/riboseinc/metanorma-macos-setup/master/metanorma-setup)
73
+ $ bash <(curl -s https://raw.githubusercontent.com/metanorma/metanorma-macos-setup/master/metanorma-setup)
73
74
  $ gem install metanorma-csand
74
75
 
75
76
  ----
76
77
 
77
- == Approach
78
- === Document model
78
+ == Documentation
79
79
 
80
- The Ribose Standard Document model is an instance of the
81
- https://github.com/riboseinc/isodoc-models[StandardDocument model].
80
+ See https://www.metanorma.com/author/csand/[Author Cloud Security Alliance documents with Metanorma-CSAND].
82
81
 
83
- The CSAND format ("CSAND XML") intends to introduce rigor into the CSAND
84
- standards authoring process, and is prescribed in a separate document.
85
82
 
86
- CSAND XML is still under development, but it already contains all the markup
87
- needed to render a CSAND document into HTML.
88
-
89
- WARNING: The current RNG model of CSAND XML is out of sync with the UML.
90
-
91
- === Asciidoctor
92
-
93
- Asciidoctor has been selected as the authoring tool to generate the document
94
- model representation of CSAND 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 CSAND deliverables: The different types of
126
- CSAND publications) (mandatory). The permitted types are:
127
- +
128
- --
129
- guidance, proposal, standard, report, whitepaper, charter, policy, glossary, case-study
130
- --
131
-
132
- `:status:``:: The document status. The permitted types are: `proposal`,
133
- `working-draft`, `committee-draft`, `draft-standard`, `final-draft`,
134
- `published`, `withdrawn`.
135
-
136
- `:committee:`:: The name of the relevant CSAND technical committee
137
- (mandatory)
138
-
139
- `:language:` :: The language of the document (only `en` for now) (mandatory)
140
-
141
-
142
- The attribute `:draft:`, if present, includes review notes in the XML output;
143
- these are otherwise suppressed.
144
-
145
- == Asciidoctor features specific to CSAND
146
-
147
- The https://github.com/riboseinc/metanorma-standoc[metanorma-standoc]
148
- gem documents the customisations of Asciidoctor markup common to all metanorma gems.
149
- The following markup is specific to this gem:
150
-
151
- * `+[keyword]#...#+`: encodes keywords, such as "MUST", "MUST NOT". (Encoded as
152
- `<span class="keyword">...</span>`.
153
-
154
- == Data Models
155
-
156
- The CSAND Standard Document format is an instance of the
157
- https://github.com/riboseinc/isodoc-models[StandardDocument model]. Details of
158
- this general model can be found on its page. Details of the CSAND modifications
159
- to this general model can be found on the https://github.com/riboseinc/csand[CSAND model]
160
- repository.
161
-
162
- == Examples
163
-
164
- * link:spec/examples/rfc6350.adoc[] is an AsciiCSAND version of https://tools.ietf.org/html/rfc6350[RFC 6350].
165
- * link:spec/examples/rfc6350.html[] is an HTML file generated from the AsciiCSAND.
166
- * link:spec/examples/rfc6350.doc[] is a Word document generated from the AsciiCSAND.
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>
@@ -86,7 +86,7 @@ module Asciidoctor
86
86
  result << "</csand-standard>"
87
87
  result = textcleanup(result)
88
88
  ret1 = cleanup(Nokogiri::XML(result))
89
- validate(ret1)
89
+ validate(ret1) unless @novalid
90
90
  ret1.root.add_namespace(nil, CSAND_NAMESPACE)
91
91
  ret1
92
92
  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 Csand
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-csand.
18
18
  DESCRIPTION
19
19
 
20
- spec.homepage = "https://github.com/riboseinc/metanorma-csand"
20
+ spec.homepage = "https://github.com/metanorma/metanorma-csand"
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-csand
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-csand.gemspec.old
357
358
  - bin/console
358
359
  - bin/rspec
@@ -363,6 +364,7 @@ files:
363
364
  - lib/asciidoctor/csand/csand.rng
364
365
  - lib/asciidoctor/csand/isodoc.rng
365
366
  - lib/asciidoctor/csand/isostandard.rng
367
+ - lib/asciidoctor/csand/reqt.rng
366
368
  - lib/isodoc/csand/html/csa-logo-white.png
367
369
  - lib/isodoc/csand/html/csa.png
368
370
  - lib/isodoc/csand/html/csand.scss
@@ -386,7 +388,7 @@ files:
386
388
  - lib/metanorma/csand/processor.rb
387
389
  - lib/metanorma/csand/version.rb
388
390
  - metanorma-csand.gemspec
389
- homepage: https://github.com/riboseinc/metanorma-csand
391
+ homepage: https://github.com/metanorma/metanorma-csand
390
392
  licenses:
391
393
  - BSD-2-Clause
392
394
  metadata: {}