metanorma-ogc 1.3.1 → 1.3.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: c844c9413112ce478961eaee4dc1d9095cb45f7a9037e5fb2a017aa14df2570a
4
- data.tar.gz: b18b7340a94b1ca58ae3e1acc4531fb27c64f65077a523ce725c5f0672beb9dc
3
+ metadata.gz: ad3456994609c7561163566d0be10cf0770f4f3423871dbefcf24657d5e551a7
4
+ data.tar.gz: 79a4f0da33d0194fb0684483977dcf75355f0660749d8bc649e710f72e31ae95
5
5
  SHA512:
6
- metadata.gz: d1322f1463bcf357d6528a2db5c3ce2e8b1f2b34123aab899896afb99c8036d47396b892085676222b466602a26656ae903d9cea1857fe9c730b0d39567b254c
7
- data.tar.gz: d85779466d2a1f7f973b47888520a1c633ed45b0afb07d0f2cc78ec13e5c21807ca76e8486a15535b4126a831abdfa238e7cd1b51837339582d3b5150b4bdb2b
6
+ metadata.gz: 35342c6a703f8a6a3bb910cdceea76ae6500d0423c248b51efd55b5a850f25be5e645c89c8fe09a1f662a817a693dea123074c434afd7bfaadb05dc7d2ad6eb2
7
+ data.tar.gz: a7c312698494e453a5f12ac8450d2ebe182a8b708dbaef2352a5eeec9054a3151695cd3a2efce1f7f4d0d3e05a6050278932567d9e7da7c63c28b1ba438efc55
@@ -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@v2
34
24
  with:
@@ -40,3 +30,14 @@ jobs:
40
30
  bundler-cache: true
41
31
 
42
32
  - run: bundle exec rake
33
+
34
+ tests-passed:
35
+ needs: rake
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: peter-evans/repository-dispatch@v1
39
+ with:
40
+ token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
41
+ repository: ${{ github.repository }}
42
+ event-type: tests-passed
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/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
@@ -2,6 +2,5 @@ require "asciidoctor/ogc/converter"
2
2
 
3
3
  module Asciidoctor
4
4
  module Ogc
5
-
6
5
  end
7
6
  end
@@ -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">
@@ -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"/>
@@ -79,20 +79,18 @@
79
79
  </zeroOrMore>
80
80
  </element>
81
81
  </define>
82
- <define name="docsubtype">
83
- <element name="docsubtype">
84
- <choice>
85
- <value>conceptual-model</value>
86
- <value>conceptual-model-and-encoding</value>
87
- <value>conceptual-model-and-implementation</value>
88
- <value>encoding</value>
89
- <value>extension</value>
90
- <value>implementation</value>
91
- <value>profile</value>
92
- <value>profile-with-extension</value>
93
- <value>general</value>
94
- </choice>
95
- </element>
82
+ <define name="DocumentSubtype">
83
+ <choice>
84
+ <value>conceptual-model</value>
85
+ <value>conceptual-model-and-encoding</value>
86
+ <value>conceptual-model-and-implementation</value>
87
+ <value>encoding</value>
88
+ <value>extension</value>
89
+ <value>implementation</value>
90
+ <value>profile</value>
91
+ <value>profile-with-extension</value>
92
+ <value>general</value>
93
+ </choice>
96
94
  </define>
97
95
  <define name="submitters">
98
96
  <element name="submitters">
data/lib/isodoc/ogc.rb CHANGED
@@ -7,6 +7,5 @@ require "isodoc/ogc/xref"
7
7
 
8
8
  module IsoDoc
9
9
  module Ogc
10
-
11
10
  end
12
11
  end
@@ -19,7 +19,7 @@ module IsoDoc
19
19
  "user-guide" => "UG",
20
20
  "white-paper" => "WP",
21
21
  "other" => "other",
22
- }
22
+ }.freeze
23
23
 
24
24
  DOCSUBTYPE_ABBR = {
25
25
  "implementation" => "IMP",
@@ -31,7 +31,7 @@ module IsoDoc
31
31
  "profile" => "PF",
32
32
  "profile-with-extension" => "PFE",
33
33
  "general" => "GE",
34
- }
34
+ }.freeze
35
35
 
36
36
  class Metadata < IsoDoc::Metadata
37
37
  def initialize(lang, script, i18n)
@@ -53,16 +53,20 @@ module IsoDoc
53
53
  def author(isoxml, _out)
54
54
  tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee"))
55
55
  set(:tc, tc.text) if tc
56
- authors = isoxml.xpath(ns("//bibdata/contributor[role/@type = 'author']/person"))
56
+ authors = isoxml.xpath(ns("//bibdata/contributor"\
57
+ "[role/@type = 'author']/person"))
57
58
  set(:authors, extract_person_names(authors))
58
- editors = isoxml.xpath(ns("//bibdata/contributor[role/@type = 'editor']/person"))
59
+ editors = isoxml.xpath(ns("//bibdata/contributor"\
60
+ "[role/@type = 'editor']/person"))
59
61
  set(:editors, extract_person_names(editors))
60
62
  agency(isoxml)
61
63
  end
62
64
 
63
65
  def docid(isoxml, _out)
64
- set(:docnumber, isoxml&.at(ns("//bibdata/docidentifier[@type = 'ogc-internal']"))&.text)
65
- set(:externalid, isoxml&.at(ns("//bibdata/docidentifier[@type = 'ogc-external']"))&.text)
66
+ set(:docnumber, isoxml&.at(ns("//bibdata/docidentifier"\
67
+ "[@type = 'ogc-internal']"))&.text)
68
+ set(:externalid, isoxml&.at(ns("//bibdata/docidentifier"\
69
+ "[@type = 'ogc-external']"))&.text)
66
70
  end
67
71
 
68
72
  def unpublished(status)
@@ -78,11 +82,12 @@ module IsoDoc
78
82
 
79
83
  def url(xml, _out)
80
84
  super
81
- a = xml.at(ns("//bibdata/uri[@type = 'previous']")) and set(:previousuri, a.text)
85
+ a = xml.at(ns("//bibdata/uri[@type = 'previous']")) and
86
+ set(:previousuri, a.text)
82
87
  end
83
88
 
84
- def type_capitalise(b)
85
- b.split(/[- ]/).map do |w|
89
+ def type_capitalise(type)
90
+ type.split(/[- ]/).map do |w|
86
91
  %w(SWG).include?(w) ? w : w.capitalize
87
92
  end.join(" ")
88
93
  end
@@ -98,12 +103,12 @@ module IsoDoc
98
103
  end
99
104
  end
100
105
 
101
- def doctype_abbr(b)
102
- IsoDoc::Ogc::DOCTYPE_ABBR[b] || b
106
+ def doctype_abbr(type)
107
+ IsoDoc::Ogc::DOCTYPE_ABBR[type] || type
103
108
  end
104
109
 
105
- def docsubtype_abbr(st, t)
106
- IsoDoc::Ogc::DOCSUBTYPE_ABBR[st] || st
110
+ def docsubtype_abbr(subtype, _type)
111
+ IsoDoc::Ogc::DOCSUBTYPE_ABBR[subtype] || st
107
112
  end
108
113
 
109
114
  def status_print(status)