orcid_client 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/orcid_client/api.rb +3 -3
- data/lib/orcid_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd4ab6be76db96265906579f55aa0ff882b31b80
|
4
|
+
data.tar.gz: 6cbde3a754b4eaddf510ced7ea8164a84376ea22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7432a1ddeb938d2428f8d146af17de11b50e996f4448e223ea2f2713d2668b485b122e1bd709d8fdd4e4c85be352a0070946244da8bb35ca0ec8d955d8918a9a
|
7
|
+
data.tar.gz: 0c8ccc19c7f01d0470bfc167293844a7440b2058e937b98060f3114e1a7eadd8754ae07822dc13d8416d37cc8c9233c5231ed1bf9304a684ff51b63cac10f33f
|
data/Gemfile.lock
CHANGED
data/lib/orcid_client/api.rb
CHANGED
@@ -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
|
data/lib/orcid_client/version.rb
CHANGED