orcid_client 0.1.6 → 0.1.7

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: dd4ab6be76db96265906579f55aa0ff882b31b80
4
- data.tar.gz: 6cbde3a754b4eaddf510ced7ea8164a84376ea22
3
+ metadata.gz: 262b026a4b9e0dd390c03f459556f81c7ef2de0a
4
+ data.tar.gz: 3760397b16157de4abe9ebb05ab4fdfb2c041615
5
5
  SHA512:
6
- metadata.gz: 7432a1ddeb938d2428f8d146af17de11b50e996f4448e223ea2f2713d2668b485b122e1bd709d8fdd4e4c85be352a0070946244da8bb35ca0ec8d955d8918a9a
7
- data.tar.gz: 0c8ccc19c7f01d0470bfc167293844a7440b2058e937b98060f3114e1a7eadd8754ae07822dc13d8416d37cc8c9233c5231ed1bf9304a684ff51b63cac10f33f
6
+ metadata.gz: 308b88a81d942f42450874db098f850bb9e5fde6140100ba6f9ede0363201521c114249e6495ea6fcc707cca0b669fe1d5a8a04ef43ddbc823f654c97ae0d5cc
7
+ data.tar.gz: 7a45a1b143a1865108d3a12900d46e5f634cc20f7c3424b2a1dfa0079730757cf711345527c017c55b407547d7a859d9348a9f906d029a1004c7ca4e94368a57
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- orcid_client (0.1.6)
4
+ orcid_client (0.1.7)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  builder (~> 3.2, >= 3.2.2)
7
7
  dotenv (~> 2.1, >= 2.1.1)
@@ -5,7 +5,8 @@ module OrcidClient
5
5
  API_VERSION = "2.0_rc3"
6
6
 
7
7
  def get_works(options={})
8
- return { "errors" => [{ "title" => "Access token missing" }] } unless access_token.present?
8
+ response = OpenStruct.new(body: {})
9
+ return { response.body["errors"] => [{ "title" => "Access token missing" }] } unless access_token.present?
9
10
 
10
11
  orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
11
12
 
@@ -14,7 +15,8 @@ module OrcidClient
14
15
  end
15
16
 
16
17
  def create_work(options={})
17
- return { "errors" => [{ "title" => "Access token missing" }] } unless access_token.present?
18
+ response = OpenStruct.new(body: {})
19
+ return { response.body["errors"] => [{ "title" => "Access token missing" }] } unless access_token.present?
18
20
 
19
21
  orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
20
22
 
@@ -26,8 +28,9 @@ module OrcidClient
26
28
  end
27
29
 
28
30
  def update_work(options={})
29
- return { "errors" => [{ "title" => "Access token missing" }] } unless access_token.present?
30
- return { "errors" => [{ "title" => "Put code missing" }] } unless put_code.present?
31
+ response = OpenStruct.new(body: {})
32
+ return { response.body["errors"] => [{ "title" => "Access token missing" }] } unless access_token.present?
33
+ return { response.body["errors"] => [{ "title" => "Put code missing" }] } unless put_code.present?
31
34
 
32
35
  orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
33
36
 
@@ -39,8 +42,9 @@ module OrcidClient
39
42
  end
40
43
 
41
44
  def delete_work(options={})
42
- return { "errors" => [{ "title" => "Access token missing" }] } unless access_token.present?
43
- return { "errors" => [{ "title" => "Put code missing" }] } unless put_code.present?
45
+ response = OpenStruct.new(body: {})
46
+ return { response.body["errors"] => [{ "title" => "Access token missing" }] } unless access_token.present?
47
+ return { response.body["errors"] => [{ "title" => "Put code missing" }] } unless put_code.present?
44
48
 
45
49
  orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
46
50
 
@@ -62,7 +66,8 @@ module OrcidClient
62
66
  end
63
67
 
64
68
  def create_notification(options={})
65
- return { "errors" => [{ "title" => "Notification access token missing" }] } unless notification_access_token.present?
69
+ response = OpenStruct.new(body: {})
70
+ return { response.body["errors"] => [{ "title" => "Notification access token missing" }] } unless notification_access_token.present?
66
71
 
67
72
  orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
68
73
 
@@ -74,8 +79,9 @@ module OrcidClient
74
79
  end
75
80
 
76
81
  def delete_notification(options={})
77
- return { "errors" => [{ "title" => "Notification access token missing" }] } unless notification_access_token.present?
78
- return { "errors" => [{ "title" => "Put code missing" }] } unless put_code.present?
82
+ response = OpenStruct.new(body: {})
83
+ return { response.body["errors"] => [{ "title" => "Notification access token missing" }] } unless notification_access_token.present?
84
+ return { response.body["errors"] => [{ "title" => "Put code missing" }] } unless put_code.present?
79
85
 
80
86
  orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
81
87
 
@@ -84,8 +90,9 @@ module OrcidClient
84
90
  end
85
91
 
86
92
  def get_notification(options={})
87
- return { "errors" => [{ "title" => "Notification access token missing" }] } unless notification_access_token.present?
88
- return { "errors" => [{ "title" => "Put code missing" }] } unless put_code.present?
93
+ response = OpenStruct.new(body: {})
94
+ return { response.body["errors"] => [{ "title" => "Notification access token missing" }] } unless notification_access_token.present?
95
+ return { response.body["errors"] => [{ "title" => "Put code missing" }] } unless put_code.present?
89
96
 
90
97
  orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
91
98
 
@@ -1,3 +1,3 @@
1
1
  module OrcidClient
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
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.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner