omniauth-orcid 1.0.26 → 1.0.27

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: d74f0086f17382ff43cccc47bd652d6e522c9ab0
4
- data.tar.gz: 36a4119e083019c68a092bc72d2c4195768d424c
3
+ metadata.gz: 236c44683b914245ce9d81d36a4a101c1e697a59
4
+ data.tar.gz: 75a18a56830e6313b2af49fa1f924d0040909270
5
5
  SHA512:
6
- metadata.gz: 5915db25b377509769644ba47117f390937f13a136db82d71e74f920120d6cfd21ed706a62aeee48f083e2d40b2249e12a0ab1c6ae4996db3040b44945ab9bdf
7
- data.tar.gz: 0c6c45e678b534952362694e24b26ddb78919f7ee96186e0b682689bc49644f1b576ab74ff2343a2fe967a68642fca98eabc9a5e2dd8eeeeabade7d70c54bbd9
6
+ metadata.gz: 2e7a9099f5a52648baf4dfe611d8c41e810f6002bb050b26168304629ae5605651587a051bea1d11bf27c2692332bd1c3cdac0cd2caddc78ce9e1eb0b740b544
7
+ data.tar.gz: c1bb88e1b5de7965e95514cb9c07c7b4f48bf5af275f1e28ee52892d12e149301f69783b9351c9b27816ca5a6dffb89170aaff90fc06074fdf460e4441aac0da
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Orcid
3
- VERSION = "1.0.26"
3
+ VERSION = "1.0.27"
4
4
  end
5
5
  end
@@ -107,12 +107,12 @@ module OmniAuth
107
107
 
108
108
  def raw_info
109
109
  info = client.request(:get, "https://pub.orcid.org/v#{API_VERSION}/#{uid}/orcid-bio", headers: { accept: 'application/json' }).parsed || {}
110
- personal_details = info.fetch('orcid-profile', {}).fetch('orcid-bio', {})
110
+ orcid_bio = info.fetch('orcid-profile', {}).fetch('orcid-bio', {})
111
111
 
112
- { first_name: personal_details.fetch('given-names', {}).fetch('value', nil),
113
- last_name: personal_details.fetch('family-name', {}).fetch('value', nil),
112
+ { first_name: orcid_bio.fetch('personal-details', {}).fetch('given-names', {}).fetch('value', nil),
113
+ last_name: orcid_bio.fetch('personal-details', {}).fetch('family-name', {}).fetch('value', nil),
114
+ other_names: orcid_bio.fetch('personal-details', {}).fetch('other-names', [{}]).map { |other_name| other_name.fetch('other-name', {}).fetch('value', nil) },
114
115
  description: personal_details.fetch('biography', {}).fetch('value', nil),
115
- other_names: personal_details.fetch('other-names', [{}]).map { |other_name| other_name.fetch('other-name', {}).fetch('value', nil) },
116
116
  urls: {}
117
117
  }
118
118
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-orcid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.26
4
+ version: 1.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gudmundur A. Thorisson