relaton-ogc 1.6.pre1 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +46 -0
- data/README.adoc +1 -5
- data/grammars/isodoc.rng +14 -43
- data/lib/relaton_ogc/editorial_group.rb +1 -1
- data/lib/relaton_ogc/ogc_bibliographic_item.rb +7 -0
- data/lib/relaton_ogc/processor.rb +1 -2
- data/lib/relaton_ogc/version.rb +1 -1
- data/lib/relaton_ogc/xml_parser.rb +1 -1
- data/relaton_ogc.gemspec +4 -4
- metadata +9 -39
- data/.github/workflows/macos.yml +0 -34
- data/.github/workflows/ubuntu.yml +0 -33
- data/.github/workflows/windows.yml +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b9c288eb729d21bf9c79f5bbd38b6ae664afa9174ac0e618b91ef479b5635f7
|
4
|
+
data.tar.gz: ac5ff577c6f853617080b99be96f944cc4eb596e9febc26419aa3b78758a6aea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca65ff29361706b10972013e126c33da7f9cd6485aa01c8794fe3137452f3ab6bc7d9360868f9fed4e2406edcf992062ef2b564e4aab22fd9aa217cfc4ccd24b
|
7
|
+
data.tar.gz: de79126c5ea8618b70a7cfa73c759be6667f3b0cee9f161a35b1123fdd94e8ff2fea528a37c9829720a94d65fcbe15282c61256c5c929ebd05d6549515c67e3c
|
@@ -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/README.adoc
CHANGED
@@ -108,11 +108,7 @@ hash = YAML.load_file 'spec/fixtures/ogc_bib_item.yml'
|
|
108
108
|
=> {"id"=>"19-025r1",
|
109
109
|
...
|
110
110
|
|
111
|
-
|
112
|
-
=> {:id=>"19-025r1",
|
113
|
-
...
|
114
|
-
|
115
|
-
RelatonOgc::OgcBibliographicItem.new bib_hash
|
111
|
+
RelatonOgc::OgcBibliographicItem.from_hash hash
|
116
112
|
=> #<RelatonOgc::OgcBibliographicItem:0x007fc322ef8548
|
117
113
|
...
|
118
114
|
----
|
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">
|
@@ -141,6 +149,11 @@
|
|
141
149
|
<data type="boolean"/>
|
142
150
|
</attribute>
|
143
151
|
</optional>
|
152
|
+
<optional>
|
153
|
+
<attribute name="key">
|
154
|
+
<data type="boolean"/>
|
155
|
+
</attribute>
|
156
|
+
</optional>
|
144
157
|
<oneOrMore>
|
145
158
|
<ref name="dt"/>
|
146
159
|
<ref name="dd"/>
|
@@ -1164,49 +1177,7 @@
|
|
1164
1177
|
</define>
|
1165
1178
|
<define name="annex">
|
1166
1179
|
<element name="annex">
|
1167
|
-
<
|
1168
|
-
<attribute name="id">
|
1169
|
-
<data type="ID"/>
|
1170
|
-
</attribute>
|
1171
|
-
</optional>
|
1172
|
-
<optional>
|
1173
|
-
<attribute name="language"/>
|
1174
|
-
</optional>
|
1175
|
-
<optional>
|
1176
|
-
<attribute name="script"/>
|
1177
|
-
</optional>
|
1178
|
-
<optional>
|
1179
|
-
<attribute name="inline-header">
|
1180
|
-
<data type="boolean"/>
|
1181
|
-
</attribute>
|
1182
|
-
</optional>
|
1183
|
-
<attribute name="obligation">
|
1184
|
-
<choice>
|
1185
|
-
<value>normative</value>
|
1186
|
-
<value>informative</value>
|
1187
|
-
</choice>
|
1188
|
-
</attribute>
|
1189
|
-
<optional>
|
1190
|
-
<ref name="section-title"/>
|
1191
|
-
</optional>
|
1192
|
-
<group>
|
1193
|
-
<group>
|
1194
|
-
<zeroOrMore>
|
1195
|
-
<ref name="BasicBlock"/>
|
1196
|
-
</zeroOrMore>
|
1197
|
-
<zeroOrMore>
|
1198
|
-
<ref name="note"/>
|
1199
|
-
</zeroOrMore>
|
1200
|
-
</group>
|
1201
|
-
<zeroOrMore>
|
1202
|
-
<choice>
|
1203
|
-
<ref name="annex-subsection"/>
|
1204
|
-
<ref name="terms"/>
|
1205
|
-
<ref name="definitions"/>
|
1206
|
-
<ref name="references"/>
|
1207
|
-
</choice>
|
1208
|
-
</zeroOrMore>
|
1209
|
-
</group>
|
1180
|
+
<ref name="Annex-Section"/>
|
1210
1181
|
</element>
|
1211
1182
|
</define>
|
1212
1183
|
<define name="terms">
|
@@ -29,6 +29,13 @@ module RelatonOgc
|
|
29
29
|
super
|
30
30
|
end
|
31
31
|
|
32
|
+
# @param hash [Hash]
|
33
|
+
# @return [RelatonOgc::OgcBibliographicItem]
|
34
|
+
def self.from_hash(hash)
|
35
|
+
item_hash = ::RelatonOgc::HashConverter.hash_to_bib(hash)
|
36
|
+
new **item_hash
|
37
|
+
end
|
38
|
+
|
32
39
|
# @return [Hash]
|
33
40
|
def to_hash
|
34
41
|
hash = super
|
@@ -26,8 +26,7 @@ module RelatonOgc
|
|
26
26
|
# @param hash [Hash]
|
27
27
|
# @return [RelatonOgc::OgcBibliographicItem]
|
28
28
|
def hash_to_bib(hash)
|
29
|
-
|
30
|
-
::RelatonOgc::OgcBibliographicItem.new item_hash
|
29
|
+
::RelatonOgc::OgcBibliographicItem.from_hash hash
|
31
30
|
end
|
32
31
|
|
33
32
|
# Returns hash of XML grammar
|
data/lib/relaton_ogc/version.rb
CHANGED
@@ -9,7 +9,7 @@ module RelatonOgc
|
|
9
9
|
# @param item_hash [Hash]
|
10
10
|
# @return [RelatonOgc::OgcBibliographicItem]
|
11
11
|
def bib_item(item_hash)
|
12
|
-
OgcBibliographicItem.new item_hash
|
12
|
+
OgcBibliographicItem.new **item_hash
|
13
13
|
end
|
14
14
|
|
15
15
|
# Override RelatonIsoBib::XMLParser.item_data method.
|
data/relaton_ogc.gemspec
CHANGED
@@ -24,17 +24,17 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
|
-
spec.add_development_dependency "debase"
|
27
|
+
# spec.add_development_dependency "debase"
|
28
28
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
29
29
|
spec.add_development_dependency "pry-byebug"
|
30
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
32
|
-
spec.add_development_dependency "ruby-debug-ide"
|
32
|
+
# spec.add_development_dependency "ruby-debug-ide"
|
33
33
|
spec.add_development_dependency "ruby-jing"
|
34
34
|
spec.add_development_dependency "simplecov"
|
35
35
|
spec.add_development_dependency "vcr"
|
36
36
|
spec.add_development_dependency "webmock"
|
37
37
|
|
38
|
-
spec.add_dependency "faraday", "~> 1.
|
39
|
-
spec.add_dependency "relaton-iso-bib", "~> 1.
|
38
|
+
spec.add_dependency "faraday", "~> 1.1"
|
39
|
+
spec.add_dependency "relaton-iso-bib", "~> 1.7.0"
|
40
40
|
end
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-20 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
|
@@ -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,28 +128,28 @@ dependencies:
|
|
156
128
|
requirements:
|
157
129
|
- - "~>"
|
158
130
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
131
|
+
version: '1.1'
|
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.
|
138
|
+
version: '1.1'
|
167
139
|
- !ruby/object:Gem::Dependency
|
168
140
|
name: relaton-iso-bib
|
169
141
|
requirement: !ruby/object:Gem::Requirement
|
170
142
|
requirements:
|
171
143
|
- - "~>"
|
172
144
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
145
|
+
version: 1.7.0
|
174
146
|
type: :runtime
|
175
147
|
prerelease: false
|
176
148
|
version_requirements: !ruby/object:Gem::Requirement
|
177
149
|
requirements:
|
178
150
|
- - "~>"
|
179
151
|
- !ruby/object:Gem::Version
|
180
|
-
version: 1.
|
152
|
+
version: 1.7.0
|
181
153
|
description: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
|
182
154
|
model'
|
183
155
|
email:
|
@@ -186,9 +158,7 @@ executables: []
|
|
186
158
|
extensions: []
|
187
159
|
extra_rdoc_files: []
|
188
160
|
files:
|
189
|
-
- ".github/workflows/
|
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"
|
@@ -230,9 +200,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
230
200
|
version: '0'
|
231
201
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
232
202
|
requirements:
|
233
|
-
- - "
|
203
|
+
- - ">="
|
234
204
|
- !ruby/object:Gem::Version
|
235
|
-
version:
|
205
|
+
version: '0'
|
236
206
|
requirements: []
|
237
207
|
rubygems_version: 3.0.6
|
238
208
|
signing_key:
|
data/.github/workflows/macos.yml
DELETED
@@ -1,34 +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
|
-
ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
|
30
|
-
ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
|
31
|
-
bundle install --jobs 4 --retry 3
|
32
|
-
- name: Run specs
|
33
|
-
run: |
|
34
|
-
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
|