relaton-omg 1.7.1 → 1.9.0
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 +1 -11
- data/.rubocop.yml +1 -1
- data/README.adoc +5 -0
- data/grammars/biblio.rng +5 -6
- data/lib/relaton_omg/scrapper.rb +4 -4
- data/lib/relaton_omg/version.rb +1 -1
- data/relaton_omg.gemspec +2 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b95f791d4851dab63d7b6fc07b66e77103829244efb6446ff13c1a2352f9ed47
|
4
|
+
data.tar.gz: 85f1f3203efe994bab78befe1b17abafaf32987d5d26cf200d3ed232e4c2c8d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c12d783cd2b8811b4070984c648e91ffbf91db58ea0a349c3aa0567670a9d1adfb3ab9ec2f1284c61db7f87abc20369be1492138b952d2ce643034bfaaacf45c
|
7
|
+
data.tar.gz: 1fbf5161688d72b4ef47cfd4ba96d691ae98f2705fd85f086842de011bd81228eca558ade9e6cfb32be1684573de85670ea67a3a08a5d0548c3c852734fe0317
|
data/.github/workflows/rake.yml
CHANGED
@@ -16,19 +16,9 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '
|
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:
|
data/.rubocop.yml
CHANGED
data/README.adoc
CHANGED
@@ -33,6 +33,11 @@ Or install it yourself as:
|
|
33
33
|
|
34
34
|
=== Search document
|
35
35
|
|
36
|
+
Reference format is `OMG + {ACRONYM} + {VERSION}`
|
37
|
+
|
38
|
+
- `ACRONYM` is an acronym from the list of specs https://www.omg.org/spec/#all
|
39
|
+
- `VERSION` (optional) if omitted then the lastes version is fetched
|
40
|
+
|
36
41
|
[source,ruby]
|
37
42
|
----
|
38
43
|
require 'relaton_omg'
|
data/grammars/biblio.rng
CHANGED
@@ -124,7 +124,7 @@
|
|
124
124
|
<value>application/tei+xml</value>
|
125
125
|
<value>text/x-asciidoc</value>
|
126
126
|
<value>text/markdown</value>
|
127
|
-
<value>application/x-
|
127
|
+
<value>application/x-metanorma+xml</value>
|
128
128
|
<text/>
|
129
129
|
</choice>
|
130
130
|
</attribute>
|
@@ -452,6 +452,7 @@
|
|
452
452
|
<attribute name="type">
|
453
453
|
<choice>
|
454
454
|
<value>isni</value>
|
455
|
+
<value>orcid</value>
|
455
456
|
<value>uri</value>
|
456
457
|
</choice>
|
457
458
|
</attribute>
|
@@ -461,10 +462,7 @@
|
|
461
462
|
<define name="org-identifier">
|
462
463
|
<element name="identifier">
|
463
464
|
<attribute name="type">
|
464
|
-
<
|
465
|
-
<value>orcid</value>
|
466
|
-
<value>uri</value>
|
467
|
-
</choice>
|
465
|
+
<data type="string" datatypeLibrary=""/>
|
468
466
|
</attribute>
|
469
467
|
<text/>
|
470
468
|
</element>
|
@@ -789,6 +787,7 @@
|
|
789
787
|
<value>adapted</value>
|
790
788
|
<value>vote-started</value>
|
791
789
|
<value>vote-ended</value>
|
790
|
+
<value>announced</value>
|
792
791
|
</choice>
|
793
792
|
</define>
|
794
793
|
<define name="bdate">
|
@@ -1106,7 +1105,7 @@
|
|
1106
1105
|
<value>complementOf</value>
|
1107
1106
|
<value>obsoletes</value>
|
1108
1107
|
<value>obsoletedBy</value>
|
1109
|
-
<value>
|
1108
|
+
<value>cites</value>
|
1110
1109
|
<value>isCitedIn</value>
|
1111
1110
|
</choice>
|
1112
1111
|
</define>
|
data/lib/relaton_omg/scrapper.rb
CHANGED
@@ -13,8 +13,8 @@ module RelatonOmg
|
|
13
13
|
url += "/" + version if version
|
14
14
|
doc = Nokogiri::HTML OpenURI.open_uri(URI(url))
|
15
15
|
OmgBibliographicItem.new **item(doc, acronym)
|
16
|
-
rescue OpenURI::HTTPError => e
|
17
|
-
if e.io.status[0] == "404"
|
16
|
+
rescue OpenURI::HTTPError, URI::InvalidURIError => e
|
17
|
+
if e.is_a?(URI::InvalidURIError) || e.io.status[0] == "404"
|
18
18
|
warn %{[relaton-omg] no document found for "#{ref}" reference.}
|
19
19
|
return
|
20
20
|
end
|
@@ -60,7 +60,7 @@ module RelatonOmg
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def fetch_abstract(doc)
|
63
|
-
content = doc.at('//section[@id="document-metadata"]/p').text
|
63
|
+
content = doc.at('//section[@id="document-metadata"]/div/div/p').text
|
64
64
|
[{ content: content, language: "en", script: "Latn" }]
|
65
65
|
end
|
66
66
|
|
@@ -69,7 +69,7 @@ module RelatonOmg
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def version(doc)
|
72
|
-
doc.at('//dt[.="Version:"]/following-sibling::dd/p/
|
72
|
+
doc.at('//dt[.="Version:"]/following-sibling::dd/p/span').text
|
73
73
|
end
|
74
74
|
|
75
75
|
def fetch_date(doc)
|
data/lib/relaton_omg/version.rb
CHANGED
data/relaton_omg.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
"using the IsoBibliographicItem model"
|
13
13
|
spec.homepage = "https://github.com/relaton/relaton-ogn"
|
14
14
|
spec.license = "BSD-2-Clause"
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/relaton/relaton-ogn"
|
@@ -27,14 +27,12 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
|
29
29
|
spec.add_development_dependency "byebug"
|
30
|
-
# spec.add_development_dependency "debase"
|
31
30
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
32
31
|
spec.add_development_dependency "pry-byebug"
|
33
|
-
# spec.add_development_dependency "ruby-debug-ide"
|
34
32
|
spec.add_development_dependency "ruby-jing"
|
35
33
|
spec.add_development_dependency "simplecov"
|
36
34
|
spec.add_development_dependency "vcr"
|
37
35
|
spec.add_development_dependency "webmock"
|
38
36
|
|
39
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
37
|
+
spec.add_dependency "relaton-bib", "~> 1.9.0"
|
40
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-omg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.9.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
124
|
+
version: 1.9.0
|
125
125
|
description: 'RelatonOmg: retrieve OMG Standards for bibliographic using the IsoBibliographicItem
|
126
126
|
model'
|
127
127
|
email:
|
@@ -166,14 +166,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
166
|
requirements:
|
167
167
|
- - ">="
|
168
168
|
- !ruby/object:Gem::Version
|
169
|
-
version: 2.
|
169
|
+
version: 2.5.0
|
170
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
172
|
- - ">="
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
|
-
rubygems_version: 3.
|
176
|
+
rubygems_version: 3.2.3
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: 'RelatonOmg: retrieve OMG Standards for bibliographic using the IsoBibliographicItem
|