relaton-un 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: 8d495b7ea6f618503e2a3604882e9cc9c9158bc587c7df454b7bce435caad14d
4
- data.tar.gz: 031f58c3ba5951549fdf4c1ab55886c394ec9e2dc0eb3f5b764caa29c79001bc
3
+ metadata.gz: f99f9db4f756718edfc98426b7a0f1d822a7eee4765e780ae89db2830f3b4bbb
4
+ data.tar.gz: b8ad38dd382da686c2d9296f5aeb44fea61de732669aecb77bc97463198e3aee
5
5
  SHA512:
6
- metadata.gz: 6e2ce1add60af60192d1c4befd70049149f7a4608f02dccea7b1f544e82702a03f2f468b1194d43125cc86142c3ed895a2e39fef7d03252caafff4b962df6b79
7
- data.tar.gz: 5e2174a5d3fe3dcc08e87728dd30fadf763694ea15adb6117dc4fa2cd157ea1fc3fd8af23e5b65291dfe87f4082511a5c14eefe83eb6dc1cac690f58ae2173a7
6
+ metadata.gz: 6092fab8e89d7907a76ef4b46bc2175bf616620537d2f6794da44fc204bae839c972e73bda2cbb8fe6660795c00ac88dde9124608209f41aa48d78864addca9c
7
+ data.tar.gz: ba94e2fdbc8e123632cfd9ea763aa82fa188015c20f432c89a83656c201d685b8cd60be821b8fea75f745032136d2c637cb2bbf86d44a7a95105f5be1b4ca4f5
@@ -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/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">
data/grammars/un.rng CHANGED
@@ -340,6 +340,13 @@
340
340
  </define>
341
341
  <define name="un-standard">
342
342
  <element name="un-standard">
343
+ <attribute name="version"/>
344
+ <attribute name="type">
345
+ <choice>
346
+ <value>semantic</value>
347
+ <value>presentation</value>
348
+ </choice>
349
+ </attribute>
343
350
  <ref name="bibdata"/>
344
351
  <optional>
345
352
  <ref name="boilerplate"/>
@@ -18,7 +18,7 @@ module RelatonUn
18
18
 
19
19
  # @param ret [Hash]
20
20
  def session_hash_to_bib(ret)
21
- ret[:session] = Session.new(ret[:session]) if ret[:session]
21
+ ret[:session] = Session.new(**ret[:session]) if ret[:session]
22
22
  end
23
23
 
24
24
  # @param ret [Hash]
@@ -109,7 +109,7 @@ module RelatonUn
109
109
 
110
110
  # @return [Array<RelatonBib::TypedUri>]
111
111
  def fetch_link
112
- hit[:link].map { |l| RelatonBib::TypedUri.new l }
112
+ hit[:link].map { |l| RelatonBib::TypedUri.new **l }
113
113
  end
114
114
 
115
115
  # @return [Array<String>]
@@ -1,3 +1,3 @@
1
1
  module RelatonUn
2
- VERSION = "1.5.pre".freeze
2
+ VERSION = "1.7.1".freeze
3
3
  end
@@ -6,7 +6,7 @@ module RelatonUn
6
6
  # @param item_hash [Hash]
7
7
  # @return [RelatonBib::BibliographicItem]
8
8
  def bib_item(item_hash)
9
- UnBibliographicItem.new item_hash
9
+ UnBibliographicItem.new **item_hash
10
10
  end
11
11
 
12
12
  # @param item [Nokogiri::XML::Element]
data/relaton_un.gemspec CHANGED
@@ -32,10 +32,10 @@ Gem::Specification.new do |spec|
32
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
33
  spec.require_paths = ["lib"]
34
34
 
35
- spec.add_development_dependency "debase"
35
+ # spec.add_development_dependency "debase"
36
36
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
37
37
  spec.add_development_dependency "rake", "~> 10.0"
38
- spec.add_development_dependency "ruby-debug-ide"
38
+ # spec.add_development_dependency "ruby-debug-ide"
39
39
  spec.add_development_dependency "ruby-jing"
40
40
  spec.add_development_dependency "simplecov"
41
41
  spec.add_development_dependency "vcr"
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
43
43
 
44
44
  spec.add_dependency "faraday"
45
45
  spec.add_dependency "http-cookie"
46
- spec.add_dependency "relaton-bib", "~> 1.5.pre"
46
+ spec.add_dependency "relaton-bib", "~> 1.7.0"
47
47
  spec.add_dependency "unf_ext", ">= 0.0.7.7"
48
48
  end
49
49
  # rubocop:enable Metrics/BlockLength
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-un
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: exe
10
10
  cert_chain: []
11
- date: 2020-10-07 00:00:00.000000000 Z
11
+ date: 2021-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: debase
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: equivalent-xml
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +38,6 @@ dependencies:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
40
  version: '10.0'
55
- - !ruby/object:Gem::Dependency
56
- name: ruby-debug-ide
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
41
  - !ruby/object:Gem::Dependency
70
42
  name: ruby-jing
71
43
  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
  - !ruby/object:Gem::Dependency
168
140
  name: unf_ext
169
141
  requirement: !ruby/object:Gem::Requirement
@@ -186,9 +158,7 @@ executables: []
186
158
  extensions: []
187
159
  extra_rdoc_files: []
188
160
  files:
189
- - ".github/workflows/macos.yml"
190
- - ".github/workflows/ubuntu.yml"
191
- - ".github/workflows/windows.yml"
161
+ - ".github/workflows/rake.yml"
192
162
  - ".gitignore"
193
163
  - ".rspec"
194
164
  - ".rubocop.yml"
@@ -234,9 +204,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
234
204
  version: 2.4.0
235
205
  required_rubygems_version: !ruby/object:Gem::Requirement
236
206
  requirements:
237
- - - ">"
207
+ - - ">="
238
208
  - !ruby/object:Gem::Version
239
- version: 1.3.1
209
+ version: '0'
240
210
  requirements: []
241
211
  rubygems_version: 3.0.6
242
212
  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,33 +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
- unset JAVA_TOOL_OPTIONS
33
- 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