metanorma-ribose 1.7.1 → 1.7.6

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: 925018e056fa43a11378e6b304090504f13d5042254583ac4c4953f418f8ac40
4
- data.tar.gz: 80308a8aa53fe8110b8e8d5367b75f8bb367410a459d3b971d8765e296881366
3
+ metadata.gz: 62b740f989d4069f648958b45e7eb94a550fd6b9bba77938fd097763f08bc327
4
+ data.tar.gz: 8e4450e474fc622ebcd152328af68181f2044730e7186e6efc6bd9c875ed4d8e
5
5
  SHA512:
6
- metadata.gz: 39f6df5375f989766daf8e1f95bfb51138c38bdec2c9ecc2d6f89c33aa132741b158adfb520a4c832e97ce700c7f6f5e75b8945729a0dde73bd2088028a26e71
7
- data.tar.gz: d4dc7b1a585cbb029e2fe7273c42cb175bd0c6230aa84d0525bb89bb2281fec63771a6c12e5dd696f87cc51242255b960812ec935a5d90b849ac4868db194ad1
6
+ metadata.gz: ee05d487fe6866c3e942aff7c0f7fa4058df23ac3b4cfc244236f4791f101f2b16e11d90f060440c262b4890085439de70a72d2be4a5d80391fa4e2d8432ed47
7
+ data.tar.gz: f9ef5fde31668bcd03631a13034b1e5f58ae62638ddd2a4e64ed87c83fb5eee066348c54d5026a4104acd949a72e2a4d2909b24577d87176ef762ebef7dbd9fd
@@ -4,7 +4,7 @@ name: rake
4
4
 
5
5
  on:
6
6
  push:
7
- branches: [ master, main ]
7
+ branches: [ master, main ]
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@master
34
24
 
@@ -49,5 +39,5 @@ jobs:
49
39
  with:
50
40
  token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
51
41
  repository: ${{ github.repository }}
52
- event-type: notify
42
+ event-type: tests-passed
53
43
  client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,14 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
4
3
  inherit_from:
5
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
5
 
7
6
  # local repo-specific modifications
7
+ # ...
8
8
 
9
9
  AllCops:
10
- DisplayCopNames: false
11
- StyleGuideCopsOnly: false
12
- TargetRubyVersion: 2.4
13
- Rails:
14
- Enabled: true
10
+ TargetRubyVersion: 2.5
data/Gemfile CHANGED
@@ -6,6 +6,6 @@ git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
7
  gemspec
8
8
 
9
- if File.exist? 'Gemfile.devel'
10
- eval File.read('Gemfile.devel'), nil, 'Gemfile.devel' # rubocop:disable Security/Eval
9
+ if File.exist? "Gemfile.devel"
10
+ eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
11
11
  end
data/README.adoc CHANGED
@@ -1,10 +1,10 @@
1
- = metanorma-ribose: Asciidoctor processor for Ribose Standard Documents
1
+ = Metanorma processor for Ribose documents
2
2
 
3
- image:https://img.shields.io/gem/v/metanorma-rsd.svg["Gem Version", link="https://rubygems.org/gems/metanorma-rsd"]
4
- image:https://github.com/metanorma/metanorma-rsd/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-rsd/actions?workflow=rake"]
5
- image:https://codeclimate.com/github/metanorma/metanorma-rsd/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-rsd"]
6
- image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-rsd.svg["Pull Requests", link="https://github.com/metanorma/metanorma-rsd/pulls"]
7
- image:https://img.shields.io/github/commits-since/metanorma/metanorma-rsd/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-rsd/releases"]
3
+ image:https://img.shields.io/gem/v/metanorma-ribose.svg["Gem Version", link="https://rubygems.org/gems/metanorma-ribose"]
4
+ image:https://github.com/metanorma/metanorma-ribose/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-ribose/actions?workflow=rake"]
5
+ image:https://codeclimate.com/github/metanorma/metanorma-ribose/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-ribose"]
6
+ image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-ribose.svg["Pull Requests", link="https://github.com/metanorma/metanorma-ribose/pulls"]
7
+ image:https://img.shields.io/github/commits-since/metanorma/metanorma-ribose/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-ribose/releases"]
8
8
 
9
9
  == Functionality
10
10
 
@@ -27,7 +27,7 @@ $ metanorma --type ribose --extensions xml a.adoc # output Metanorma XML
27
27
  ----
28
28
 
29
29
  The gem translates the document into Metanorma XML format, and then
30
- validates its output against the Ribopse Metanorma XML document model; errors are
30
+ validates its output against the Ribose Metanorma XML document model; errors are
31
31
  reported to console against the XML, and are intended for users to
32
32
  check that they have provided all necessary components of the
33
33
  document.
@@ -36,16 +36,8 @@ The gem then converts the XML into output formats such as HTML and PDF.
36
36
 
37
37
  === Installation
38
38
 
39
- If you are using a Mac, the https://github.com/metanorma/metanorma-macos-setup
40
- repository has instructions on setting up your machine to run Metanorma
41
- scripts such as this one. You need only run the following in a Terminal console:
39
+ See https://www.metanorma.com for installation documentation.
42
40
 
43
- [source,console]
44
- ----
45
- $ bash <(curl -s https://raw.githubusercontent.com/metanorma/metanorma-macos-setup/master/metanorma-setup)
46
- $ gem install metanorma-rsd
47
- $ gem install metanorma-cli
48
- ----
49
41
 
50
42
  == Documentation
51
43
 
@@ -57,7 +49,7 @@ See https://www.metanorma.com/author/ribose/[The Ribose flavor of Metanorma]
57
49
  The Ribose Standard Document format is an instance of the
58
50
  https://github.com/metanorma/metanorma-model-standoc[StandardDocument model]. Details of
59
51
  this general model can be found on its page. Details of the Ribose modifications
60
- to this general model can be found on the https://github.com/metanorma/metanorma-model-rsd[RSD model]
52
+ to this general model can be found on the https://github.com/metanorma/metanorma-model-ribose[Metanorma-Ribose model]
61
53
  repository.
62
54
 
63
55
  == Examples
@@ -67,4 +59,4 @@ repository.
67
59
 
68
60
  == Notes
69
61
 
70
- Metanorma-Ribose was formerly published as `asciidoctor-rsd`, `metanorma-rsd`.
62
+ Metanorma-Ribose was formerly published as `metanorma-rsd`.
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
- require 'isodoc/gem_tasks'
3
+ require "isodoc/gem_tasks"
4
4
 
5
5
  IsoDoc::GemTasks.install
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- task :default => :spec
8
+ task default: :spec
data/bin/rspec CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
-
2
+
3
3
  # This file was generated by Bundler.
4
4
  #
5
5
  # The application 'rspec' is installed as part of a gem, and
@@ -15,4 +15,3 @@ require "rubygems"
15
15
  require "bundler/setup"
16
16
 
17
17
  load Gem.bin_path("rspec-core", "rspec")
18
-
@@ -787,6 +787,7 @@
787
787
  <value>adapted</value>
788
788
  <value>vote-started</value>
789
789
  <value>vote-ended</value>
790
+ <value>announced</value>
790
791
  </choice>
791
792
  </define>
792
793
  <define name="bdate">
@@ -1,5 +1,5 @@
1
1
  require "asciidoctor/standoc/converter"
2
- require 'asciidoctor/generic/converter'
2
+ require "asciidoctor/generic/converter"
3
3
 
4
4
  module Asciidoctor
5
5
  module Ribose
@@ -7,33 +7,34 @@ module Asciidoctor
7
7
  # schema encapsulation of the document for validation
8
8
  #
9
9
  class Converter < Asciidoctor::Generic::Converter
10
- XML_ROOT_TAG = 'rsd-standard'.freeze
11
- XML_NAMESPACE = 'https://www.metanorma.org/ns/rsd'.freeze
10
+ XML_ROOT_TAG = "rsd-standard".freeze
11
+ XML_NAMESPACE = "https://www.metanorma.org/ns/rsd".freeze
12
12
 
13
13
  register_for "ribose"
14
14
 
15
15
  def sectiontype(node, level = true)
16
16
  ret = sectiontype1(node)
17
17
  ret1 = sectiontype_streamline(ret)
18
- return ret1 if "symbols and abbreviated terms" == ret1
19
- return ret1 if "executive summary" == ret1
18
+ return ret1 if ret1 == "symbols and abbreviated terms"
19
+ return ret1 if ret1 == "executive summary"
20
20
  return nil unless !level || node.level == 1
21
21
  return nil if @seen_headers.include? ret
22
+
22
23
  @seen_headers << ret
23
24
  ret1
24
25
  end
25
26
 
26
- def make_preface(x, s)
27
- if x.at("//foreword | //introduction | //acknowledgements | "\
27
+ def make_preface(xml, sect)
28
+ if xml.at("//foreword | //introduction | //acknowledgements | "\
28
29
  "//clause[@preface] | //executivesummary")
29
- preface = s.add_previous_sibling("<preface/>").first
30
- f = x.at("//foreword") and preface.add_child f.remove
31
- f = x.at("//executivesummary") and preface.add_child f.remove
32
- f = x.at("//introduction") and preface.add_child f.remove
33
- move_clauses_into_preface(x, preface)
34
- f = x.at("//acknowledgements") and preface.add_child f.remove
30
+ preface = sect.add_previous_sibling("<preface/>").first
31
+ f = xml.at("//foreword") and preface.add_child f.remove
32
+ f = xml.at("//executivesummary") and preface.add_child f.remove
33
+ f = xml.at("//introduction") and preface.add_child f.remove
34
+ move_clauses_into_preface(xml, preface)
35
+ f = xml.at("//acknowledgements") and preface.add_child f.remove
35
36
  end
36
- make_abstract(x, s)
37
+ make_abstract(xml, sect)
37
38
  end
38
39
 
39
40
  def clause_parse(attrs, xml, node)
@@ -55,7 +56,8 @@ module Asciidoctor
55
56
  end
56
57
 
57
58
  def presentation_xml_converter(node)
58
- IsoDoc::Ribose::PresentationXMLConvert.new(html_extract_attributes(node))
59
+ IsoDoc::Ribose::PresentationXMLConvert
60
+ .new(html_extract_attributes(node))
59
61
  end
60
62
 
61
63
  def html_converter(node)
@@ -64,6 +66,7 @@ module Asciidoctor
64
66
 
65
67
  def pdf_converter(node)
66
68
  return nil if node.attr("no-pdf")
69
+
67
70
  IsoDoc::Ribose::PdfConvert.new(html_extract_attributes(node))
68
71
  end
69
72
 
@@ -45,6 +45,11 @@
45
45
  <optional>
46
46
  <attribute name="alt"/>
47
47
  </optional>
48
+ <optional>
49
+ <attribute name="updatetype">
50
+ <data type="boolean"/>
51
+ </attribute>
52
+ </optional>
48
53
  <text/>
49
54
  </element>
50
55
  </define>
@@ -543,6 +548,9 @@
543
548
  </define>
544
549
  <define name="BibDataExtensionType">
545
550
  <ref name="doctype"/>
551
+ <optional>
552
+ <ref name="docsubtype"/>
553
+ </optional>
546
554
  <optional>
547
555
  <ref name="editorialgroup"/>
548
556
  </optional>
@@ -876,8 +884,28 @@
876
884
  </zeroOrMore>
877
885
  </element>
878
886
  </define>
887
+ <define name="pagebreak">
888
+ <element name="pagebreak">
889
+ <optional>
890
+ <attribute name="orientation">
891
+ <choice>
892
+ <value>landscape</value>
893
+ <value>portrait</value>
894
+ </choice>
895
+ </attribute>
896
+ </optional>
897
+ </element>
898
+ </define>
879
899
  </include>
880
900
  <!-- end overrides -->
901
+ <define name="docsubtype">
902
+ <element name="docsubtype">
903
+ <ref name="DocumentSubtype"/>
904
+ </element>
905
+ </define>
906
+ <define name="DocumentSubtype">
907
+ <text/>
908
+ </define>
881
909
  <define name="colgroup">
882
910
  <element name="colgroup">
883
911
  <oneOrMore>
@@ -927,7 +955,24 @@
927
955
  <define name="concept">
928
956
  <element name="concept">
929
957
  <optional>
930
- <attribute name="term"/>
958
+ <element name="refterm">
959
+ <zeroOrMore>
960
+ <choice>
961
+ <ref name="PureTextElement"/>
962
+ <ref name="stem"/>
963
+ </choice>
964
+ </zeroOrMore>
965
+ </element>
966
+ </optional>
967
+ <optional>
968
+ <element name="renderterm">
969
+ <zeroOrMore>
970
+ <choice>
971
+ <ref name="PureTextElement"/>
972
+ <ref name="stem"/>
973
+ </choice>
974
+ </zeroOrMore>
975
+ </element>
931
976
  </optional>
932
977
  <choice>
933
978
  <ref name="eref"/>
@@ -943,8 +988,170 @@
943
988
  <ref name="permission"/>
944
989
  <ref name="imagemap"/>
945
990
  <ref name="svgmap"/>
991
+ <ref name="inputform"/>
992
+ </choice>
993
+ </define>
994
+ <define name="inputform">
995
+ <element name="form">
996
+ <attribute name="id">
997
+ <data type="ID"/>
998
+ </attribute>
999
+ <attribute name="name"/>
1000
+ <attribute name="action"/>
1001
+ <zeroOrMore>
1002
+ <choice>
1003
+ <ref name="TextElement"/>
1004
+ <ref name="FormInput"/>
1005
+ </choice>
1006
+ </zeroOrMore>
1007
+ </element>
1008
+ </define>
1009
+ <define name="FormInput">
1010
+ <choice>
1011
+ <ref name="input"/>
1012
+ <ref name="formlabel"/>
1013
+ <ref name="select"/>
1014
+ <ref name="textarea"/>
946
1015
  </choice>
947
1016
  </define>
1017
+ <define name="InputType">
1018
+ <choice>
1019
+ <value>button</value>
1020
+ <value>checkbox</value>
1021
+ <value>date</value>
1022
+ <value>file</value>
1023
+ <value>password</value>
1024
+ <value>radio</value>
1025
+ <value>submit</value>
1026
+ <value>text</value>
1027
+ </choice>
1028
+ </define>
1029
+ <define name="input">
1030
+ <element name="input">
1031
+ <attribute name="type">
1032
+ <ref name="InputType"/>
1033
+ </attribute>
1034
+ <optional>
1035
+ <attribute name="checked">
1036
+ <data type="boolean"/>
1037
+ </attribute>
1038
+ </optional>
1039
+ <optional>
1040
+ <attribute name="disabled">
1041
+ <data type="boolean"/>
1042
+ </attribute>
1043
+ </optional>
1044
+ <optional>
1045
+ <attribute name="readonly">
1046
+ <data type="boolean"/>
1047
+ </attribute>
1048
+ </optional>
1049
+ <optional>
1050
+ <attribute name="maxlength">
1051
+ <data type="int"/>
1052
+ </attribute>
1053
+ </optional>
1054
+ <optional>
1055
+ <attribute name="minlength">
1056
+ <data type="int"/>
1057
+ </attribute>
1058
+ </optional>
1059
+ <optional>
1060
+ <attribute name="name"/>
1061
+ </optional>
1062
+ <optional>
1063
+ <attribute name="value"/>
1064
+ </optional>
1065
+ <optional>
1066
+ <attribute name="id">
1067
+ <data type="ID"/>
1068
+ </attribute>
1069
+ </optional>
1070
+ </element>
1071
+ </define>
1072
+ <define name="formlabel">
1073
+ <element name="label">
1074
+ <attribute name="for">
1075
+ <data type="IDREF"/>
1076
+ </attribute>
1077
+ <zeroOrMore>
1078
+ <ref name="PureTextElement"/>
1079
+ </zeroOrMore>
1080
+ </element>
1081
+ </define>
1082
+ <define name="select">
1083
+ <element name="select">
1084
+ <optional>
1085
+ <attribute name="name"/>
1086
+ </optional>
1087
+ <optional>
1088
+ <attribute name="value"/>
1089
+ </optional>
1090
+ <optional>
1091
+ <attribute name="id">
1092
+ <data type="ID"/>
1093
+ </attribute>
1094
+ </optional>
1095
+ <optional>
1096
+ <attribute name="disabled">
1097
+ <data type="boolean"/>
1098
+ </attribute>
1099
+ </optional>
1100
+ <optional>
1101
+ <attribute name="multiple">
1102
+ <data type="boolean"/>
1103
+ </attribute>
1104
+ </optional>
1105
+ <optional>
1106
+ <attribute name="size">
1107
+ <data type="int"/>
1108
+ </attribute>
1109
+ </optional>
1110
+ <oneOrMore>
1111
+ <ref name="option"/>
1112
+ </oneOrMore>
1113
+ </element>
1114
+ </define>
1115
+ <define name="option">
1116
+ <element name="option">
1117
+ <optional>
1118
+ <attribute name="disabled">
1119
+ <data type="boolean"/>
1120
+ </attribute>
1121
+ </optional>
1122
+ <optional>
1123
+ <attribute name="value"/>
1124
+ </optional>
1125
+ <zeroOrMore>
1126
+ <ref name="PureTextElement"/>
1127
+ </zeroOrMore>
1128
+ </element>
1129
+ </define>
1130
+ <define name="textarea">
1131
+ <element name="textarea">
1132
+ <optional>
1133
+ <attribute name="name"/>
1134
+ </optional>
1135
+ <optional>
1136
+ <attribute name="value"/>
1137
+ </optional>
1138
+ <optional>
1139
+ <attribute name="id">
1140
+ <data type="ID"/>
1141
+ </attribute>
1142
+ </optional>
1143
+ <optional>
1144
+ <attribute name="rows">
1145
+ <data type="int"/>
1146
+ </attribute>
1147
+ </optional>
1148
+ <optional>
1149
+ <attribute name="cols">
1150
+ <data type="int"/>
1151
+ </attribute>
1152
+ </optional>
1153
+ </element>
1154
+ </define>
948
1155
  <define name="bibliography">
949
1156
  <element name="bibliography">
950
1157
  <oneOrMore>
@@ -1017,9 +1224,7 @@
1017
1224
  </define>
1018
1225
  <define name="IsoWorkgroup">
1019
1226
  <optional>
1020
- <attribute name="number">
1021
- <data type="int"/>
1022
- </attribute>
1227
+ <attribute name="number"/>
1023
1228
  </optional>
1024
1229
  <optional>
1025
1230
  <attribute name="type"/>