orcid_client 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -5
- data/Gemfile.lock +17 -16
- data/lib/orcid_client/api.rb +1 -0
- data/lib/orcid_client/version.rb +1 -1
- data/lib/orcid_client/work.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaaad53f92a801347b236a3cc74ba6fdd617b82d7b053991e691c12cea99bada
|
4
|
+
data.tar.gz: 52d70efb73909ec0a2140aa63d334cd62c6972d5b6cc1c3641584018ee226a55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 603501bd1e9f5f167afcb24ef9f76d4e22a623968227677598c11a7ab424434461ab3b5b0f930a371133f5425089414c63a14aebd810bc67d212128c5f6d72be
|
7
|
+
data.tar.gz: 740fb302139d13746fdb8e38d8c51b9a62037104e46c60ab93ea90ff0924ce69ab39a571b95970e87b1531f067fec72fbc22791ca5819e199731aa62ec1d5b08
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.9.5](https://github.com/datacite/orcid_client/tree/0.9.5) (2021-09-29)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/datacite/orcid_client/compare/0.9.4...0.9.5)
|
6
|
+
|
7
|
+
## [0.9.4](https://github.com/datacite/orcid_client/tree/0.9.4) (2021-06-09)
|
8
|
+
|
9
|
+
[Full Changelog](https://github.com/datacite/orcid_client/compare/0.9.3...0.9.4)
|
10
|
+
|
3
11
|
## [0.9.3](https://github.com/datacite/orcid_client/tree/0.9.3) (2021-06-04)
|
4
12
|
|
5
13
|
[Full Changelog](https://github.com/datacite/orcid_client/compare/0.9.2...0.9.3)
|
@@ -62,19 +70,19 @@
|
|
62
70
|
|
63
71
|
## [v.0.4.3](https://github.com/datacite/orcid_client/tree/v.0.4.3) (2018-12-12)
|
64
72
|
|
65
|
-
[Full Changelog](https://github.com/datacite/orcid_client/compare/v.0.4.
|
73
|
+
[Full Changelog](https://github.com/datacite/orcid_client/compare/v.0.4.1...v.0.4.3)
|
66
74
|
|
67
75
|
**Merged pull requests:**
|
68
76
|
|
69
77
|
- Chore update Bolognese [\#3](https://github.com/datacite/orcid_client/pull/3) ([kjgarza](https://github.com/kjgarza))
|
70
78
|
|
71
|
-
## [v.0.4.
|
79
|
+
## [v.0.4.1](https://github.com/datacite/orcid_client/tree/v.0.4.1) (2018-04-11)
|
72
80
|
|
73
|
-
[Full Changelog](https://github.com/datacite/orcid_client/compare/v.0.4.
|
81
|
+
[Full Changelog](https://github.com/datacite/orcid_client/compare/v.0.4.2...v.0.4.1)
|
74
82
|
|
75
|
-
## [v.0.4.
|
83
|
+
## [v.0.4.2](https://github.com/datacite/orcid_client/tree/v.0.4.2) (2018-04-11)
|
76
84
|
|
77
|
-
[Full Changelog](https://github.com/datacite/orcid_client/compare/v.0.4...v.0.4.
|
85
|
+
[Full Changelog](https://github.com/datacite/orcid_client/compare/v.0.4...v.0.4.2)
|
78
86
|
|
79
87
|
## [v.0.4](https://github.com/datacite/orcid_client/tree/v.0.4) (2018-04-11)
|
80
88
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
orcid_client (0.9.
|
4
|
+
orcid_client (0.9.5)
|
5
5
|
activesupport (>= 4.2.5, < 6)
|
6
6
|
bolognese (~> 1.3, >= 1.9.8)
|
7
7
|
builder (~> 3.2, >= 3.2.2)
|
@@ -24,7 +24,7 @@ GEM
|
|
24
24
|
benchmark_methods (0.7)
|
25
25
|
bibtex-ruby (6.0.0)
|
26
26
|
latex-decode (~> 0.0)
|
27
|
-
bolognese (1.9.
|
27
|
+
bolognese (1.9.12)
|
28
28
|
activesupport (>= 4.2.5)
|
29
29
|
benchmark_methods (~> 0.7)
|
30
30
|
bibtex-ruby (>= 5.1.0)
|
@@ -52,22 +52,23 @@ GEM
|
|
52
52
|
builder (3.2.4)
|
53
53
|
citeproc (1.0.10)
|
54
54
|
namae (~> 1.0)
|
55
|
-
citeproc-ruby (1.1.
|
55
|
+
citeproc-ruby (1.1.14)
|
56
56
|
citeproc (~> 1.0, >= 1.0.9)
|
57
|
-
csl (~> 1.
|
57
|
+
csl (~> 1.6)
|
58
58
|
colorize (0.8.1)
|
59
59
|
concurrent-ruby (1.1.9)
|
60
60
|
crack (0.4.5)
|
61
61
|
rexml
|
62
62
|
crass (1.0.6)
|
63
|
-
csl (1.
|
63
|
+
csl (1.6.0)
|
64
64
|
namae (~> 1.0)
|
65
|
+
rexml
|
65
66
|
csl-styles (1.0.1.11)
|
66
67
|
csl (~> 1.0)
|
67
68
|
diff-lcs (1.4.4)
|
68
69
|
docile (1.4.0)
|
69
70
|
dotenv (2.7.6)
|
70
|
-
ebnf (2.1
|
71
|
+
ebnf (2.2.1)
|
71
72
|
amazing_print (~> 1.2)
|
72
73
|
htmlentities (~> 4.3)
|
73
74
|
rdf (~> 3.1)
|
@@ -85,7 +86,7 @@ GEM
|
|
85
86
|
faraday (>= 0.7.4, < 1.0)
|
86
87
|
gender_detector (0.1.2)
|
87
88
|
unicode_utils (>= 1.3.0)
|
88
|
-
haml (5.2.
|
89
|
+
haml (5.2.2)
|
89
90
|
temple (>= 0.8.0)
|
90
91
|
tilt
|
91
92
|
hamster (3.0.0)
|
@@ -96,14 +97,14 @@ GEM
|
|
96
97
|
concurrent-ruby (~> 1.0)
|
97
98
|
iso8601 (0.9.1)
|
98
99
|
json-canonicalization (0.2.1)
|
99
|
-
json-ld (3.1.
|
100
|
+
json-ld (3.1.10)
|
100
101
|
htmlentities (~> 4.3)
|
101
102
|
json-canonicalization (~> 0.2)
|
102
103
|
link_header (~> 0.0, >= 0.0.8)
|
103
104
|
multi_json (~> 1.14)
|
104
105
|
rack (~> 2.0)
|
105
106
|
rdf (~> 3.1)
|
106
|
-
json-ld-preloaded (3.1.
|
107
|
+
json-ld-preloaded (3.1.6)
|
107
108
|
json-ld (~> 3.1)
|
108
109
|
rdf (~> 3.1)
|
109
110
|
jsonlint (0.3.0)
|
@@ -111,10 +112,10 @@ GEM
|
|
111
112
|
optimist (~> 3)
|
112
113
|
latex-decode (0.3.2)
|
113
114
|
link_header (0.0.8)
|
114
|
-
loofah (2.
|
115
|
+
loofah (2.12.0)
|
115
116
|
crass (~> 1.0.2)
|
116
117
|
nokogiri (>= 1.5.9)
|
117
|
-
maremma (4.9.
|
118
|
+
maremma (4.9.5)
|
118
119
|
activesupport (>= 4.2.5)
|
119
120
|
addressable (>= 2.3.6)
|
120
121
|
builder (~> 3.2, >= 3.2.2)
|
@@ -133,7 +134,7 @@ GEM
|
|
133
134
|
nokogiri (1.11.7)
|
134
135
|
mini_portile2 (~> 2.5.0)
|
135
136
|
racc (~> 1.4)
|
136
|
-
oj (3.
|
137
|
+
oj (3.13.8)
|
137
138
|
oj_mimic_json (1.0.1)
|
138
139
|
optimist (3.0.1)
|
139
140
|
postrank-uri (1.0.24)
|
@@ -146,7 +147,7 @@ GEM
|
|
146
147
|
rack-test (0.8.3)
|
147
148
|
rack (>= 1.0, < 3)
|
148
149
|
rake (13.0.3)
|
149
|
-
rdf (3.1.
|
150
|
+
rdf (3.1.15)
|
150
151
|
hamster (~> 3.0)
|
151
152
|
link_header (~> 0.0, >= 0.0.8)
|
152
153
|
rdf-aggregate-repo (3.1.0)
|
@@ -166,7 +167,7 @@ GEM
|
|
166
167
|
rdf-turtle (3.1.3)
|
167
168
|
ebnf (~> 2.1)
|
168
169
|
rdf (~> 3.1, >= 3.1.8)
|
169
|
-
rdf-vocab (3.1.
|
170
|
+
rdf-vocab (3.1.14)
|
170
171
|
rdf (~> 3.1, >= 3.1.12)
|
171
172
|
rdf-xsd (3.1.1)
|
172
173
|
rdf (~> 3.1)
|
@@ -200,7 +201,7 @@ GEM
|
|
200
201
|
tilt (2.0.10)
|
201
202
|
tzinfo (1.2.9)
|
202
203
|
thread_safe (~> 0.1)
|
203
|
-
unicode-types (1.
|
204
|
+
unicode-types (1.7.0)
|
204
205
|
unicode_utils (1.4.0)
|
205
206
|
vcr (6.0.0)
|
206
207
|
webmock (3.13.0)
|
@@ -222,4 +223,4 @@ DEPENDENCIES
|
|
222
223
|
webmock (~> 3.0, >= 3.0.1)
|
223
224
|
|
224
225
|
BUNDLED WITH
|
225
|
-
2.2.
|
226
|
+
2.2.28
|
data/lib/orcid_client/api.rb
CHANGED
@@ -29,6 +29,7 @@ module OrcidClient
|
|
29
29
|
return OpenStruct.new(body: { "errors" => [{ "title" => "ORCID access token missing" }] }) unless orcid_token.present?
|
30
30
|
return OpenStruct.new(body: { "errors" => [{ "title" => "Put code missing" }] }) unless put_code.present?
|
31
31
|
|
32
|
+
visibility = nil
|
32
33
|
orcid_api_url = options[:sandbox] ? 'https://api.sandbox.orcid.org' : 'https://api.orcid.org'
|
33
34
|
|
34
35
|
url = "#{orcid_api_url}/v#{API_VERSION}/#{orcid}/work/#{put_code}"
|
data/lib/orcid_client/version.rb
CHANGED
data/lib/orcid_client/work.rb
CHANGED
@@ -17,7 +17,9 @@ module OrcidClient
|
|
17
17
|
|
18
18
|
include Bolognese::Utils
|
19
19
|
|
20
|
-
attr_reader :doi, :orcid, :schema, :orcid_token, :sandbox, :put_code, :validation_errors, :name_detector
|
20
|
+
attr_reader :doi, :orcid, :schema, :orcid_token, :sandbox, :put_code, :visibility, :validation_errors, :name_detector
|
21
|
+
|
22
|
+
attr_writer :visibility
|
21
23
|
|
22
24
|
def initialize(doi:, orcid:, orcid_token:, **options)
|
23
25
|
@doi = doi
|
@@ -25,6 +27,7 @@ module OrcidClient
|
|
25
27
|
@orcid_token = orcid_token
|
26
28
|
@sandbox = options.fetch(:sandbox, nil) || ENV['API_URL'] == "https://api.stage.datacite.org"
|
27
29
|
@put_code = options.fetch(:put_code, nil)
|
30
|
+
@visibility = options.fetch(:visibility, 'public')
|
28
31
|
end
|
29
32
|
|
30
33
|
SCHEMA = File.expand_path("../../../resources/record_#{API_VERSION}/work-#{API_VERSION}.xsd", __FILE__)
|
@@ -42,7 +45,7 @@ module OrcidClient
|
|
42
45
|
Array.wrap(metadata.creators).map do |contributor|
|
43
46
|
orcid = Array.wrap(contributor["nameIdentifiers"]).find { |c| c["nameIdentifierScheme"] == "ORCID" }.to_h.fetch("nameIdentifier", nil)
|
44
47
|
credit_name = contributor["familyName"].present? ? [contributor["givenName"], contributor["familyName"]].join(" ") : contributor["name"]
|
45
|
-
|
48
|
+
|
46
49
|
{ orcid: orcid,
|
47
50
|
credit_name: credit_name,
|
48
51
|
role: nil }.compact
|
@@ -179,7 +182,7 @@ module OrcidClient
|
|
179
182
|
|
180
183
|
def root_attributes
|
181
184
|
{ :'put-code' => put_code,
|
182
|
-
:'visibility' =>
|
185
|
+
:'visibility' => visibility,
|
183
186
|
:'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
184
187
|
:'xsi:schemaLocation' => 'http://www.orcid.org/ns/work ../work-3.0.xsd',
|
185
188
|
:'xmlns:common' => 'http://www.orcid.org/ns/common',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orcid_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Fenner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|