relaton-omg 1.18.1 → 1.19.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 +4 -4
- data/README.adoc +9 -16
- data/grammars/basicdoc.rng +3 -0
- data/lib/relaton_omg/omg_bibliography.rb +3 -3
- data/lib/relaton_omg/util.rb +1 -4
- data/lib/relaton_omg/version.rb +1 -1
- data/lib/relaton_omg.rb +0 -1
- data/relaton_omg.gemspec +2 -1
- metadata +18 -5
- data/lib/relaton_omg/config.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 399c47b05dd8f22085cdcd9427ddb625390e107b937a260f98e744453dcdc24f
|
4
|
+
data.tar.gz: 4171e703a7376a19beea4d733af030ea36afb997bd92b22fec657eaef1bda857
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 341972ebf1cf824c3d1590e230d5ba118663219226a1ebf42f32c4dc13f19b8f231d2ea423ae2198f298dd493d6fe37f3f702db09c674b8561e53689ff249e48
|
7
|
+
data.tar.gz: 6798497edd40b952dc52d8bd63760841582d75dedc0de7f6db98aba9a976db6457b277ad2e94f7cec17c2b6e854c1b012838054d085d0dfe103271afa21ef934
|
data/README.adoc
CHANGED
@@ -31,20 +31,6 @@ Or install it yourself as:
|
|
31
31
|
|
32
32
|
== Usage
|
33
33
|
|
34
|
-
=== Configuration
|
35
|
-
|
36
|
-
Configuration is optional. The available option is `logger` which is a `Logger` instance. By default, the logger is `Logger.new($stderr)` with `Logger::WARN` level. To change the logger level, use `RelatonOmg.configure` block.
|
37
|
-
|
38
|
-
[source,ruby]
|
39
|
-
----
|
40
|
-
require 'relaton_omg'
|
41
|
-
=> true
|
42
|
-
|
43
|
-
RelatonOmg.configure do |config|
|
44
|
-
config.logger.level = Logger::DEBUG
|
45
|
-
end
|
46
|
-
----
|
47
|
-
|
48
34
|
=== Search document
|
49
35
|
|
50
36
|
Reference format is `OMG + {ACRONYM} + {VERSION}`
|
@@ -54,6 +40,9 @@ Reference format is `OMG + {ACRONYM} + {VERSION}`
|
|
54
40
|
|
55
41
|
[source,ruby]
|
56
42
|
----
|
43
|
+
require 'relaton_omg'
|
44
|
+
=> true
|
45
|
+
|
57
46
|
item = RelatonOmg::OmgBibliography.get 'OMG AMI4CCM 1.0'
|
58
47
|
[relaton-omg] (OMG AMI4CCM 1.0) Fetching from www.omg.org ...
|
59
48
|
[relaton-omg] (OMG AMI4CCM 1.0) Found: `AMI4CCM 1.0`
|
@@ -72,7 +61,7 @@ RelatonOmg::OmgBibliography.get 'OMG 1111'
|
|
72
61
|
[source,ruby]
|
73
62
|
----
|
74
63
|
item.to_xml
|
75
|
-
=> "<bibitem id="AMI4CCM1.0" schema-version="v1.2.
|
64
|
+
=> "<bibitem id="AMI4CCM1.0" schema-version="v1.2.9">
|
76
65
|
<fetched>2022-12-05</fetched>
|
77
66
|
<title type="main" format="text/plain" language="en" script="Latn">Asynchronous Method Invocation for CCM</title>
|
78
67
|
<uri type="src">https://www.omg.org/spec/AMI4CCM/1.0/About-AMI4CCM</uri>
|
@@ -106,7 +95,7 @@ item = RelatonOmg::OmgBibliographicItem.from_xml 'spec/fixtures/omg_ami4ccm_1_0.
|
|
106
95
|
[source,ruby]
|
107
96
|
----
|
108
97
|
hash = YAML.load_file 'spec/fixtures/omg_ami4ccm_1_0.yaml'
|
109
|
-
=> {"schema-version"=>"v1.2.
|
98
|
+
=> {"schema-version"=>"v1.2.9",
|
110
99
|
"id"=>"AMI4CCM1.0",
|
111
100
|
...
|
112
101
|
|
@@ -123,6 +112,10 @@ item = RelatonOmg::OmgBibliographicItem.from_yaml 'spec/fixtures/omg_ami4ccm_1_0
|
|
123
112
|
...
|
124
113
|
----
|
125
114
|
|
115
|
+
=== Logging
|
116
|
+
|
117
|
+
RelatonOmg uses the relaton-logger gem for logging. By default, it logs to STDOUT. To change the log levels and add other loggers, read the https://github.com/relaton/relaton-logger#usage[relaton-logger] documentation.
|
118
|
+
|
126
119
|
== Contributing
|
127
120
|
|
128
121
|
Bug reports and pull requests are welcome on GitHub at https://github.com/relaton/relaton-ietf.
|
data/grammars/basicdoc.rng
CHANGED
@@ -15,12 +15,12 @@ module RelatonOmg
|
|
15
15
|
# @param opts [Hash] options
|
16
16
|
# @return [RelatonOmg::OmgBibliographicItem]
|
17
17
|
def get(code, _year = nil, _opts = {})
|
18
|
-
Util.
|
18
|
+
Util.info "Fetching from www.omg.org ...", key: code
|
19
19
|
result = search code
|
20
20
|
if result
|
21
|
-
Util.
|
21
|
+
Util.info "Found: `#{result.docidentifier.first.id}`", key: code
|
22
22
|
else
|
23
|
-
Util.
|
23
|
+
Util.info "Not found.", key: code
|
24
24
|
end
|
25
25
|
result
|
26
26
|
end
|
data/lib/relaton_omg/util.rb
CHANGED
data/lib/relaton_omg/version.rb
CHANGED
data/lib/relaton_omg.rb
CHANGED
data/relaton_omg.gemspec
CHANGED
@@ -26,5 +26,6 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
28
|
|
29
|
-
spec.add_dependency "
|
29
|
+
spec.add_dependency "base64"
|
30
|
+
spec.add_dependency "relaton-bib", "~> 1.19.0"
|
30
31
|
end
|
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-omg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.19.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: 2024-
|
11
|
+
date: 2024-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: base64
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: relaton-bib
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
33
|
+
version: 1.19.0
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
40
|
+
version: 1.19.0
|
27
41
|
description: 'RelatonOmg: retrieve OMG Standards for bibliographic using the IsoBibliographicItem
|
28
42
|
model'
|
29
43
|
email:
|
@@ -51,7 +65,6 @@ files:
|
|
51
65
|
- grammars/relaton-omg-compile.rng
|
52
66
|
- grammars/relaton-omg.rng
|
53
67
|
- lib/relaton_omg.rb
|
54
|
-
- lib/relaton_omg/config.rb
|
55
68
|
- lib/relaton_omg/hash_converter.rb
|
56
69
|
- lib/relaton_omg/omg_bibliographic_item.rb
|
57
70
|
- lib/relaton_omg/omg_bibliography.rb
|