relaton-un 1.16.0 → 1.16.1
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/lib/relaton_un/config.rb +10 -0
- data/lib/relaton_un/un_bibliographic_item.rb +1 -1
- data/lib/relaton_un/un_bibliography.rb +5 -3
- data/lib/relaton_un/util.rb +9 -0
- data/lib/relaton_un/version.rb +1 -1
- data/lib/relaton_un.rb +6 -4
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f1fa9196d2c00a4740b08e4ed793b3f0073defdfe9efde37f609aa3ae8755e8
|
4
|
+
data.tar.gz: 97752fd7f24738baa8fe97de080c141dba11eab434697cbd04eca1dd158af5f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5af293100d6b96a28da1b8c56e5f404f282bfcf06ea77408f3297b7a65d5a24375a2da5350f5e2fad4a75262d491e51eb334223f0ca5a90ecca2851d3bd1634b
|
7
|
+
data.tar.gz: 2eb898c7ec22ee17ba302a7bdfb2d167466b1e0500b04048ab0be68f8ec118006f8d18a7af2596c5bf65573674b525516319f1a5bc1bd9a34b89e5b490b40a5a
|
@@ -24,7 +24,7 @@ module RelatonUn
|
|
24
24
|
# @param job_number [String, nil]
|
25
25
|
def initialize(**args)
|
26
26
|
if args[:distribution] && !DISTRIBUTIONS.has_value?(args[:distribution])
|
27
|
-
warn "
|
27
|
+
Util.warn "WARNING: invalid distribution: `#{args[:distribution]}`"
|
28
28
|
end
|
29
29
|
@submissionlanguage = args.delete :submissionlanguage
|
30
30
|
@distribution = args.delete :distribution
|
@@ -21,13 +21,15 @@ module RelatonUn
|
|
21
21
|
# @param opts [Hash] options
|
22
22
|
# @return [RelatonUn::UnBibliographicItem]
|
23
23
|
def get(ref, _year = nil, _opts = {})
|
24
|
-
warn "
|
24
|
+
Util.warn "(#{ref}) fetching..."
|
25
25
|
/^(?:UN\s)?(?<code>.*)/ =~ ref
|
26
26
|
result = isobib_search_filter(code)
|
27
27
|
if result
|
28
|
-
warn "
|
29
|
-
"found #{result.fetch.docidentifier[0].id}"
|
28
|
+
Util.warn "(#{ref}) found `#{result.fetch.docidentifier[0].id}`"
|
30
29
|
result.fetch
|
30
|
+
else
|
31
|
+
Util.warn "(#{ref}) nothing found"
|
32
|
+
nil
|
31
33
|
end
|
32
34
|
end
|
33
35
|
|
data/lib/relaton_un/version.rb
CHANGED
data/lib/relaton_un.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require "addressable"
|
2
2
|
require "relaton_bib"
|
3
3
|
require "relaton_un/version"
|
4
|
+
require "relaton_un/config"
|
5
|
+
require "relaton_un/util"
|
4
6
|
require "relaton_un/un_bibliographic_item"
|
5
7
|
require "relaton_un/un_bibliography"
|
6
8
|
require "relaton_un/hit_collection"
|
@@ -16,9 +18,9 @@ module RelatonUn
|
|
16
18
|
# Returns hash of XML reammar
|
17
19
|
# @return [String]
|
18
20
|
def self.grammar_hash
|
19
|
-
gem_path = File.expand_path "..", __dir__
|
20
|
-
grammars_path = File.join gem_path, "grammars", "*"
|
21
|
-
grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
|
22
|
-
Digest::MD5.hexdigest grammars
|
21
|
+
# gem_path = File.expand_path "..", __dir__
|
22
|
+
# grammars_path = File.join gem_path, "grammars", "*"
|
23
|
+
# grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
|
24
|
+
Digest::MD5.hexdigest RelatonUn::VERSION + RelatonBib::VERSION # grammars
|
23
25
|
end
|
24
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.16.
|
4
|
+
version: 1.16.1
|
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-
|
11
|
+
date: 2023-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- grammars/relaton-un-compile.rng
|
107
107
|
- grammars/relaton-un.rng
|
108
108
|
- lib/relaton_un.rb
|
109
|
+
- lib/relaton_un/config.rb
|
109
110
|
- lib/relaton_un/editorialgroup.rb
|
110
111
|
- lib/relaton_un/hash_converter.rb
|
111
112
|
- lib/relaton_un/hit.rb
|
@@ -114,6 +115,7 @@ files:
|
|
114
115
|
- lib/relaton_un/session.rb
|
115
116
|
- lib/relaton_un/un_bibliographic_item.rb
|
116
117
|
- lib/relaton_un/un_bibliography.rb
|
118
|
+
- lib/relaton_un/util.rb
|
117
119
|
- lib/relaton_un/version.rb
|
118
120
|
- lib/relaton_un/xml_parser.rb
|
119
121
|
- relaton_un.gemspec
|