relaton-omg 1.18.1 → 1.19.0

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: 3aee35ace5d33ef6a4058a8da3c76d59af173315a7ed32cb5967c0dfb9fd8296
4
- data.tar.gz: a1138366be2d18d01354d29db3a8fc0870c4c73cbbbe3ac67ffa3700ae85f9bc
3
+ metadata.gz: 399c47b05dd8f22085cdcd9427ddb625390e107b937a260f98e744453dcdc24f
4
+ data.tar.gz: 4171e703a7376a19beea4d733af030ea36afb997bd92b22fec657eaef1bda857
5
5
  SHA512:
6
- metadata.gz: b5194c85224823ac10a951ed66de9c558659751b967d909d53cbbee37ad60eb750f92b60c079fd1f125c324e23dbb651072a40eefd77018d50776331f7228b37
7
- data.tar.gz: 1b9ef36597bec1b10285d0e5f3583615aa774f0b901d98d3042477f6c9368c20e9cf60d4f47d00564f0effc99c9d4d5bd236ab0c62e5ee70531151da899cabc3
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.8">
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.8",
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.
@@ -244,6 +244,9 @@
244
244
  <data type="ID"/>
245
245
  </attribute>
246
246
  <attribute name="reviewer"/>
247
+ <optional>
248
+ <attribute name="type"/>
249
+ </optional>
247
250
  <optional>
248
251
  <attribute name="date">
249
252
  <data type="dateTime"/>
@@ -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.warn "(#{code}) Fetching from www.omg.org ..."
18
+ Util.info "Fetching from www.omg.org ...", key: code
19
19
  result = search code
20
20
  if result
21
- Util.warn "(#{code}) Found: `#{result.docidentifier.first.id}`"
21
+ Util.info "Found: `#{result.docidentifier.first.id}`", key: code
22
22
  else
23
- Util.warn "(#{code}) Not found."
23
+ Util.info "Not found.", key: code
24
24
  end
25
25
  result
26
26
  end
@@ -1,9 +1,6 @@
1
1
  module RelatonOmg
2
2
  module Util
3
3
  extend RelatonBib::Util
4
-
5
- def self.logger
6
- RelatonOmg.configuration.logger
7
- end
4
+ PROGNAME = "relaton-omg".freeze
8
5
  end
9
6
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonOmg
2
- VERSION = "1.18.1".freeze
2
+ VERSION = "1.19.0".freeze
3
3
  end
data/lib/relaton_omg.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require "nokogiri"
2
2
  require "relaton_bib"
3
3
  require "relaton_omg/version"
4
- require "relaton_omg/config"
5
4
  require "relaton_omg/util"
6
5
  require "relaton_omg/scraper"
7
6
  require "relaton_omg/omg_bibliography"
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 "relaton-bib", "~> 1.18.0"
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.18.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-06-27 00:00:00.000000000 Z
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.18.0
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.18.0
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
@@ -1,10 +0,0 @@
1
- module RelatonOmg
2
- module Config
3
- include RelatonBib::Config
4
- end
5
- extend Config
6
-
7
- class Configuration < RelatonBib::Configuration
8
- PROGNAME = "relaton-omg".freeze
9
- end
10
- end