metanorma-generic 1.4.6 → 1.4.7

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: 8bfb0a3ef7b80615614eafbea4a324fb7dcfe6b7c9b5fdc0cb55c5a364c9e123
4
- data.tar.gz: 4b331be46b0ef0e68704852215f56dedd68bcc2cebf3fe48ecac83f184b2581f
3
+ metadata.gz: f9110146825a604b3cd6e40ae2f33ace4f1d6a1969ddc9ca478b9001b06ee3a1
4
+ data.tar.gz: d958195686063ea45a0db177d1e854b406561412d3ba5473a97c56afd5c55ee0
5
5
  SHA512:
6
- metadata.gz: ab9fca2a5fb9ca7c8fe7b6190390fba10863adf16b840903bb13f7e6d64300d53a7e00ced4e5821c8822855b19bcf57a35c30d8920a269b656e7f5ac83b82eec
7
- data.tar.gz: 15b336684795af7580d07d535394d65fcbdb3914c4eea0ebbcfd6d3818e9aeed20232f6a49953d68061bf2aab4c64e422fc14d2901b04e7b4f3a8c59ffd0cef0
6
+ metadata.gz: 4559ae6f318844ad9a9ce03ca66a12bddbfaf951ba33fdc1762c5eb1db66c6c6e2d75ea5063d44cc653c77d50175636237618d97b67d1b37e6de097c9214fd69
7
+ data.tar.gz: e35ef1be4f2145df3436a97ad4b58221c99e03ecfb73018a3f6c7a342937f25822a2b2e647afb9437086fee317a79a440ef8f32c369dd10d68586e950dac5878
@@ -26,13 +26,6 @@ jobs:
26
26
  run: |
27
27
  sudo gem install bundler --force
28
28
  bundle install --jobs 4 --retry 3
29
- - name: Use Node
30
- uses: actions/setup-node@v1
31
- with:
32
- node-version: '8'
33
- - name: Install Puppeteer
34
- run: |
35
- npm install -g puppeteer
36
29
  - name: Run specs
37
30
  run: |
38
31
  bundle exec rake
@@ -26,18 +26,11 @@ jobs:
26
26
  run: |
27
27
  gem install bundler
28
28
  bundle install --jobs 4 --retry 3
29
- - name: Use Node
30
- uses: actions/setup-node@v1
31
- with:
32
- node-version: '8'
33
- - name: Install Puppeteer
34
- run: |
35
- npm install -g puppeteer
36
29
  - name: Run specs
37
30
  run: |
38
31
  bundle exec rake
39
32
  - name: Trigger dependent repositories
40
- if: github.ref == 'refs/heads/master'
33
+ if: github.ref == 'refs/heads/master' && matrix.ruby == '2.6'
41
34
  env:
42
35
  GH_USERNAME: ${{ secrets.PAT_USERNAME }}
43
36
  GH_ACCESS_TOKEN: ${{ secrets.PAT_TOKEN }}
@@ -46,5 +39,5 @@ jobs:
46
39
  [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
47
40
  for repo in $DEPENDENT_REPOS
48
41
  do
49
- sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY
42
+ sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "{ \"ref\": \"${GITHUB_REF}\" }"
50
43
  done
@@ -27,15 +27,7 @@ jobs:
27
27
  run: |
28
28
  gem install bundler
29
29
  bundle config --local path vendor/bundle
30
- bundle update
31
30
  bundle install --jobs 4 --retry 3
32
- - name: Use Node
33
- uses: actions/setup-node@v1
34
- with:
35
- node-version: '8'
36
- - name: Install Puppeteer
37
- run: |
38
- npm install -g puppeteer
39
31
  - name: Run specs
40
32
  run: |
41
33
  bundle exec rake
@@ -49,11 +49,17 @@
49
49
  </define>
50
50
  <define name="stage">
51
51
  <element name="stage">
52
+ <optional>
53
+ <attribute name="abbreviation"/>
54
+ </optional>
52
55
  <text/>
53
56
  </element>
54
57
  </define>
55
58
  <define name="substage">
56
59
  <element name="substage">
60
+ <optional>
61
+ <attribute name="abbreviation"/>
62
+ </optional>
57
63
  <text/>
58
64
  </element>
59
65
  </define>
@@ -452,9 +458,14 @@
452
458
  <attribute name="bibitemid">
453
459
  <data type="IDREF"/>
454
460
  </attribute>
455
- <zeroOrMore>
456
- <ref name="locality"/>
457
- </zeroOrMore>
461
+ <choice>
462
+ <zeroOrMore>
463
+ <ref name="locality"/>
464
+ </zeroOrMore>
465
+ <zeroOrMore>
466
+ <ref name="localityStack"/>
467
+ </zeroOrMore>
468
+ </choice>
458
469
  <optional>
459
470
  <ref name="date"/>
460
471
  </optional>
@@ -469,6 +480,25 @@
469
480
  <ref name="BibItemLocality"/>
470
481
  </element>
471
482
  </define>
483
+ <define name="localityStack">
484
+ <element name="localityStack">
485
+ <zeroOrMore>
486
+ <ref name="locality"/>
487
+ </zeroOrMore>
488
+ </element>
489
+ </define>
490
+ <define name="sourceLocality">
491
+ <element name="sourceLocality">
492
+ <ref name="BibItemLocality"/>
493
+ </element>
494
+ </define>
495
+ <define name="sourceLocalityStack">
496
+ <element name="sourceLocalityStack">
497
+ <zeroOrMore>
498
+ <ref name="sourceLocality"/>
499
+ </zeroOrMore>
500
+ </element>
501
+ </define>
472
502
  <define name="BibItemLocality">
473
503
  <attribute name="type">
474
504
  <ref name="LocalityType"/>
@@ -737,6 +767,8 @@
737
767
  <value>unchanged</value>
738
768
  <value>circulated</value>
739
769
  <value>adapted</value>
770
+ <value>vote-started</value>
771
+ <value>vote-ended</value>
740
772
  </choice>
741
773
  </define>
742
774
  <define name="bdate">
@@ -989,38 +1021,63 @@
989
1021
  </define>
990
1022
  <define name="DocRelationType">
991
1023
  <choice>
992
- <value>obsoletes</value>
993
- <value>obsoletedBy</value>
994
- <value>supersedes</value>
995
- <value>supersededBy</value>
996
- <value>updates</value>
997
- <value>updatedBy</value>
998
- <value>complements</value>
999
- <value>derivedFrom</value>
1000
- <value>translatedFrom</value>
1001
- <value>hasTranslation</value>
1002
- <value>adoptedFrom</value>
1003
- <value>equivalent</value>
1004
- <value>identical</value>
1005
- <value>nonequivalent</value>
1006
- <value>includedIn</value>
1007
1024
  <value>includes</value>
1008
- <value>instance</value>
1009
- <value>instanceOf</value>
1010
- <value>partOf</value>
1025
+ <value>includedIn</value>
1011
1026
  <value>hasPart</value>
1012
- <value>hasDraft</value>
1013
- <value>draftOf</value>
1027
+ <value>partOf</value>
1014
1028
  <value>merges</value>
1029
+ <value>mergedInto</value>
1015
1030
  <value>splits</value>
1016
- <value>amends</value>
1017
- <value>amendedBy</value>
1018
- <value>corrects</value>
1019
- <value>correctedBy</value>
1020
- <value>revises</value>
1021
- <value>revisedBy</value>
1031
+ <value>splitInto</value>
1032
+ <value>instance</value>
1033
+ <value>hasInstance</value>
1034
+ <value>exemplarOf</value>
1035
+ <value>hasExemplar</value>
1036
+ <value>manifestationOf</value>
1037
+ <value>hasManifestation</value>
1038
+ <value>reproductionOf</value>
1039
+ <value>hasReproduction</value>
1040
+ <value>reprintOf</value>
1041
+ <value>hasReprint</value>
1042
+ <value>expressionOf</value>
1043
+ <value>hasExpression</value>
1044
+ <value>translatedFrom</value>
1045
+ <value>hasTranslation</value>
1046
+ <value>arrangementOf</value>
1047
+ <value>hasArrangement</value>
1048
+ <value>abridgementOf</value>
1049
+ <value>hasAbridgement</value>
1050
+ <value>annotationOf</value>
1051
+ <value>hasAnnotation</value>
1052
+ <value>draftOf</value>
1053
+ <value>hasDraft</value>
1054
+ <value>editionOf</value>
1055
+ <value>hasEdition</value>
1056
+ <value>updates</value>
1057
+ <value>updatedBy</value>
1058
+ <value>derivedFrom</value>
1059
+ <value>derives</value>
1022
1060
  <value>describes</value>
1023
1061
  <value>describedBy</value>
1062
+ <value>catalogues</value>
1063
+ <value>cataloguedBy</value>
1064
+ <value>hasSuccessor</value>
1065
+ <value>successorOf</value>
1066
+ <value>adaptedFrom</value>
1067
+ <value>hasAdaptation</value>
1068
+ <value>adoptedFrom</value>
1069
+ <value>adoptedAs</value>
1070
+ <value>reviewOf</value>
1071
+ <value>hasReview</value>
1072
+ <value>commentaryOf</value>
1073
+ <value>hasCommentary</value>
1074
+ <value>related</value>
1075
+ <value>complements</value>
1076
+ <value>complementOf</value>
1077
+ <value>obsoletes</value>
1078
+ <value>obsoletedBy</value>
1079
+ <value>cited</value>
1080
+ <value>isCitedIn</value>
1024
1081
  </choice>
1025
1082
  </define>
1026
1083
  <define name="docrelation">
@@ -1028,12 +1085,30 @@
1028
1085
  <attribute name="type">
1029
1086
  <ref name="DocRelationType"/>
1030
1087
  </attribute>
1088
+ <optional>
1089
+ <element name="description">
1090
+ <ref name="FormattedString"/>
1091
+ </element>
1092
+ </optional>
1031
1093
  <element name="bibitem">
1032
1094
  <ref name="BibliographicItem"/>
1033
1095
  </element>
1034
- <zeroOrMore>
1035
- <ref name="locality"/>
1036
- </zeroOrMore>
1096
+ <choice>
1097
+ <zeroOrMore>
1098
+ <ref name="locality"/>
1099
+ </zeroOrMore>
1100
+ <zeroOrMore>
1101
+ <ref name="localityStack"/>
1102
+ </zeroOrMore>
1103
+ </choice>
1104
+ <choice>
1105
+ <zeroOrMore>
1106
+ <ref name="sourceLocality"/>
1107
+ </zeroOrMore>
1108
+ <zeroOrMore>
1109
+ <ref name="sourceLocalityStack"/>
1110
+ </zeroOrMore>
1111
+ </choice>
1037
1112
  </element>
1038
1113
  </define>
1039
1114
  <define name="version">
@@ -14,6 +14,14 @@ module Asciidoctor
14
14
 
15
15
  register_for "generic"
16
16
 
17
+ def xml_root_tag
18
+ configuration.xml_root_tag || XML_ROOT_TAG
19
+ end
20
+
21
+ def xml_namespace
22
+ configuration.document_namespace || XML_NAMESPACE
23
+ end
24
+
17
25
  def baselocation(loc)
18
26
  return nil if loc.nil?
19
27
  File.expand_path(File.join(File.dirname(self.class::_file || __FILE__), "..", "..", "..", loc))
@@ -79,8 +87,17 @@ module Asciidoctor
79
87
  end
80
88
  end
81
89
 
90
+ def metadata_ext(node, ext)
91
+ super
92
+ Array(configuration.metadata_extensions).each do |e|
93
+ a = node.attr(e) and ext.send e, a
94
+ end
95
+ end
96
+
97
+ =begin
82
98
  def makexml(node)
83
- root_tag = configuration.xml_root_tag || XML_ROOT_TAG
99
+ #root_tag = configuration.xml_root_tag || XML_ROOT_TAG
100
+ root_tag = XML_ROOT_TAG
84
101
  result = ["<?xml version='1.0' encoding='UTF-8'?>\n<#{root_tag}>"]
85
102
  @draft = node.attributes.has_key?("draft")
86
103
  result << noko { |ixml| front node, ixml }
@@ -93,6 +110,7 @@ module Asciidoctor
93
110
  XML_NAMESPACE)
