orcid_client 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2db27debd808936cb1275702074e9640a3123cbd
4
- data.tar.gz: 1a018de7169ba3a144cb342bae62b4d46e22cf2b
3
+ metadata.gz: dd4ab6be76db96265906579f55aa0ff882b31b80
4
+ data.tar.gz: 6cbde3a754b4eaddf510ced7ea8164a84376ea22
5
5
  SHA512:
6
- metadata.gz: 4352820d61cb5e200dcc543a512fc4cc79d9c8473b88cfc95453b729dd8b4490ca0348714e8cb431a5cee21fa3ada83b3d2abf0e2a9795b3b398a5e45ccf0f32
7
- data.tar.gz: 3038a79194ca1eae803be0c8708c5c4518ad87ac314651c82c50a579c5e2507a8bbddc78d3e25187f1d70f4866d6e844b248c02168db87b4175956054a1ca23a
6
+ metadata.gz: 7432a1ddeb938d2428f8d146af17de11b50e996f4448e223ea2f2713d2668b485b122e1bd709d8fdd4e4c85be352a0070946244da8bb35ca0ec8d955d8918a9a
7
+ data.tar.gz: 0c8ccc19c7f01d0470bfc167293844a7440b2058e937b98060f3114e1a7eadd8754ae07822dc13d8416d37cc8c9233c5231ed1bf9304a684ff51b63cac10f33f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- orcid_client (0.1.5)
4
+ orcid_client (0.1.6)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  builder (~> 3.2, >= 3.2.2)
7
7
  dotenv (~> 2.1, >= 2.1.1)
@@ -20,7 +20,7 @@ module OrcidClient
20
20
 
21
21
  url = "#{orcid_api_url}/v#{API_VERSION}/#{orcid}/work"
22
22
  response = Maremma.post(url, content_type: 'application/vnd.orcid+xml', data: data, bearer: access_token)
23
- put_code = response.headers.fetch("Location", "").split("/").last
23
+ put_code = response.headers.present? ? response.headers.fetch("Location", "").split("/").last : nil
24
24
  response.body["put_code"] = put_code.present? ? put_code.to_i : nil
25
25
  response
26
26
  end
@@ -33,7 +33,7 @@ module OrcidClient
33
33
 
34
34
  url = "#{orcid_api_url}/v#{API_VERSION}/#{orcid}/work/#{put_code}"
35
35
  response = Maremma.put(url, content_type: 'application/vnd.orcid+xml', data: data, bearer: access_token)
36
- put_code = response.headers.fetch("Location", "").split("/").last
36
+ put_code = response.headers.present? ? response.headers.fetch("Location", "").split("/").last : nil
37
37
  response.body["put_code"] = put_code.present? ? put_code.to_i : nil
38
38
  response
39
39
  end
@@ -68,7 +68,7 @@ module OrcidClient
68
68
 
69
69
  url = "#{orcid_api_url}/v#{API_VERSION}/#{orcid}/notification-permission"
70
70
  response = Maremma.post(url, content_type: 'application/vnd.orcid+xml', data: data, bearer: notification_access_token)
71
- put_code = response.headers.fetch("Location", "").split("/").last
71
+ put_code = response.headers.present? ? response.headers.fetch("Location", "").split("/").last : nil
72
72
  response.body["put_code"] = put_code.present? ? put_code.to_i : nil
73
73
  response
74
74
  end
@@ -1,3 +1,3 @@
1
1
  module OrcidClient
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orcid_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner