relaton-ogc 1.2.0 → 1.3.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/.github/workflows/ubuntu.yml +1 -0
- data/.rubocop.yml +2 -2
- data/lib/relaton_ogc/editorial_group.rb +11 -0
- data/lib/relaton_ogc/hash_converter.rb +1 -1
- data/lib/relaton_ogc/ogc_bibliographic_item.rb +11 -1
- data/lib/relaton_ogc/version.rb +1 -1
- data/lib/relaton_ogc/xml_parser.rb +1 -14
- data/relaton_ogc.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1846ab3b42aa250b1a9afc321b181a82c820ca259a758859dc21a7b1c4e5ee02
|
4
|
+
data.tar.gz: 253d626642e8bea13d2659b533a6332b3a5c138157021a7f424def0383194ce5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d2247a7dd1334b7d6800ef54ae3f44cb84ea384bab1489ab7b6fb3a8e7b59748b3f42635c2d6f267531dd174e9adf5c183f6fc21b0bae206c633b3f6435fb70
|
7
|
+
data.tar.gz: 5ef699a961a87ec101409808950236029df75df49e91d4791ec2b5ef660fb279063232b70e8967fda1247ebae3d84f01cb9c988eafe9248f10eafefe04b80382
|
data/.rubocop.yml
CHANGED
@@ -52,6 +52,17 @@ module RelatonOgc
|
|
52
52
|
hash
|
53
53
|
end
|
54
54
|
|
55
|
+
# @param prefix [String]
|
56
|
+
# @return [String]
|
57
|
+
def to_asciibib(prefix)
|
58
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
59
|
+
pref += "editorialgroup"
|
60
|
+
out = "#{pref}.committee:: #{committee}\n"
|
61
|
+
out += subcommittee.to_asciibib "#{pref}.subcommittee" if subcommittee
|
62
|
+
out += workgroup.to_asciibib "#{pref}.workgroup" if workgroup
|
63
|
+
out
|
64
|
+
end
|
65
|
+
|
55
66
|
private
|
56
67
|
|
57
68
|
# @param group [Hash, RelatonIsoBib::IsoSubgroup]
|
@@ -20,7 +20,8 @@ module RelatonOgc
|
|
20
20
|
# @param docsubtype [String]
|
21
21
|
def initialize(**args)
|
22
22
|
if args[:docsubtype] && !SUBTYPES.include?(args[:docsubtype])
|
23
|
-
warn "[relaton-ogc] WARNING: invalid document
|
23
|
+
warn "[relaton-ogc] WARNING: invalid document "\
|
24
|
+
"subtype: #{args[:docsubtype]}"
|
24
25
|
end
|
25
26
|
|
26
27
|
@docsubtype = args.delete :docsubtype
|
@@ -48,5 +49,14 @@ module RelatonOgc
|
|
48
49
|
end
|
49
50
|
end
|
50
51
|
end
|
52
|
+
|
53
|
+
# @param prefix [String]
|
54
|
+
# @return [String]
|
55
|
+
def to_asciibib(prefix = "")
|
56
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
57
|
+
out = super
|
58
|
+
out += "#{pref}docsubtype:: #{docsubtype}\n" if docsubtype
|
59
|
+
out
|
60
|
+
end
|
51
61
|
end
|
52
62
|
end
|
data/lib/relaton_ogc/version.rb
CHANGED
@@ -3,19 +3,6 @@ require "nokogiri"
|
|
3
3
|
module RelatonOgc
|
4
4
|
class XMLParser < RelatonIsoBib::XMLParser
|
5
5
|
class << self
|
6
|
-
# Override RelatonIsoBib::XMLParser.form_xml method.
|
7
|
-
# @param xml [String]
|
8
|
-
# @return [RelatonOgc::OgcBibliographicItem]
|
9
|
-
# def from_xml(xml)
|
10
|
-
# doc = Nokogiri::XML(xml)
|
11
|
-
# item = doc.at "/bibitem|/bibdata"
|
12
|
-
# if item
|
13
|
-
# OgcBibliographicItem.new item_data(item)
|
14
|
-
# else
|
15
|
-
# warn "[relaton-ogc] can't find bibitem or bibdata element in the XML"
|
16
|
-
# end
|
17
|
-
# end
|
18
|
-
|
19
6
|
private
|
20
7
|
|
21
8
|
# override RelatonIsoBib::IsoBibliographicItem.bib_item method
|
@@ -48,7 +35,7 @@ module RelatonOgc
|
|
48
35
|
sc = iso_subgroup eg&.at("subcommittee")
|
49
36
|
wg = iso_subgroup eg&.at("workgroup")
|
50
37
|
EditorialGroup.new(
|
51
|
-
committee: committe, subcommittee: sc, workgroup: wg
|
38
|
+
committee: committe, subcommittee: sc, workgroup: wg
|
52
39
|
)
|
53
40
|
end
|
54
41
|
end
|
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.3.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: 2020-
|
11
|
+
date: 2020-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
173
|
+
version: 1.3.0
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 1.
|
180
|
+
version: 1.3.0
|
181
181
|
description: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
|
182
182
|
model'
|
183
183
|
email:
|