94
111
  ret1
95
112
  end
113
+ =end
96
114
 
97
115
  def doctype(node)
98
116
  d = node.attr("doctype")
@@ -121,7 +139,7 @@ module Asciidoctor
121
139
  File.open(filename, "w") { |f| f.write(ret) }
122
140
  html_converter(node).convert filename unless node.attr("nodoc")
123
141
  word_converter(node).convert filename unless node.attr("nodoc")
124
- pdf_converter(node).convert filename unless node.attr("nodoc")
142
+ pdf_converter(node)&.convert filename unless node.attr("nodoc")
125
143
  end
126
144
  @log.write(@localdir + @filename + ".err") unless @novalid
127
145
  @files_to_delete.each { |f| FileUtils.rm f }
@@ -303,8 +303,23 @@
303
303
  <ref name="paragraph"/>
304
304
  </element>
305
305
  </define>
306
+ <define name="TextElement" combine="choice">
307
+ <ref name="concept"/>
308
+ </define>
306
309
  </include>
307
310
  <!-- end overrides -->
311
+ <define name="concept">
312
+ <element name="concept">
313
+ <optional>
314
+ <attribute name="term"/>
315
+ </optional>
316
+ <choice>
317
+ <ref name="eref"/>
318
+ <ref name="xref"/>
319
+ <ref name="termref"/>
320
+ </choice>
321
+ </element>
322
+ </define>
308
323
  <define name="BasicBlock" combine="choice">
309
324
  <choice>
310
325
  <ref name="requirement"/>
