metanorma-m3d 1.3.17 → 1.3.18

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: 06d2777cd44148b1013ee17e76fc99c96d1e4e1012f0080f33157abe8bf2f61d
4
- data.tar.gz: 840704b427a3f2f09daaaddcd53a2d9552e717518b864377c9dccff7165de91a
3
+ metadata.gz: 7207ea105a70b39bd791ed45cbf56ba879223951c9e337d7ed17270c27f49940
4
+ data.tar.gz: 5f023a5278edb3b90be8c66821e2ed716039a14d17503163149446f9c17cbfff
5
5
  SHA512:
6
- metadata.gz: b20336265f238b8b4d8aa2d80be6a61aca961693331b86ddad4579c3064664865a9984adac451701cda5b16b10c8b2315129a02f0274bf1e30a4196ebadf9b27
7
- data.tar.gz: '091eedc6284f633bfd626bea725d43a8df9b4a99c1f7d770f4fa25c6a006cb310265def6e2602b735cb7d8a1930a6e2ad3074d7914359245180f37dfa2b634b5'
6
+ metadata.gz: 75bccb7b7358c7a7c64cb4393c0114d7647bbda5413e2ae8b8a7adffde7452eabd8674066353ffac482a090c44c07e5156b973c217ddc41d19090355e46a2f0b
7
+ data.tar.gz: 4ee99a978347d4a6da82c13673f08ee805f4d1ac081e3421cb588b44b25273ad0c45e7b02fe696a0b45187e625a54db16376cdccc6488400b7397248003f30c9
@@ -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
data/README.adoc CHANGED
@@ -45,7 +45,7 @@ The preferred way to invoke this gem is via the `metanorma` script:
45
45
  ----
46
46
  $ metanorma --type m3d a.adoc # output HTML and DOC
47
47
  $ metanorma --type m3d --extensions html a.adoc # output just HTML
48
- $ metanorma --type m3d --extensions pdf a.adoc # output just DOC
48
+ $ metanorma --type m3d --extensions doc a.adoc # output just DOC
49
49
  $ metanorma --type m3d --extensions xml a.adoc # output M3D XML
50
50
  ----
51
51
 
@@ -55,7 +55,7 @@ reported to console against the XML, and are intended for users to
55
55
  check that they have provided all necessary components of the
56
56
  document.
57
57
 
58
- The gem then converts the XML into HTML and PDF.
58
+ The gem then converts the XML into HTML and DOC.
59
59
 
60
60
  The gem can also be invoked directly within asciidoctor, though this is deprecated:
61
61
 
@@ -767,6 +767,8 @@
767
767
  <value>unchanged</value>
768
768
  <value>circulated</value>
769
769
  <value>adapted</value>
770
+ <value>vote-started</value>
771
+ <value>vote-ended</value>
770
772
  </choice>
771
773
  </define>
772
774
  <define name="bdate">
@@ -1019,38 +1021,63 @@
1019
1021
  </define>
1020
1022
  <define name="DocRelationType">
1021
1023
  <choice>
1022
- <value>obsoletes</value>
1023
- <value>obsoletedBy</value>
1024
- <value>supersedes</value>
1025
- <value>supersededBy</value>
1026
- <value>updates</value>
1027
- <value>updatedBy</value>
1028
- <value>complements</value>
1029
- <value>derivedFrom</value>
1030
- <value>translatedFrom</value>
1031
- <value>hasTranslation</value>
1032
- <value>adoptedFrom</value>
1033
- <value>equivalent</value>
1034
- <value>identical</value>
1035
- <value>nonequivalent</value>
1036
- <value>includedIn</value>
1037
1024
  <value>includes</value>
1038
- <value>instance</value>
1039
- <value>instanceOf</value>
1040
- <value>partOf</value>
1025
+ <value>includedIn</value>
1041
1026
  <value>hasPart</value>
1042
- <value>hasDraft</value>
1043
- <value>draftOf</value>
1027
+ <value>partOf</value>
1044
1028
  <value>merges</value>
1029
+ <value>mergedInto</value>
1045
1030
  <value>splits</value>
1046
- <value>amends</value>
1047
- <value>amendedBy</value>
1048
- <value>corrects</value>
1049
- <value>correctedBy</value>
1050
- <value>revises</value>
1051
- <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>
1052
1060
  <value>describes</value>
1053
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>
1054
1081
  </choice>
1055
1082
  </define>
1056
1083
  <define name="docrelation">
@@ -2,7 +2,6 @@ require "asciidoctor"
2
2
  require "metanorma/m3d/version"
3
3
  require "isodoc/m3d/html_convert"
4
4
  require "isodoc/m3d/word_convert"
5
- require "isodoc/m3d/pdf_convert"
6
5
  require "asciidoctor/standoc/converter"
7
6
  require "fileutils"
8
7
  require_relative "./validate.rb"
@@ -105,7 +104,6 @@ module Asciidoctor
105
104
  gsub(%r{^.*/}, "")
106
105
  File.open(filename, "w") { |f| f.write(ret) }
107
106
  html_converter(node).convert filename unless node.attr("nodoc")
