relaton-omg 1.16.1 → 1.17.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: 68a04e76b6f9b7e0262d94edad9b9f419940e78e6dd983cfa6707f8142cfec90
4
- data.tar.gz: 6e8d87f0e245b545f55dc2c329cbc8801e29555317630134446f49f0532a4fc1
3
+ metadata.gz: 1fbe6994401edd1904af8cf3302400dff52a8dc43140797f327ff31a45ee0967
4
+ data.tar.gz: a0142d4f33106ea88f11072da9272ab2f898bccb202d29745863bb90feff24e1
5
5
  SHA512:
6
- metadata.gz: 73fe10dc67e851fb68219c56c8254a82b56b080e1b1608bb9ad4e396a6dcbfc2cf31ba4db40247fd80f4a3d5a6a13bd4ec6fa4cc3f7a270b7a93fbd61783eee4
7
- data.tar.gz: c5d8eada8199773bd6711094e11a70ea8fb42c13f0531c6b75064a80f5f6f106f02b0446d8eb1f42213664962891ec2f10e045d35158afa9eff293e2e19adb2d
6
+ metadata.gz: 5fd173bd8cf48cca7fe72be3cf0dde0d9da93e7b3ba5e48e2226b07742d4006d33b2a6656f5499d0a11401cfcac1c94c0f2365d9e89fd192dcfd15337704cba1
7
+ data.tar.gz: 668b7e8677e81e0a344b6c92270ff5eebd5e60a0df45e1ca8699b237b185a201f1421638f41b23efd5ac3da27ec3490b5dcaa9ba95bb141229029f3d607c5fa0
data/README.adoc CHANGED
@@ -31,6 +31,20 @@ 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
+
34
48
  === Search document
35
49
 
36
50
  Reference format is `OMG + {ACRONYM} + {VERSION}`
@@ -40,16 +54,16 @@ Reference format is `OMG + {ACRONYM} + {VERSION}`
40
54
 
41
55
  [source,ruby]
42
56
  ----
43
- require 'relaton_omg'
44
- => true
45
-
46
57
  item = RelatonOmg::OmgBibliography.get 'OMG AMI4CCM 1.0'
47
- => #<RelatonOmg::OmgBibliographicItem:0x007fda17eab2f0
58
+ [relaton-omg] (OMG AMI4CCM 1.0) Fetching from www.omg.org ...
59
+ [relaton-omg] (OMG AMI4CCM 1.0) Found: `AMI4CCM 1.0`
60
+ => #<RelatonOmg::OmgBibliographicItem:0x000000010435a520
48
61
  ...
49
62
 
50
63
  # Return nil if the document doesn't exist.
51
64
  RelatonOmg::OmgBibliography.get 'OMG 1111'
52
- [relaton-omg] no document found for "OMG 1111" reference.
65
+ [relaton-omg] (OMG 1111) Fetching from www.omg.org ...
66
+ [relaton-omg] (OMG 1111) Not found.
53
67
  => nil
54
68
  ----
55
69
 
@@ -58,7 +72,7 @@ RelatonOmg::OmgBibliography.get 'OMG 1111'
58
72
  [source,ruby]
59
73
  ----
60
74
  item.to_xml
61
- => "<bibitem id="AMI4CCM1.0" schema-version="v1.2.4">
75
+ => "<bibitem id="AMI4CCM1.0" schema-version="v1.2.5">
62
76
  <fetched>2022-12-05</fetched>
63
77
  <title type="main" format="text/plain" language="en" script="Latn">Asynchronous Method Invocation for CCM</title>
64
78
  <uri type="src">https://www.omg.org/spec/AMI4CCM/1.0/About-AMI4CCM</uri>
@@ -92,7 +106,7 @@ item = RelatonOmg::OmgBibliographicItem.from_xml 'spec/fixtures/omg_ami4ccm_1_0.
92
106
  [source,ruby]
93
107
  ----
94
108
  hash = YAML.load_file 'spec/fixtures/omg_ami4ccm_1_0.yaml'
95
- => {"schema-version"=>"v1.2.4",
109
+ => {"schema-version"=>"v1.2.5",
96
110
  "id"=>"AMI4CCM1.0",
97
111
  ...
98
112
 
@@ -346,6 +346,8 @@
346
346
  <ref name="keyword"/>
347
347
  <ref name="xref"/>
348
348
  <ref name="hyperlink"/>
349
+ <ref name="index"/>
350
+ <ref name="index-xref"/>
349
351
  </choice>
350
352
  </oneOrMore>
351
353
  </element>
@@ -623,6 +625,8 @@
623
625
  <ref name="eref"/>
624
626
  <ref name="xref"/>
625
627
  <ref name="hyperlink"/>
628
+ <ref name="index"/>
629
+ <ref name="index-xref"/>
626
630
  </choice>
627
631
  </zeroOrMore>
628
632
  </element>
@@ -636,6 +640,8 @@
636
640
  <ref name="eref"/>
637
641
  <ref name="xref"/>
638
642
  <ref name="hyperlink"/>
643
+ <ref name="index"/>
644
+ <ref name="index-xref"/>
639
645
  </choice>
640
646
  </zeroOrMore>
641
647
  </element>
@@ -648,6 +654,8 @@
648
654
  <ref name="eref"/>
649
655
  <ref name="xref"/>
650
656
  <ref name="hyperlink"/>
657
+ <ref name="index"/>
658
+ <ref name="index-xref"/>
651
659
  </choice>
652
660
  </zeroOrMore>
653
661
  </element>
@@ -655,7 +663,11 @@
655
663
  <define name="keyword">
656
664
  <element name="keyword">
657
665
  <zeroOrMore>
658
- <ref name="PureTextElement"/>
666
+ <choice>
667
+ <ref name="PureTextElement"/>
668
+ <ref name="index"/>
669
+ <ref name="index-xref"/>
670
+ </choice>
659
671
  </zeroOrMore>
660
672
  </element>
661
673
  </define>
@@ -676,7 +688,11 @@
676
688
  <define name="strike">
677
689
  <element name="strike">
678
690
  <zeroOrMore>
679
- <ref name="PureTextElement"/>
691
+ <choice>
692
+ <ref name="PureTextElement"/>
693
+ <ref name="index"/>
694
+ <ref name="index-xref"/>
695
+ </choice>
680
696
  </zeroOrMore>
681
697
  </element>
682
698
  </define>
data/grammars/biblio.rng CHANGED
@@ -942,6 +942,7 @@
942
942
  <value>obsoleted</value>
943
943
  <value>confirmed</value>
944
944
  <value>updated</value>
945
+ <value>corrected</value>
945
946
  <value>issued</value>
946
947
  <value>transmitted</value>
947
948
  <value>copied</value>
@@ -1,6 +1,6 @@
1
1
  module RelatonOmg
2
- class HashConverter < RelatonBib::HashConverter
3
- class << self
4
- end
2
+ module HashConverter
3
+ include RelatonBib::HashConverter
4
+ extend self
5
5
  end
6
6
  end
@@ -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 OMG website..."
18
+ Util.warn "(#{code}) Fetching from www.omg.org ..."
19
19
  result = search code
20
20
  if result
21
- Util.warn "(#{code}) found `#{result.docidentifier.first.id}`"
21
+ Util.warn "(#{code}) Found: `#{result.docidentifier.first.id}`"
22
22
  else
23
- Util.warn "(#{code}) no document found"
23
+ Util.warn "(#{code}) Not found."
24
24
  end
25
25
  result
26
26
  end
@@ -16,7 +16,7 @@ module RelatonOmg
16
16
  rescue OpenURI::HTTPError, URI::InvalidURIError, Net::OpenTimeout => e
17
17
  return if e.is_a?(URI::InvalidURIError) || e.io.status[0] == "404"
18
18
 
19
- raise RelatonBib::RequestError, "Unable acces #{url} (#{e.io.status.join(' ')}"
19
+ raise RelatonBib::RequestError, "Unable acces #{url} (#{e.io.status.join(' ')})"
20
20
  end
21
21
 
22
22
  private
@@ -1,3 +1,3 @@
1
1
  module RelatonOmg
2
- VERSION = "1.16.1".freeze
2
+ VERSION = "1.17.0".freeze
3
3
  end
data/relaton_omg.gemspec CHANGED
@@ -26,5 +26,5 @@ 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.16.0"
29
+ spec.add_dependency "relaton-bib", "~> 1.17.0"
30
30
  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.16.1
4
+ version: 1.17.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: 2023-09-22 00:00:00.000000000 Z
11
+ date: 2023-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: relaton-bib
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.16.0
19
+ version: 1.17.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.16.0
26
+ version: 1.17.0
27
27
  description: 'RelatonOmg: retrieve OMG Standards for bibliographic using the IsoBibliographicItem
28
28
  model'
29
29
  email: