relaton-iho 1.2.3 → 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/.rubocop.yml +2 -2
- data/lib/relaton_iho/comment_periond.rb +10 -0
- data/lib/relaton_iho/editorial_group.rb +19 -1
- data/lib/relaton_iho/iho_bibliographic_item.rb +9 -1
- data/lib/relaton_iho/version.rb +1 -1
- data/relaton_iho.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: 77ecf973a90c8af2ae4a0f67edc3f313f850afe7a2d99385923bf8e84cd05c6b
|
4
|
+
data.tar.gz: fd1ad0bd00a7cd28dcc5e1a44cf2dc1a71ffbfce90893f526bb0a80552bb4208
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ccb427bc61bf0b5550baad8cf0511086bc0c0ae5407ca60062f191edb31630a706f1b59d4d07c7564c550849fa9e83b627c70a76eda6c065003c6301ffa1f35
|
7
|
+
data.tar.gz: '08a06a4eff69ace8c8437916d8cd916cd7e48fdcd2208a47d0dc6fa2dc75db752d175d0d60b5df7003bb35e1bc65871a97c9e65b30031dfc4f82bf8bead3d52d'
|
data/.rubocop.yml
CHANGED
@@ -27,5 +27,15 @@ module RelatonIho
|
|
27
27
|
hash["to"] = to.to_s if to
|
28
28
|
hash
|
29
29
|
end
|
30
|
+
|
31
|
+
# @param prefix [String]
|
32
|
+
# @return [String]
|
33
|
+
def to_asciibib(prefix)
|
34
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
35
|
+
pref += "commentperiod"
|
36
|
+
out = "#{pref}.from:: #{from}\n"
|
37
|
+
out += "#{pref}.to:: #{to}\n" if to
|
38
|
+
out
|
39
|
+
end
|
30
40
|
end
|
31
41
|
end
|
@@ -5,7 +5,7 @@ module RelatonIho
|
|
5
5
|
|
6
6
|
def_delegators :@collection, :first, :any?
|
7
7
|
|
8
|
-
# @return [Array<RelatonIho::
|
8
|
+
# @return [Array<RelatonIho::EditorialGroup]
|
9
9
|
attr_reader :collection
|
10
10
|
|
11
11
|
# @param collection [Array<RelatonIho::EditorialGroup>]
|
@@ -23,6 +23,12 @@ module RelatonIho
|
|
23
23
|
single_element_array collection
|
24
24
|
end
|
25
25
|
|
26
|
+
# @param prefix [String]
|
27
|
+
# @return [String]
|
28
|
+
def to_asciibib(prefix)
|
29
|
+
collection.map { |ed| ed.to_asciibib prefix, collection.size }.join
|
30
|
+
end
|
31
|
+
|
26
32
|
# @return [Boolean]
|
27
33
|
def presence?
|
28
34
|
any?
|
@@ -60,5 +66,17 @@ module RelatonIho
|
|
60
66
|
hash["workgroup"] = workgroup if workgroup
|
61
67
|
hash
|
62
68
|
end
|
69
|
+
|
70
|
+
# @param prefix [String]
|
71
|
+
# @param count [Integer]
|
72
|
+
# @return [Strin]
|
73
|
+
def to_asciibib(prefix, count)
|
74
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
75
|
+
pref += "editorialgroup"
|
76
|
+
out = count > 1 ? "#{pref}::\n" : ""
|
77
|
+
out += "#{pref}.committee:: #{committee}\n"
|
78
|
+
out += "#{pref}.workgroup:: #{workgroup}\n" if workgroup
|
79
|
+
out
|
80
|
+
end
|
63
81
|
end
|
64
82
|
end
|
@@ -15,7 +15,7 @@ module RelatonIho
|
|
15
15
|
|
16
16
|
# @param builder [Nokogiri::XML::Builder]
|
17
17
|
# @param bibdata [TrueClasss, FalseClass, NilClass]
|
18
|
-
def to_xml(builer = nil, **opts)
|
18
|
+
def to_xml(builer = nil, **opts) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
|
19
19
|
opts[:ext] = !commentperiod.nil?
|
20
20
|
super do |b|
|
21
21
|
if opts[:bibdata] && (doctype || editorialgroup&.presence? ||
|
@@ -36,5 +36,13 @@ module RelatonIho
|
|
36
36
|
hash["commentperiod"] = commentperiod.to_hash if commentperiod
|
37
37
|
hash
|
38
38
|
end
|
39
|
+
|
40
|
+
# @param prefix [String]
|
41
|
+
# @return [String]
|
42
|
+
def to_asciibib(prefix = "")
|
43
|
+
out = super
|
44
|
+
out += commentperiod.to_asciibib prefix if commentperiod
|
45
|
+
out
|
46
|
+
end
|
39
47
|
end
|
40
48
|
end
|
data/lib/relaton_iho/version.rb
CHANGED
data/relaton_iho.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iho
|
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: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.3.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.3.0
|
167
167
|
description: 'RelatonIho: retrieve IHO Standards for bibliographic using the BibliographicItem
|
168
168
|
model'
|
169
169
|
email:
|