relaton-omg 1.7.2 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c7e08c4add6f0f5150556bf793d3d961a331c80503b8f41a7726121b0fea786
4
- data.tar.gz: 4e066aec7d3c4080aeccf1ee1135149111aa278ee52f93f57c7d25ef4de18601
3
+ metadata.gz: 05ffe60d5d13aabbeaf36188da133a0bc1ef235aa47d79935cd787783cdcf3e5
4
+ data.tar.gz: 314cb574d9366c2e224d4701d6a84b601c8c07222c6fd8eb68b1050dc451daf7
5
5
  SHA512:
6
- metadata.gz: 411fd23fcc561c99b2dfecbc9856beb998ec93aeb1bb6b44f6126cd91badf2c327e12280e65c61cfb4ece06d26c26bef225fcdbc6fe27249ef07ac92d7648de3
7
- data.tar.gz: 7f6b7c64a593c1e736dd8593a2dae66a932ec248dba59bd8a6cc6a5c3de8bbaed49c2dea75601ba98722a7c90094944a25040ec300c28fb1ebc941ae3a77261b
6
+ metadata.gz: 5b333cb4e949774c26b29e39bbcfd78c1999f20113037180e5d57b70b1d6fc196a4ac40d84428246eae429e221551ebcaf6fd88a4bcd0ffa42941e4517387912
7
+ data.tar.gz: 220a8897c4d5720ee9324eb4bc1dd7f22d100f6d3d9236cd573e6086bce8fe1a36bad5c47fdf0a2dbf563045b595cb23301a91c2c0dee04735dac78dd4a78214
@@ -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:
data/.rubocop.yml CHANGED
@@ -2,9 +2,11 @@
2
2
  # https://github.com/riboseinc/oss-guides
3
3
  # All project-specific additions and overrides should be specified in this file.
4
4
 
5
+ require: rubocop-rails
6
+
5
7
  inherit_from:
6
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
9
  AllCops:
8
- TargetRubyVersion: 2.4
10
+ TargetRubyVersion: 2.5
9
11
  Rails:
10
12
  Enabled: false
data/README.adoc CHANGED
@@ -33,17 +33,22 @@ 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'
39
44
  => true
40
45
 
41
- item = RelatonOmg::OmgBibliography.search 'OMG AMI4CCM 1.0'
46
+ item = RelatonOmg::OmgBibliography.get 'OMG AMI4CCM 1.0'
42
47
  => #<RelatonOmg::OmgBibliographicItem:0x007fda17eab2f0
43
48
  ...
44
49
 
45
50
  # Return nil if document doesn't exist.
46
- RelatonOmg::OmgBibliography.search 'OMG 1111'
51
+ RelatonOmg::OmgBibliography.get 'OMG 1111'
47
52
  [relaton-omg] no document found for "OMG 1111" reference.
48
53
  => nil
49
54
  ----
@@ -76,7 +81,18 @@ item.to_xml
76
81
  </bibitem>"
77
82
  ----
78
83
 
79
- === Create bibliographic item form XML
84
+ === Typed links
85
+
86
+ OMG documents may have `src` and `pdf` link types.
87
+
88
+ [source,ruby]
89
+ ----
90
+ item.link
91
+ => [#<RelatonBib::TypedUri:0x00007fa897a72208 @content=#<Addressable::URI:0x80c URI:https://www.omg.org/spec/AMI4CCM/1.0/About-AMI4CCM/>, @type="src">,
92
+ #<RelatonBib::TypedUri:0x00007fa897a71600 @content=#<Addressable::URI:0x820 URI:https://www.omg.org/spec/AMI4CCM/1.0/PDF>, @type="pdf">]
93
+ ----
94
+
95
+ === Create bibliographic item from XML
80
96
 
81
97
  [source,ruby]
82
98
  ----
@@ -85,7 +101,7 @@ item = RelatonOmg::OmgBibliographicItem.from_xml 'spec/fixtures/omg_ami4ccm_1_0.
85
101
  ...
86
102
  ----
87
103
 
88
- === Create bibliographic item form Hash
104
+ === Create bibliographic item from Hash
89
105
  [source,ruby]
90
106
  ----
91
107
  hash = YAML.load_file 'spec/fixtures/omg_ami4ccm_1_0.yaml'
@@ -97,7 +113,7 @@ item = RelatonOmg::OmgBibliographicItem.from_hash hash
97
113
  ...
98
114
  ----
99
115
 
100
- === Create bibliographic item form YAML
116
+ === Create bibliographic item from YAML
101
117
  [source,ruby]
102
118
  ----
103
119
  item = RelatonOmg::OmgBibliographicItem.from_yaml 'spec/fixtures/omg_ami4ccm_1_0.yaml'
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-isodoc+xml</value>
127
+ <value>application/x-metanorma+xml</value>
128
128
  <text/>
129
129
  </choice>
130
130
  </attribute>
@@ -401,9 +401,9 @@
401
401
  <choice>
402
402
  <!-- iso191606 TODO -->
403
403
  <group>
404
- <oneOrMore>
404
+ <zeroOrMore>
405
405
  <ref name="street"/>
406
- </oneOrMore>
406
+ </zeroOrMore>
407
407
  <ref name="city"/>
408
408
  <optional>
409
409
  <ref name="state"/>
@@ -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
- <choice>
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>cited</value>
1108
+ <value>cites</value>
1110
1109
  <value>isCitedIn</value>
1111
1110
  </choice>
1112
1111
  </define>
@@ -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
@@ -1,3 +1,3 @@
1
1
  module RelatonOmg
2
- VERSION = "1.7.2".freeze
2
+ VERSION = "1.10.0".freeze
3
3
  end
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.4.0")
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.7.0"
37
+ spec.add_dependency "relaton-bib", "~> 1.10.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.7.2
4
+ version: 1.10.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-04-21 00:00:00.000000000 Z
11
+ date: 2022-01-30 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.7.0
117
+ version: 1.10.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.7.0
124
+ version: 1.10.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.4.0
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.0.6
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