108
- pdf_converter(node).convert filename unless node.attr("nodoc")
109
107
  word_converter(node).convert filename unless node.attr("nodoc")
110
108
  end
111
109
  @log.write(@localdir + @filename + ".err") unless @novalid
@@ -137,10 +135,6 @@ module Asciidoctor
137
135
  def word_converter(node)
138
136
  IsoDoc::M3d::WordConvert.new(doc_extract_attributes(node))
139
137
  end
140
-
141
- def pdf_converter(node)
142
- IsoDoc::M3d::PdfConvert.new(html_extract_attributes(node))
143
- end
144
138
  end
145
139
  end
146
140
  end
@@ -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>
@@ -1,24 +1,8 @@
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
7
 
24
8
  <script>
@@ -13,8 +13,7 @@ module Metanorma
13
13
  def output_formats
14
14
  super.merge(
15
15
  html: "html",
16
- doc: "doc",
17
- pdf: "pdf"
16
+ doc: "doc"
18
17
  )
19
18
  end
20
19
 
@@ -30,8 +29,6 @@ module Metanorma
30
29
  case format
31
30
  when :html
32
31
  IsoDoc::M3d::HtmlConvert.new(options).convert(outname, isodoc_node)
33
- when :pdf
34
- IsoDoc::M3d::PdfConvert.new(options).convert(outname, isodoc_node)
35
32
  when :doc
36
33
  IsoDoc::M3d::WordConvert.new(options).convert(outname, isodoc_node)
37
34
  else
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3d
3
- VERSION = "1.3.17"
3
+ VERSION = "1.3.18"
4
4
  end
5
5
  end
data/lib/metanorma-m3d.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require "asciidoctor" unless defined? Asciidoctor::Converter
2
2
  require_relative "asciidoctor/m3d/converter"
3
3
  require_relative "isodoc/m3d/html_convert"
4
- require_relative "isodoc/m3d/pdf_convert"
5
4
  require_relative "isodoc/m3d/word_convert"
6
5
  require_relative "metanorma/m3d/version"
7
6
 
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.3.17
4
+ version: 1.3.18
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-17 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: asciimath
@@ -314,7 +314,6 @@ files:
314
314
  - lib/isodoc/m3d/html/wordstyle.scss
315
315
  - lib/isodoc/m3d/html_convert.rb
316
316
  - lib/isodoc/m3d/metadata.rb
317
- - lib/isodoc/m3d/pdf_convert.rb
318
317
  - lib/isodoc/m3d/word_convert.rb
319
318
  - lib/metanorma-m3d.rb
320
319
  - lib/metanorma/m3d.rb
@@ -1,72 +0,0 @@
1
- require "isodoc"
2
- require_relative "base_convert"
3
-
4
- module IsoDoc
5
- module M3d
6
- # A {Converter} implementation that generates CSAND output, and a document
7
- # schema encapsulation of the document for validation
8
- class PdfConvert < IsoDoc::PdfConvert
9
- def initialize(options)
10
- @libdir = File.dirname(__FILE__)
11
- super
12
- end
13
-
14
- #def convert1(docxml, filename, dir)
15
- #add_image(%w(logo.jpg m3-logo.png))
16
- #super
17
- #end
18
-
19
- def default_fonts(options)
20
- {
21
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Overpass",sans-serif'),
22
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Overpass",sans-serif'),
23
- monospacefont: '"Space Mono",monospace'
24
- }
25
- end
26
-
27
- def default_file_locations(_options)
28
- {
29
- htmlstylesheet: html_doc_path("htmlstyle.scss"),
30
- htmlcoverpage: html_doc_path("html_m3d_titlepage.html"),
31
- htmlintropage: html_doc_path("html_m3d_intro.html"),
32
- standardstylesheet: nil,
33
- scripts_pdf: html_doc_path("scripts.pdf.html"),
34
- }
35
- end
36
-
37
- def colophon(body, docxml)
38
- body.div **{ class: "colophon" } do |div|
39
- div << <<~"COLOPHON"
40
- <p>As with all M3AAWG documents that we publish, please check the M3AAWG website
41
- (<a href="http://www.m3aawg.org">www.m3aawg.org</a>) for updates to this paper.</p>
42
- <p>&copy; {{ docyear }} copyright by the Messaging, Malware and Mobile Anti-Abuse Working Group (M3AAWG)</p>
43
- COLOPHON
44
- end
45
- end
46
-
47
- def googlefonts()
48
- <<~HEAD.freeze
49
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
50
- <link href="https://fonts.googleapis.com/css?family=Overpass:300,300i,600,900" rel="stylesheet">
51
- HEAD
52
- end
53
-
54
- def make_body(xml, docxml)
55
- body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72", "xml:lang": "EN-US", class: "container" }
56
- xml.body **body_attr do |body|
57
- make_body1(body, docxml)
58
- make_body2(body, docxml)
59
- make_body3(body, docxml)
60
- colophon(body, docxml)
61
- end
62
- end
63
-
64
- def html_toc(docxml)
65
- docxml
66
- end
67
-
68
- include BaseRender
69
- end
70
- end
71
- end
72
-