relaton-iho 1.5.pre → 1.7.1

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: 91019ca7dda0ba25033d364e181586a7a116e8fbac770270cba721c96a2541da
4
- data.tar.gz: 364f59c8de9c03dea313fab24aca6535b68d05bc4e15803bff27ea59a3306e41
3
+ metadata.gz: ee5d54b17a125e06b71aeefcee593ee66b7c44d70677b9e54f7b56cd05f88009
4
+ data.tar.gz: 5e128ecc1b7ce4251aa05f59975de37468b32dcf8ac925cbee2595aa9b82186a
5
5
  SHA512:
6
- metadata.gz: 55157bfc84864465c81ba4287801512f759fe87814e65a84e70d654dfaffc975823e0a1ba9704784d0ae2230d73b613a141df3312b4d90385841de2ef1fff49c
7
- data.tar.gz: f2e11fd9f647ded0607c003c19d7b3aa586f33292715d6dc9f88d3bd7f44d379c9f7877c2d87bf8e111822275dcaba15de88c328faeb252c597e88d73d9f279b
6
+ metadata.gz: 6e1ddc54b6c238d9e0813a01480b2b6ad1cde81dd24f0bd0f8904831827a1fa1fb9807af0a408385c4d08ced8bd2649b5224b53eddc469363fcf11bcdd954ec6
7
+ data.tar.gz: 568d8f685c48d40c4663b784b277be234ebbd97d59e2c53e52aff514ccbabda2909e037b0d7893e9b291a602aa34a0278693bbdd92d1decad988d39916c31630
@@ -0,0 +1,46 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
9
+ pull_request:
10
+
11
+ jobs:
12
+ rake:
13
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
14
+ runs-on: ${{ matrix.os }}
15
+ continue-on-error: ${{ matrix.experimental }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: [ '2.7', '2.6', '2.5', '2.4' ]
20
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
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
+ steps:
33
+ - uses: actions/checkout@v2
34
+ with:
35
+ submodules: true
36
+
37
+ # https://github.com/ruby-debug/debase/issues/89#issuecomment-686827382
38
+ - if: matrix.os == 'macos-latest' && matrix.ruby == '2.5'
39
+ run: echo BUNDLE_BUILD__DEBASE="--with-cflags=\"-Wno-error=implicit-function-declaration\"" >> $GITHUB_ENV
40
+
41
+ - uses: ruby/setup-ruby@v1
42
+ with:
43
+ ruby-version: ${{ matrix.ruby }}
44
+ bundler-cache: true
45
+
46
+ - run: bundle exec rake
data/grammars/iho.rng CHANGED
@@ -148,6 +148,13 @@
148
148
  </define>
149
149
  <define name="iho-standard">
150
150
  <element name="iho-standard">
151
+ <attribute name="version"/>
152
+ <attribute name="type">
153
+ <choice>
154
+ <value>semantic</value>
155
+ <value>presentation</value>
156
+ </choice>
157
+ </attribute>
151
158
  <ref name="bibdata"/>
152
159
  <zeroOrMore>
153
160
  <ref name="termdocsource"/>
data/grammars/isodoc.rng CHANGED
@@ -24,6 +24,14 @@
24
24
  <start>
25
25
  <ref name="standard-document"/>
26
26
  </start>
27
+ <define name="doctype">
28
+ <element name="doctype">
29
+ <optional>
30
+ <attribute name="abbreviation"/>
31
+ </optional>
32
+ <ref name="DocumentType"/>
33
+ </element>
34
+ </define>
27
35
  <define name="hyperlink">
28
36
  <element name="link">
29
37
  <attribute name="target">
@@ -42,7 +50,6 @@
42
50
  </define>
43
51
  <define name="xref">
44
52
  <element name="xref">
45
- <!-- attribute target { xsd:IDREF }, -->
46
53
  <attribute name="target">
47
54
  <data type="string">
48
55
  <param name="pattern">\i\c*|\c+#\c+</param>
@@ -142,6 +149,11 @@
142
149
  <data type="boolean"/>
143
150
  </attribute>
144
151
  </optional>
152
+ <optional>
153
+ <attribute name="key">
154
+ <data type="boolean"/>
155
+ </attribute>
156
+ </optional>
145
157
  <oneOrMore>
146
158
  <ref name="dt"/>
147
159
  <ref name="dd"/>
@@ -864,6 +876,13 @@
864
876
  </define>
865
877
  <define name="standard-document">
866
878
  <element name="standard-document">
879
+ <attribute name="version"/>
880
+ <attribute name="type">
881
+ <choice>
882
+ <value>semantic</value>
883
+ <value>presentation</value>
884
+ </choice>
885
+ </attribute>
867
886
  <ref name="bibdata"/>
868
887
  <optional>
869
888
  <ref name="boilerplate"/>
@@ -1158,49 +1177,7 @@
1158
1177
  </define>
1159
1178
  <define name="annex">
1160
1179
  <element name="annex">
1161
- <optional>
1162
- <attribute name="id">
1163
- <data type="ID"/>
1164
- </attribute>
1165
- </optional>
1166
- <optional>
1167
- <attribute name="language"/>
1168
- </optional>
1169
- <optional>
1170
- <attribute name="script"/>
1171
- </optional>
1172
- <optional>
1173
- <attribute name="inline-header">
1174
- <data type="boolean"/>
1175
- </attribute>
1176
- </optional>
1177
- <attribute name="obligation">
1178
- <choice>
1179
- <value>normative</value>
1180
- <value>informative</value>
1181
- </choice>
1182
- </attribute>
1183
- <optional>
1184
- <ref name="section-title"/>
1185
- </optional>
1186
- <group>
1187
- <group>
1188
- <zeroOrMore>
1189
- <ref name="BasicBlock"/>
1190
- </zeroOrMore>
1191
- <zeroOrMore>
1192
- <ref name="note"/>
1193
- </zeroOrMore>
1194
- </group>
1195
- <zeroOrMore>
1196
- <choice>
1197
- <ref name="annex-subsection"/>
1198
- <ref name="terms"/>
1199
- <ref name="definitions"/>
1200
- <ref name="references"/>
1201
- </choice>
1202
- </zeroOrMore>
1203
- </group>
1180
+ <ref name="Annex-Section"/>
1204
1181
  </element>
1205
1182
  </define>
1206
1183
  <define name="terms">
@@ -23,7 +23,7 @@ module RelatonIho
23
23
 
24
24
  # @param ret [Hash]
25
25
  def commentperiod_hash_to_bib(ret)
26
- ret[:commentperiod] &&= CommentPeriond.new(ret[:commentperiod])
26
+ ret[:commentperiod] &&= CommentPeriond.new(**ret[:commentperiod])
27
27
  end
28
28
 
29
29
  # @param ret [Hash]
@@ -16,7 +16,7 @@ module RelatonIho
16
16
  return unless resp.code == "200"
17
17
 
18
18
  hash = HashConverter.hash_to_bib YAML.safe_load(resp.body, [Date])
19
- item = IhoBibliographicItem.new hash
19
+ item = IhoBibliographicItem.new **hash
20
20
  warn "[relaton-iho] (\"#{text}\") found #{item.docidentifier.first.id}"
21
21
  item
22
22
  rescue SocketError, Errno::EINVAL, Errno::ECONNRESET, EOFError,
@@ -1,3 +1,3 @@
1
1
  module RelatonIho
2
- VERSION = "1.5.pre".freeze
2
+ VERSION = "1.7.1".freeze
3
3
  end
@@ -18,10 +18,10 @@ module RelatonIho
18
18
  # @param item_hash [Hash]
19
19
  # @return [RelatonIho::IhoBibliographicItem]
20
20
  def bib_item(item_hash)
21
- IhoBibliographicItem.new item_hash
21
+ IhoBibliographicItem.new **item_hash
22
22
  end
23
23
 
24
- # @param ext [Nokogiri::XML::Element]
24
+ # @param ext [Nokogiri::XML::Element, nil]
25
25
  # @return [RelatonIho::EditorialGroupCollection, nil]
26
26
  def fetch_editorialgroup(ext)
27
27
  return unless ext
@@ -35,7 +35,7 @@ module RelatonIho
35
35
  EditorialGroupCollection.new egs if egs.any?
36
36
  end
37
37
 
38
- # @param ext [Nokogiri::XML::Element. nil]
38
+ # @param ihgrp [Nokogiri::XML::Element, nil]
39
39
  # @return [RelatonIho::Committee, RelatonIho::Commission,
40
40
  # RelatonIho::Workgroup, nil]
41
41
  def iho_group(ihgrp)
data/relaton_iho.gemspec CHANGED
@@ -22,15 +22,15 @@ Gem::Specification.new do |s|
22
22
  s.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
23
23
 
24
24
  s.add_development_dependency "byebug"
25
- s.add_development_dependency "debase"
25
+ # s.add_development_dependency "debase"
26
26
  s.add_development_dependency "equivalent-xml", "~> 0.6"
27
27
  s.add_development_dependency "rake", "~> 10.0"
28
28
  s.add_development_dependency "rspec", "~> 3.0"
29
- s.add_development_dependency "ruby-debug-ide"
29
+ # s.add_development_dependency "ruby-debug-ide"
30
30
  s.add_development_dependency "ruby-jing"
31
31
  s.add_development_dependency "simplecov"
32
32
  s.add_development_dependency "vcr"
33
33
  s.add_development_dependency "webmock"
34
34
 
35
- s.add_dependency "relaton-bib", "~> 1.5.pre"
35
+ s.add_dependency "relaton-bib", "~> 1.7.0"
36
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.pre
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-07 00:00:00.000000000 Z
11
+ date: 2021-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: debase
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: equivalent-xml
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +66,6 @@ dependencies:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
68
  version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: ruby-debug-ide
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
69
  - !ruby/object:Gem::Dependency
98
70
  name: ruby-jing
99
71
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +128,14 @@ dependencies:
156
128
  requirements:
157
129
  - - "~>"
158
130
  - !ruby/object:Gem::Version
159
- version: 1.5.pre
131
+ version: 1.7.0
160
132
  type: :runtime
161
133
  prerelease: false
162
134
  version_requirements: !ruby/object:Gem::Requirement
163
135
  requirements:
164
136
  - - "~>"
165
137
  - !ruby/object:Gem::Version
166
- version: 1.5.pre
138
+ version: 1.7.0
167
139
  description: 'RelatonIho: retrieve IHO Standards for bibliographic using the BibliographicItem
168
140
  model'
169
141
  email:
@@ -172,9 +144,7 @@ executables: []
172
144
  extensions: []
173
145
  extra_rdoc_files: []
174
146
  files:
175
- - ".github/workflows/macos.yml"
176
- - ".github/workflows/ubuntu.yml"
177
- - ".github/workflows/windows.yml"
147
+ - ".github/workflows/rake.yml"
178
148
  - ".gitignore"
179
149
  - ".rspec"
180
150
  - ".rubocop.yml"
@@ -214,9 +184,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
184
  version: 2.4.0
215
185
  required_rubygems_version: !ruby/object:Gem::Requirement
216
186
  requirements:
217
- - - ">"
187
+ - - ">="
218
188
  - !ruby/object:Gem::Version
219
- version: 1.3.1
189
+ version: '0'
220
190
  requirements: []
221
191
  rubygems_version: 3.0.6
222
192
  signing_key:
@@ -1,32 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: macos
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ '**' ]
10
-
11
- jobs:
12
- test-macos:
13
- name: Test on Ruby ${{ matrix.ruby }} macOS
14
- runs-on: macos-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- ruby: [ '2.6', '2.5', '2.4' ]
19
- steps:
20
- - uses: actions/checkout@master
21
- - name: Use Ruby
22
- uses: actions/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
- architecture: 'x64'
26
- - name: Update gems
27
- run: |
28
- sudo gem install bundler --force
29
- bundle install --jobs 4 --retry 3
30
- - name: Run specs
31
- run: |
32
- bundle exec rake
@@ -1,32 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: ubuntu
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ '**' ]
10
-
11
- jobs:
12
- test-linux:
13
- name: Test on Ruby ${{ matrix.ruby }} Ubuntu
14
- runs-on: ubuntu-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- ruby: [ '2.6', '2.5', '2.4' ]
19
- steps:
20
- - uses: actions/checkout@master
21
- - name: Use Ruby
22
- uses: actions/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
- architecture: 'x64'
26
- - name: Update gems
27
- run: |
28
- gem install bundler
29
- bundle install --jobs 4 --retry 3
30
- - name: Run specs
31
- run: |
32
- bundle exec rake
@@ -1,35 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: windows
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- branches: [ '**' ]
10
-
11
- jobs:
12
- test-windows:
13
- name: Test on Ruby ${{ matrix.ruby }} Windows
14
- runs-on: windows-latest
15
- strategy:
16
- fail-fast: false
17
- matrix:
18
- ruby: [ '2.6', '2.5', '2.4' ]
19
- steps:
20
- - uses: actions/checkout@master
21
- - name: Use Ruby
22
- uses: actions/setup-ruby@v1
23
- with:
24
- ruby-version: ${{ matrix.ruby }}
25
- architecture: 'x64'
26
- - name: Update gems
27
- shell: pwsh
28
- run: |
29
- gem install bundler
30
- bundle config --local path vendor/bundle
31
- bundle update
32
- bundle install --jobs 4 --retry 3
33
- - name: Run specs
34
- run: |
35
- bundle exec rake