@@ -911,7 +926,10 @@
911
926
  </define>
912
927
  <define name="origin">
913
928
  <element name="origin">
914
- <ref name="erefType"/>
929
+ <choice>
930
+ <ref name="erefType"/>
931
+ <ref name="termref"/>
932
+ </choice>
915
933
  </element>
916
934
  </define>
917
935
  <define name="modification">
@@ -919,6 +937,15 @@
919
937
  <ref name="paragraph"/>
920
938
  </element>
921
939
  </define>
940
+ <define name="termref">
941
+ <element name="termref">
942
+ <attribute name="base"/>
943
+ <attribute name="target"/>
944
+ <optional>
945
+ <text/>
946
+ </optional>
947
+ </element>
948
+ </define>
922
949
  <define name="structuredidentifier">
923
950
  <element name="structuredidentifier">
924
951
  <optional>
@@ -54,6 +54,11 @@ module IsoDoc
54
54
  make_body3(body, docxml)
55
55
  end
56
56
  end
57
+
58
+ def info(isoxml, out)
59
+ @meta.ext isoxml, out
60
+ super
61
+ end
57
62
  end
58
63
  end
59
64
  end
@@ -1,26 +1,9 @@
1
1
  <script>
2
- //TOC generation
3
- $('#toc').toc({
4
- 'selectors': toclevel(), //elements to use as headings
5
- 'container': 'main', //element to find all selectors in
6
- 'smoothScrolling': true, //enable or disable smooth scrolling on click
7
- 'prefix': 'toc', //prefix for anchor tags and class names
8
- 'onHighlight': function(el) {}, //called when a new section is highlighted
9
- 'highlightOnScroll': true, //add class to heading that is currently in focus
10
- 'highlightOffset': 100, //offset to trigger the next headline
11
- 'anchorName': function(i, heading, prefix) { //custom function for anchor name
12
- return prefix+i;
13
- },
14
- 'headerText': function(i, heading, $heading) { //custom function building the header-item text
15
- return $heading.text();
16
- },
17
- 'itemClass': function(i, heading, $heading, prefix) { // custom function for item class
18
- return $heading[0].tagName.toLowerCase();
19
- }
20
- });
21
-
2
+ $("#toc").on('click', 'li', function(e) {
3
+ $(this).parent().find('li.toc-active').removeClass('toc-active');
4
+ $(this).addClass('toc-active');
5
+ });
22
6
  </script>
23
-
24
7
  <script>
25
8
  //TOC toggle animation
26
9
  $('#toggle').on('click', function(){
@@ -43,6 +43,13 @@ module IsoDoc
43
43
  stages = configuration&.published_stages || ["published"]
44
44
  !(Array(stages).map { |m| m.downcase }.include? status.downcase)
45
45
  end
46
+
47
+ def ext(isoxml, out)
48
+ Array(configuration.metadata_extensions).each do |e|
49
+ b = isoxml&.at(ns("//bibdata/ext/#{e}"))&.text or next
50
+ set(e.to_sym, b)
51
+ end
52
+ end
46
53
  end
47
54
  end
48
55
  end
@@ -7,7 +7,7 @@ module Metanorma
7
7
  module Generic
8
8
  ORGANIZATION_NAME_SHORT = "Acme"
9
9
  ORGANIZATION_NAME_LONG = "Acme Corp."
10
- DOCUMENT_NAMESPACE = "https://metanorma.org/ns/generic"
10
+ DOCUMENT_NAMESPACE = "https://www.metanorma.org/ns/generic"
11
11
  YAML_CONFIG_FILE = 'metanorma.yml'
12
12
 
13
13
  class Configuration
@@ -25,6 +25,7 @@ module Metanorma
25
25
  html_bodyfont
26
26
  html_headerfont
27
27
  html_monospacefont
28
+ metadata_extensions
28
29
  published_stages
29
30
  stage_abbreviations
30
31
  scripts
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Generic
3
- VERSION = "1.4.6"
3
+ VERSION = "1.4.7"
4
4
  end
5
5
  end
@@ -15,5 +15,7 @@ wordcoverpage: /metanorma-mine/lib/isodoc/mine/html/word_mine_titlepage.html
15
15
  wordintropage: /metanorma-mine/lib/isodoc/mine/html/word_mine_intro.html
16
16
  wordstylesheet: /metanorma-mine/lib/isodoc/mine/html/wordstyle.scss
17
17
  docid_template: "{{ organization_name_short }} {{ docnumeric }}"
18
+ metadata_extensions:
19
+ - security
18
20
  published_stages:
19
21
  - published
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-generic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-03 00:00:00.000000000 Z
11
+ date: 2020-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities