relaton-ogc 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 +4 -4
- data/README.adoc +5 -12
- data/{docs.json → docs1.json} +2111 -1444
- data/grammars/basicdoc.rng +3 -0
- data/lib/relaton_ogc/data_fetcher.rb +3 -4
- data/lib/relaton_ogc/document_type.rb +1 -1
- data/lib/relaton_ogc/ogc_bibliographic_item.rb +1 -1
- data/lib/relaton_ogc/ogc_bibliography.rb +5 -5
- data/lib/relaton_ogc/util.rb +1 -4
- data/lib/relaton_ogc/version.rb +1 -1
- data/lib/relaton_ogc/xml_parser.rb +1 -3
- data/lib/relaton_ogc.rb +0 -1
- data/relaton_ogc.gemspec +1 -1
- metadata +6 -7
- data/lib/relaton_ogc/config.rb +0 -10
data/grammars/basicdoc.rng
CHANGED
@@ -72,7 +72,7 @@ module RelatonOgc
|
|
72
72
|
get_data do |etag, json|
|
73
73
|
no_errors = true
|
74
74
|
json.each { |_, hit| fetch_doc(hit) || no_errors = false }
|
75
|
-
warn "
|
75
|
+
Util.warn "Duplicated documents: #{@dupids.to_a.join(', ')}" if @dupids.any?
|
76
76
|
self.etag = etag if no_errors
|
77
77
|
index.save
|
78
78
|
end
|
@@ -85,9 +85,8 @@ module RelatonOgc
|
|
85
85
|
write_document bib
|
86
86
|
true
|
87
87
|
rescue StandardError => e
|
88
|
-
|
89
|
-
|
90
|
-
warn e.backtrace
|
88
|
+
Util.error "Fetching document: #{hit['identifier']}\n" \
|
89
|
+
"#{e.class} #{e.message}\n#{e.backtrace}"
|
91
90
|
false
|
92
91
|
end
|
93
92
|
|
@@ -8,7 +8,7 @@ module RelatonOgc
|
|
8
8
|
|
9
9
|
def initialize(**args)
|
10
10
|
if args[:subdoctype] && !SUBTYPES.include?(args[:subdoctype])
|
11
|
-
Util.warn "
|
11
|
+
Util.warn "Invalid document subtype: `#{args[:subdoctype]}`"
|
12
12
|
end
|
13
13
|
|
14
14
|
# @docsubtype = args.delete :docsubtype
|
@@ -24,7 +24,7 @@ module RelatonOgc
|
|
24
24
|
result = bib_search_filter(code, year, opts) || (return nil)
|
25
25
|
ret = bib_results_filter(result, year)
|
26
26
|
if ret[:ret]
|
27
|
-
Util.
|
27
|
+
Util.info "Found: `#{ret[:ret].docidentifier.first.id}`", key: code
|
28
28
|
ret[:ret]
|
29
29
|
else
|
30
30
|
fetch_ref_err(code, year, ret[:years])
|
@@ -34,7 +34,7 @@ module RelatonOgc
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def bib_search_filter(code, year, opts)
|
37
|
-
Util.
|
37
|
+
Util.info "Fetching from Relaton repository ...", key: code
|
38
38
|
search(code, year, opts)
|
39
39
|
end
|
40
40
|
|
@@ -68,10 +68,10 @@ module RelatonOgc
|
|
68
68
|
# @param year [String]
|
69
69
|
# @param missed_years [Array<Strig>]
|
70
70
|
def fetch_ref_err(code, year, missed_years)
|
71
|
-
Util.
|
71
|
+
Util.info "Not found.", key: code
|
72
72
|
unless missed_years.empty?
|
73
|
-
Util.
|
74
|
-
"were matches found for `#{missed_years.join('`, `')}`."
|
73
|
+
Util.info "There was no match for `#{year}`, though there " \
|
74
|
+
"were matches found for `#{missed_years.join('`, `')}`.", key: code
|
75
75
|
end
|
76
76
|
nil
|
77
77
|
end
|
data/lib/relaton_ogc/util.rb
CHANGED
data/lib/relaton_ogc/version.rb
CHANGED
@@ -38,9 +38,7 @@ module RelatonOgc
|
|
38
38
|
committe = eg&.at("committee")&.text
|
39
39
|
sc = iso_subgroup eg&.at("subcommittee")
|
40
40
|
wg = iso_subgroup eg&.at("workgroup")
|
41
|
-
EditorialGroup.new(
|
42
|
-
committee: committe, subcommittee: sc, workgroup: wg,
|
43
|
-
)
|
41
|
+
EditorialGroup.new(committee: committe, subcommittee: sc, workgroup: wg)
|
44
42
|
end
|
45
43
|
end
|
46
44
|
end
|
data/lib/relaton_ogc.rb
CHANGED
data/relaton_ogc.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ogc
|
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
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.19.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.19.0
|
55
55
|
description: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
|
56
56
|
model'
|
57
57
|
email:
|
@@ -72,14 +72,13 @@ files:
|
|
72
72
|
- bin/console
|
73
73
|
- bin/rspec
|
74
74
|
- bin/setup
|
75
|
-
-
|
75
|
+
- docs1.json
|
76
76
|
- grammars/basicdoc.rng
|
77
77
|
- grammars/biblio-standoc.rng
|
78
78
|
- grammars/biblio.rng
|
79
79
|
- grammars/relaton-ogc-compile.rng
|
80
80
|
- grammars/relaton-ogc.rng
|
81
81
|
- lib/relaton_ogc.rb
|
82
|
-
- lib/relaton_ogc/config.rb
|
83
82
|
- lib/relaton_ogc/data_fetcher.rb
|
84
83
|
- lib/relaton_ogc/document_type.rb
|
85
84
|
- lib/relaton_ogc/editorial_group.rb
|
@@ -113,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
112
|
- !ruby/object:Gem::Version
|
114
113
|
version: '0'
|
115
114
|
requirements: []
|
116
|
-
rubygems_version: 3.3.
|
115
|
+
rubygems_version: 3.3.27
|
117
116
|
signing_key:
|
118
117
|
specification_version: 4
|
119
118
|
summary: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
|