bolognese 0.9.29 → 0.9.30

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 372b1e26ae5b28f8a622b65f8db6f0cc8846210c
4
- data.tar.gz: 302f11d4884c20d4b174c7e19bbf40afdade55a5
3
+ metadata.gz: 9c2636bec6f6d7bf17b11575823249723fa55f1d
4
+ data.tar.gz: c5c872b49cb13b75d85020da182ae774719d74ad
5
5
  SHA512:
6
- metadata.gz: 592836545b6e9e8e81662769becc922d026c4f2191b46e5020a73db130fdb8f375eb68e74706e4d05930273e6f8694ec8ee45f0cbcba97be076e0bb09a41098c
7
- data.tar.gz: 5055559de0e4c9c67e92efd5fa5be9a66e063da87d55ac36e0da8a52192128f3f80854e21b31f76542b32c5afb58e07c1e9dbd893c2ea8be9533a9cb59af154b
6
+ metadata.gz: 4c1d714a61f801b70ad744960398b29eb7666978a870f0f9c71deca488a24500bc93b6ed961a66acd835640e28c62db404a4dc208cf5a6b07dae28f1f61087f0
7
+ data.tar.gz: 289d0593d490273fcc8e3a403350f86625aff1d4d51fcd0b655590296060f0e9fb24c5992470afe9dc379b43cbf0e303ec9b0b17777e64416f551e1d13657679
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (0.9.29)
4
+ bolognese (0.9.30)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (~> 4.1)
@@ -94,8 +94,10 @@ module Bolognese
94
94
  # parse nameIdentifier from DataCite
95
95
  def get_name_identifiers(author)
96
96
  name_identifiers = Array.wrap(author.fetch("nameIdentifier", nil)).reduce([]) do |sum, n|
97
+ n = { "__content__" => n } if n.is_a?(String)
98
+
97
99
  scheme = n.fetch("nameIdentifierScheme", nil)
98
- scheme_uri = n.fetch("schemeURI", nil) || IDENTIFIER_SCHEME_URIS.fetch(scheme)
100
+ scheme_uri = n.fetch("schemeURI", nil) || IDENTIFIER_SCHEME_URIS.fetch(scheme, "https://orcid.org")
99
101
  scheme_uri = "https://orcid.org/" if validate_orcid_scheme(scheme_uri)
100
102
  scheme_uri << '/' unless scheme_uri.present? && scheme_uri.end_with?('/')
101
103
 
@@ -106,7 +108,7 @@ module Bolognese
106
108
  identifier = identifier.gsub(" ", "-")
107
109
  end
108
110
 
109
- if identifier.present? || scheme_uri.present?
111
+ if identifier.present? && scheme_uri.present?
110
112
  sum << scheme_uri + identifier
111
113
  else
112
114
  sum
@@ -1,3 +1,3 @@
1
1
  module Bolognese
2
- VERSION = "0.9.29"
2
+ VERSION = "0.9.30"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolognese
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.29
4
+ version: 0.9.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner