theoj 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/theoj/author.rb +13 -1
- data/lib/theoj/paper.rb +1 -0
- data/lib/theoj/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c515c77887a35b68e134958d1fc4e3b5c7f3fe0f49857ce6588840b78c066082
|
4
|
+
data.tar.gz: 9ff11bb419fde2feea92704ad61435f74fa7353e5a69ab042fd6b1a43c18da91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a6436cde4cf744a217527d0000d7ef222735d769db36539874f9c98ddef6c8f4e16b57bcc7b69a6a380e1557d46faf9a96c71f6a7006bd904e6e47d4f968a08
|
7
|
+
data.tar.gz: 12b3e3893b21fa461b40fabcea661be6b43965fa92b6d02f8554f2dc079d6b209e924d34935ddbb8451590812c5fb62a84891e6f599844c40fbb43d8c6b5e2a4
|
data/CHANGELOG.md
CHANGED
data/lib/theoj/author.rb
CHANGED
@@ -45,7 +45,19 @@ module Theoj
|
|
45
45
|
private
|
46
46
|
|
47
47
|
def parse_name(author_name)
|
48
|
-
|
48
|
+
if author_name.is_a? Hash
|
49
|
+
g = author_name["given-names"] || author_name["given"] || author_name["first"] || author_name["firstname"]
|
50
|
+
m = author_name["dropping-particle"]
|
51
|
+
s = author_name["surname"] || author_name["family"]
|
52
|
+
|
53
|
+
g = strip_footnotes(g) unless g.nil?
|
54
|
+
s = strip_footnotes(s) unless s.nil?
|
55
|
+
|
56
|
+
@parsed_name = m.nil? ? Nameable::Latin.new(g, s) : Nameable::Latin.new(g, m, s)
|
57
|
+
else
|
58
|
+
@parsed_name = Nameable::Latin.new.parse(strip_footnotes(author_name))
|
59
|
+
end
|
60
|
+
|
49
61
|
@name = @parsed_name.to_nameable
|
50
62
|
end
|
51
63
|
|
data/lib/theoj/paper.rb
CHANGED
@@ -121,6 +121,7 @@ module Theoj
|
|
121
121
|
|
122
122
|
# Loop through the authors block and build up the affiliation
|
123
123
|
authors_metadata.each do |author|
|
124
|
+
author['name'] = author.dup if author['name'].nil?
|
124
125
|
affiliation_index = author['affiliation']
|
125
126
|
failure "Author (#{author['name']}) is missing affiliation" if affiliation_index.nil?
|
126
127
|
begin
|
data/lib/theoj/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: theoj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juanjo Bazán
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|