orcid_client 0.3.3 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.env.example +1 -1
- data/Gemfile.lock +85 -81
- data/lib/orcid_client/api.rb +1 -1
- data/lib/orcid_client/base.rb +3 -2
- data/lib/orcid_client/external_identifier.rb +1 -1
- data/lib/orcid_client/notification.rb +1 -1
- data/lib/orcid_client/version.rb +1 -1
- data/lib/orcid_client/work.rb +6 -5
- data/orcid_client.gemspec +3 -3
- data/resources/README.md +131 -0
- data/resources/{common_2.0/common-2.0.xsd → common_2.1/common-2.1.xsd} +2 -2
- data/resources/{common_2.0/samples/common-2.0.xml → common_2.1/samples/common-2.1.xml} +2 -2
- data/resources/{notification_2.0 → notification_2.1}/README.md +10 -10
- data/resources/{notification_2.0/notification-custom-2.0.xsd → notification_2.1/notification-custom-2.1.xsd} +1 -1
- data/resources/{notification_2.0/notification-permission-2.0.xsd → notification_2.1/notification-permission-2.1.xsd} +3 -3
- data/resources/{notification_2.0/samples/notification-custom-2.0.xml → notification_2.1/samples/notification-custom-2.1.xml} +2 -2
- data/resources/{notification_2.0/samples/notification-permission-2.0.xml → notification_2.1/samples/notification-permission-2.1.xml} +2 -2
- data/resources/orcid-error-1.0.xsd +69 -0
- data/resources/{record_2.0 → record_2.1}/README.md +154 -155
- data/resources/{record_2.0/activities-2.0.xsd → record_2.1/activities-2.1.xsd} +6 -6
- data/resources/{record_2.0/address-2.0.xsd → record_2.1/address-2.1.xsd} +1 -1
- data/resources/{record_2.0/bulk-2.0.xsd → record_2.1/bulk-2.1.xsd} +2 -2
- data/resources/{record_2.0/education-2.0.xsd → record_2.1/education-2.1.xsd} +1 -1
- data/resources/{record_2.0/email-2.0.xsd → record_2.1/email-2.1.xsd} +1 -1
- data/resources/{record_2.0/employment-2.0.xsd → record_2.1/employment-2.1.xsd} +1 -1
- data/resources/{record_2.0/error-2.0.xsd → record_2.1/error-2.1.xsd} +0 -0
- data/resources/{record_2.0/funding-2.0.xsd → record_2.1/funding-2.1.xsd} +1 -1
- data/resources/{record_2.0/history-2.0.xsd → record_2.1/history-2.1.xsd} +1 -1
- data/resources/{record_2.0/keyword-2.0.xsd → record_2.1/keyword-2.1.xsd} +1 -1
- data/resources/{record_2.0/other-name-2.0.xsd → record_2.1/other-name-2.1.xsd} +1 -1
- data/resources/{record_2.0/peer-review-2.0.xsd → record_2.1/peer-review-2.1.xsd} +2 -2
- data/resources/{record_2.0/peer-review-guide-v2.0.md → record_2.1/peer-review-guide-v2.1.md} +17 -17
- data/resources/{record_2.0/person-2.0.xsd → record_2.1/person-2.1.xsd} +9 -9
- data/resources/{record_2.0/person-external-identifier-2.0.xsd → record_2.1/person-external-identifier-2.1.xsd} +1 -1
- data/resources/{record_2.0/personal-details-2.0.xsd → record_2.1/personal-details-2.1.xsd} +3 -3
- data/resources/{record_2.0/preferences-2.0.xsd → record_2.1/preferences-2.1.xsd} +1 -1
- data/resources/{record_2.0/record-2.0.xsd → record_2.1/record-2.1.xsd} +11 -11
- data/resources/{record_2.0/researcher-url-2.0.xsd → record_2.1/researcher-url-2.1.xsd} +1 -1
- data/resources/{record_2.0/samples/read_samples/activities-2.0.xml → record_2.1/samples/read_samples/activities-2.1.xml} +12 -12
- data/resources/{record_2.0/samples/read_samples/address-2.0.xml → record_2.1/samples/read_samples/address-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/addresses-2.0.xml → record_2.1/samples/read_samples/addresses-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/biography-2.0.xml → record_2.1/samples/read_samples/biography-2.1.xml} +2 -2
- data/resources/{record_2.0 → record_2.1}/samples/read_samples/bulk-work-error.xml +2 -2
- data/resources/{record_2.0/samples/read_samples/credit-name-2.0.xml → record_2.1/samples/read_samples/credit-name-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/read_samples/education-2.0.xml → record_2.1/samples/read_samples/education-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/education-full-2.0.xml → record_2.1/samples/read_samples/education-full-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/educations-2.0.xml → record_2.1/samples/read_samples/educations-2.1.xml} +4 -4
- data/resources/{record_2.0/samples/read_samples/email-2.0.xml → record_2.1/samples/read_samples/email-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/emails-2.0.xml → record_2.1/samples/read_samples/emails-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/employment-2.0.xml → record_2.1/samples/read_samples/employment-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/employment-full-2.0.xml → record_2.1/samples/read_samples/employment-full-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/employments-2.0.xml → record_2.1/samples/read_samples/employments-2.1.xml} +4 -4
- data/resources/{record_2.0/samples/read_samples/error-2.0.xml → record_2.1/samples/read_samples/error-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/read_samples/external-identifier-2.0.xml → record_2.1/samples/read_samples/external-identifier-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/external-identifiers-2.0.xml → record_2.1/samples/read_samples/external-identifiers-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/funding-2.0.xml → record_2.1/samples/read_samples/funding-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/funding-full-2.0.xml → record_2.1/samples/read_samples/funding-full-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/fundings-2.0.xml → record_2.1/samples/read_samples/fundings-2.1.xml} +4 -4
- data/resources/{record_2.0/samples/read_samples/history-2.0.xml → record_2.1/samples/read_samples/history-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/keyword-2.0.xml → record_2.1/samples/read_samples/keyword-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/keywords-2.0.xml → record_2.1/samples/read_samples/keywords-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/name-2.0.xml → record_2.1/samples/read_samples/name-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/read_samples/other-name-2.0.xml → record_2.1/samples/read_samples/other-name-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/other-names-2.0.xml → record_2.1/samples/read_samples/other-names-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/peer-review-2.0.xml → record_2.1/samples/read_samples/peer-review-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/peer-review-full-2.0.xml → record_2.1/samples/read_samples/peer-review-full-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/peer-reviews-2.0.xml → record_2.1/samples/read_samples/peer-reviews-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/person-2.0.xml → record_2.1/samples/read_samples/person-2.1.xml} +7 -7
- data/resources/{record_2.0/samples/read_samples/personal-details-2.0.xml → record_2.1/samples/read_samples/personal-details-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/preferences-2.0.xml → record_2.1/samples/read_samples/preferences-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/read_samples/record-2.0.xml → record_2.1/samples/read_samples/record-2.1.xml} +14 -14
- data/resources/{record_2.0/samples/read_samples/researcher-url-2.0.xml → record_2.1/samples/read_samples/researcher-url-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/researcher-urls-2.0.xml → record_2.1/samples/read_samples/researcher-urls-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/search-2.0.xml → record_2.1/samples/read_samples/search-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/read_samples/work-2.0.xml → record_2.1/samples/read_samples/work-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/work-full-2.0.xml → record_2.1/samples/read_samples/work-full-2.1.xml} +3 -3
- data/resources/{record_2.0/samples/read_samples/works-2.0.xml → record_2.1/samples/read_samples/works-2.1.xml} +4 -4
- data/resources/{record_2.0/samples/write_sample/address-2.0.xml → record_2.1/samples/write_samples/address-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/bulk-work-2.0.json → record_2.1/samples/write_samples/bulk-work-2.1.json} +0 -0
- data/resources/{record_2.0/samples/write_sample/bulk-work-2.0.xml → record_2.1/samples/write_samples/bulk-work-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/education-2.0.xml → record_2.1/samples/write_samples/education-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/employment-2.0.xml → record_2.1/samples/write_samples/employment-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/external-identifier-2.0.xml → record_2.1/samples/write_samples/external-identifier-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/funding-2.0.xml → record_2.1/samples/write_samples/funding-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/keyword-2.0.xml → record_2.1/samples/write_samples/keyword-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/other-name-2.0.xml → record_2.1/samples/write_samples/other-name-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/peer-review-full-2.0.xml → record_2.1/samples/write_samples/peer-review-full-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/peer-review-simple-2.0.xml → record_2.1/samples/write_samples/peer-review-simple-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/researcher-url-2.0.xml → record_2.1/samples/write_samples/researcher-url-2.1.xml} +1 -1
- data/resources/{record_2.0/samples/write_sample/work-full-2.0.xml → record_2.1/samples/write_samples/work-full-2.1.xml} +2 -2
- data/resources/{record_2.0/samples/write_sample/work-simple-2.0.xml → record_2.1/samples/write_samples/work-simple-2.1.xml} +1 -1
- data/resources/{record_2.0/search-2.0.xsd → record_2.1/search-2.1.xsd} +1 -1
- data/resources/{record_2.0/work-2.0.xsd → record_2.1/work-2.1.xsd} +2 -2
- data/resources/xml.xsd +286 -0
- data/spec/api_spec.rb +9 -9
- data/spec/author_spec.rb +1 -1
- data/spec/external_identifier_spec.rb +2 -2
- data/spec/fixtures/external_identifier.xml +1 -1
- data/spec/fixtures/vcr_cassettes/OrcidClient/external_identifier/delete/should_delete_external_identifier.yml +6 -6
- data/spec/fixtures/vcr_cassettes/OrcidClient/external_identifier/post/should_create_external_identifier.yml +8 -8
- data/spec/fixtures/vcr_cassettes/OrcidClient/notifications/delete/should_delete_notification.yml +11 -15
- data/spec/fixtures/vcr_cassettes/OrcidClient/notifications/get/should_get_notification.yml +10 -15
- data/spec/fixtures/vcr_cassettes/OrcidClient/notifications/post/should_create_notification.yml +48 -57
- data/spec/fixtures/vcr_cassettes/OrcidClient/works/delete/should_delete_work.yml +6 -6
- data/spec/fixtures/vcr_cassettes/OrcidClient/works/get/should_get_works.yml +6 -614
- data/spec/fixtures/vcr_cassettes/OrcidClient/works/post/should_create_work.yml +48 -55
- data/spec/fixtures/vcr_cassettes/OrcidClient/works/put/should_update_work.yml +51 -62
- data/spec/fixtures/vcr_cassettes/OrcidClient_Notification/data.yml +41 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Notification/schema/validates_data.yml +41 -50
- data/spec/fixtures/vcr_cassettes/OrcidClient_Notification/schema/validates_item_type_work.yml +51 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/contributors/literal.yml +41 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/contributors/multiple_titles.yml +51 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/contributors/valid.yml +41 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/contributors/with_ORCID_IDs.yml +55 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/data.yml +41 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/publication_date.yml +41 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/schema/validates_ORCID_IDs_for_contributors.yml +55 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/schema/validates_data.yml +41 -52
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/schema/validates_work_from_DataCite_test_system.yml +41 -60
- data/spec/fixtures/vcr_cassettes/OrcidClient_Work/schema/validates_work_type_data-set.yml +51 -52
- data/spec/fixtures/work.xml +1 -1
- data/spec/notification_spec.rb +3 -3
- data/spec/work_spec.rb +16 -17
- metadata +100 -103
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 59481495c710df2ed1a634fd0a355b73187767cb3b6bd7ebce7442e087db559b
|
4
|
+
data.tar.gz: 43c60864e1dd8fe3bb4a0d810d9b275f8905d320e9180cd307dbd7dd685bc94f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92ce725ede978a6575ce215620f2b28eedb404ae60b4bfa7fb9ba02cb952cd270166912971fe2c114c9eb736e47ef205cd595906690d7aad11d6a38dfd59ba8b
|
7
|
+
data.tar.gz: a3b9133205206e113ae0b08d70c108273e41e19e0be338f023384554f41c64c047fdcee756ac977cb3b6645cb02ca1578b2767aab277335076a921daf4755427
|
data/.env.example
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,41 +1,43 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
orcid_client (0.
|
4
|
+
orcid_client (0.4.1)
|
5
5
|
activesupport (>= 4.2.5, < 6)
|
6
|
-
bolognese (~> 0.9.
|
6
|
+
bolognese (~> 0.9.93)
|
7
7
|
builder (~> 3.2, >= 3.2.2)
|
8
8
|
dotenv (~> 2.1, >= 2.1.1)
|
9
|
-
maremma (
|
9
|
+
maremma (>= 3.5.7, < 5)
|
10
10
|
namae (~> 0.11.3)
|
11
|
-
nokogiri (~> 1.
|
11
|
+
nokogiri (~> 1.8.1)
|
12
12
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activesupport (5.
|
16
|
+
activesupport (5.2.0)
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
-
i18n (
|
18
|
+
i18n (>= 0.7, < 2)
|
19
19
|
minitest (~> 5.1)
|
20
20
|
tzinfo (~> 1.1)
|
21
|
-
addressable (2.5.
|
22
|
-
public_suffix (
|
21
|
+
addressable (2.5.2)
|
22
|
+
public_suffix (>= 2.0.2, < 4.0)
|
23
23
|
benchmark_methods (0.7)
|
24
|
-
bibtex-ruby (4.4.
|
24
|
+
bibtex-ruby (4.4.6)
|
25
25
|
latex-decode (~> 0.0)
|
26
|
-
bolognese (0.9.
|
26
|
+
bolognese (0.9.93)
|
27
27
|
activesupport (>= 4.2.5, < 6)
|
28
28
|
benchmark_methods (~> 0.7)
|
29
29
|
bibtex-ruby (~> 4.1)
|
30
30
|
builder (~> 3.2, >= 3.2.2)
|
31
31
|
colorize (~> 0.8.1)
|
32
32
|
gender_detector (~> 0.1.2)
|
33
|
+
iso8601 (~> 0.9.1)
|
33
34
|
json-ld (~> 2.1, >= 2.1.2)
|
34
35
|
jsonlint (~> 0.2.0)
|
35
36
|
loofah (~> 2.0, >= 2.0.3)
|
36
|
-
maremma (
|
37
|
+
maremma (>= 3.5.7, < 5)
|
37
38
|
namae (~> 0.11.3)
|
38
|
-
nokogiri (~> 1.
|
39
|
+
nokogiri (~> 1.8.1)
|
40
|
+
oj (>= 2.8.3)
|
39
41
|
postrank-uri (~> 1.0, >= 1.0.18)
|
40
42
|
rdf-rdfxml (~> 2.0)
|
41
43
|
rdf-turtle (~> 2.2)
|
@@ -47,122 +49,124 @@ GEM
|
|
47
49
|
concurrent-ruby (1.0.5)
|
48
50
|
crack (0.4.3)
|
49
51
|
safe_yaml (~> 1.0.0)
|
52
|
+
crass (1.0.4)
|
50
53
|
diff-lcs (1.3)
|
51
54
|
docile (1.1.5)
|
52
|
-
dotenv (2.2.
|
53
|
-
ebnf (1.1.
|
54
|
-
rdf (
|
55
|
+
dotenv (2.2.2)
|
56
|
+
ebnf (1.1.2)
|
57
|
+
rdf (>= 2.2, < 4.0)
|
55
58
|
sxp (~> 1.0)
|
56
|
-
excon (0.
|
57
|
-
faraday (0.
|
59
|
+
excon (0.62.0)
|
60
|
+
faraday (0.14.0)
|
58
61
|
multipart-post (>= 1.2, < 3)
|
59
62
|
faraday-encoding (0.0.4)
|
60
63
|
faraday
|
61
|
-
faraday_middleware (0.
|
64
|
+
faraday_middleware (0.12.2)
|
62
65
|
faraday (>= 0.7.4, < 1.0)
|
63
66
|
gender_detector (0.1.2)
|
64
67
|
unicode_utils (>= 1.3.0)
|
65
|
-
haml (5.0.
|
68
|
+
haml (5.0.4)
|
66
69
|
temple (>= 0.8.0)
|
67
70
|
tilt
|
68
71
|
hamster (3.0.0)
|
69
72
|
concurrent-ruby (~> 1.0)
|
70
|
-
hashdiff (0.3.
|
73
|
+
hashdiff (0.3.7)
|
71
74
|
htmlentities (4.3.4)
|
72
|
-
i18n (0.
|
75
|
+
i18n (1.0.0)
|
76
|
+
concurrent-ruby (~> 1.0)
|
77
|
+
iso8601 (0.9.1)
|
73
78
|
json (2.1.0)
|
74
|
-
json-ld (2.1
|
79
|
+
json-ld (2.2.1)
|
75
80
|
multi_json (~> 1.12)
|
76
|
-
rdf (
|
81
|
+
rdf (>= 2.2.8, < 4.0)
|
77
82
|
jsonlint (0.2.0)
|
78
83
|
oj (~> 2)
|
79
84
|
trollop (~> 2)
|
80
|
-
latex-decode (0.
|
81
|
-
unicode (~> 0.4)
|
85
|
+
latex-decode (0.3.1)
|
82
86
|
link_header (0.0.8)
|
83
|
-
loofah (2.
|
87
|
+
loofah (2.2.2)
|
88
|
+
crass (~> 1.0.2)
|
84
89
|
nokogiri (>= 1.5.9)
|
85
|
-
maremma (
|
86
|
-
activesupport (>= 4.2.5)
|
90
|
+
maremma (4.0.5)
|
91
|
+
activesupport (>= 4.2.5, < 6)
|
87
92
|
addressable (>= 2.3.6)
|
88
93
|
builder (~> 3.2, >= 3.2.2)
|
89
|
-
excon (~> 0.
|
90
|
-
faraday (~> 0.
|
91
|
-
faraday-encoding (~> 0.0.
|
92
|
-
faraday_middleware (~> 0.
|
94
|
+
excon (~> 0.60)
|
95
|
+
faraday (~> 0.14)
|
96
|
+
faraday-encoding (~> 0.0.4)
|
97
|
+
faraday_middleware (~> 0.12.0)
|
93
98
|
multi_json (~> 1.12)
|
94
|
-
nokogiri (~> 1.
|
95
|
-
oj (
|
96
|
-
mini_portile2 (2.
|
97
|
-
minitest (5.
|
98
|
-
multi_json (1.
|
99
|
+
nokogiri (~> 1.8.1)
|
100
|
+
oj (>= 2.8.3)
|
101
|
+
mini_portile2 (2.3.0)
|
102
|
+
minitest (5.11.3)
|
103
|
+
multi_json (1.13.1)
|
99
104
|
multipart-post (2.0.0)
|
100
105
|
namae (0.11.3)
|
101
|
-
nokogiri (1.
|
102
|
-
mini_portile2 (~> 2.
|
106
|
+
nokogiri (1.8.2)
|
107
|
+
mini_portile2 (~> 2.3.0)
|
103
108
|
oj (2.18.5)
|
104
|
-
postrank-uri (1.0.
|
109
|
+
postrank-uri (1.0.23)
|
105
110
|
addressable (>= 2.3.0, < 2.6)
|
106
|
-
nokogiri (>= 1.6.1, < 1.
|
111
|
+
nokogiri (>= 1.6.1, < 1.9)
|
107
112
|
public_suffix (>= 2.0.0, < 2.1)
|
108
113
|
public_suffix (2.0.5)
|
109
|
-
rack (2.0.
|
110
|
-
rack-test (0.
|
111
|
-
rack (>= 1.0)
|
112
|
-
rake (12.
|
113
|
-
rdf (
|
114
|
+
rack (2.0.4)
|
115
|
+
rack-test (0.8.3)
|
116
|
+
rack (>= 1.0, < 3)
|
117
|
+
rake (12.3.1)
|
118
|
+
rdf (3.0.2)
|
114
119
|
hamster (~> 3.0)
|
115
120
|
link_header (~> 0.0, >= 0.0.8)
|
116
|
-
rdf-aggregate-repo (2.2.
|
117
|
-
rdf (
|
118
|
-
rdf-rdfa (
|
121
|
+
rdf-aggregate-repo (2.2.1)
|
122
|
+
rdf (>= 2.2, < 4.0)
|
123
|
+
rdf-rdfa (3.0.1)
|
119
124
|
haml (~> 5.0)
|
120
125
|
htmlentities (~> 4.3)
|
121
|
-
rdf (~>
|
122
|
-
rdf-aggregate-repo (
|
123
|
-
rdf-xsd (~>
|
124
|
-
rdf-rdfxml (2.
|
126
|
+
rdf (~> 3.0)
|
127
|
+
rdf-aggregate-repo (>= 2.2, < 4.0)
|
128
|
+
rdf-xsd (~> 3.0)
|
129
|
+
rdf-rdfxml (2.2.1)
|
125
130
|
htmlentities (~> 4.3)
|
126
|
-
rdf (
|
127
|
-
rdf-rdfa (
|
128
|
-
rdf-xsd (
|
129
|
-
rdf-turtle (2.2.
|
131
|
+
rdf (>= 2.2, < 4.0)
|
132
|
+
rdf-rdfa (>= 2.2, < 4.0)
|
133
|
+
rdf-xsd (>= 2.2, < 4.0)
|
134
|
+
rdf-turtle (2.2.2)
|
130
135
|
ebnf (~> 1.1)
|
131
|
-
rdf (
|
132
|
-
rdf-xsd (
|
133
|
-
rdf (~>
|
134
|
-
rspec (3.
|
135
|
-
rspec-core (~> 3.
|
136
|
-
rspec-expectations (~> 3.
|
137
|
-
rspec-mocks (~> 3.
|
138
|
-
rspec-core (3.
|
139
|
-
rspec-support (~> 3.
|
140
|
-
rspec-expectations (3.
|
136
|
+
rdf (>= 2.2, < 4.0)
|
137
|
+
rdf-xsd (3.0.0)
|
138
|
+
rdf (~> 3.0)
|
139
|
+
rspec (3.7.0)
|
140
|
+
rspec-core (~> 3.7.0)
|
141
|
+
rspec-expectations (~> 3.7.0)
|
142
|
+
rspec-mocks (~> 3.7.0)
|
143
|
+
rspec-core (3.7.1)
|
144
|
+
rspec-support (~> 3.7.0)
|
145
|
+
rspec-expectations (3.7.0)
|
141
146
|
diff-lcs (>= 1.2.0, < 2.0)
|
142
|
-
rspec-support (~> 3.
|
143
|
-
rspec-mocks (3.
|
147
|
+
rspec-support (~> 3.7.0)
|
148
|
+
rspec-mocks (3.7.0)
|
144
149
|
diff-lcs (>= 1.2.0, < 2.0)
|
145
|
-
rspec-support (~> 3.
|
146
|
-
rspec-support (3.
|
150
|
+
rspec-support (~> 3.7.0)
|
151
|
+
rspec-support (3.7.1)
|
147
152
|
safe_yaml (1.0.4)
|
148
153
|
simplecov (0.13.0)
|
149
154
|
docile (~> 1.1.0)
|
150
155
|
json (>= 1.8, < 3)
|
151
156
|
simplecov-html (~> 0.10.0)
|
152
|
-
simplecov-html (0.10.
|
153
|
-
sxp (1.0.
|
154
|
-
rdf (
|
157
|
+
simplecov-html (0.10.2)
|
158
|
+
sxp (1.0.1)
|
159
|
+
rdf (>= 2.2, < 4.0)
|
155
160
|
temple (0.8.0)
|
156
|
-
thor (0.
|
161
|
+
thor (0.20.0)
|
157
162
|
thread_safe (0.3.6)
|
158
|
-
tilt (2.0.
|
163
|
+
tilt (2.0.8)
|
159
164
|
trollop (2.1.2)
|
160
|
-
tzinfo (1.2.
|
165
|
+
tzinfo (1.2.5)
|
161
166
|
thread_safe (~> 0.1)
|
162
|
-
unicode (0.4.4.4)
|
163
167
|
unicode_utils (1.4.0)
|
164
|
-
vcr (
|
165
|
-
webmock (3.0
|
168
|
+
vcr (4.0.0)
|
169
|
+
webmock (3.3.0)
|
166
170
|
addressable (>= 2.3.6)
|
167
171
|
crack (>= 0.3.2)
|
168
172
|
hashdiff
|
@@ -182,4 +186,4 @@ DEPENDENCIES
|
|
182
186
|
webmock (~> 3.0, >= 3.0.1)
|
183
187
|
|
184
188
|
BUNDLED WITH
|
185
|
-
1.
|
189
|
+
1.16.1
|
data/lib/orcid_client/api.rb
CHANGED
data/lib/orcid_client/base.rb
CHANGED
@@ -10,8 +10,9 @@ module OrcidClient
|
|
10
10
|
# load ENV variables from container environment if json file exists
|
11
11
|
# see https://github.com/phusion/baseimage-docker#envvar_dumps
|
12
12
|
env_json_file = "/etc/container_environment.json"
|
13
|
-
|
14
|
-
|
13
|
+
json = File.exist?(env_json_file) ? File.read(env_json_file) : ""
|
14
|
+
if json.length >= 2
|
15
|
+
env_vars = JSON.parse(json)
|
15
16
|
env_vars.each { |k, v| ENV[k] = v }
|
16
17
|
end
|
17
18
|
|
@@ -45,7 +45,7 @@ module OrcidClient
|
|
45
45
|
{ :'put-code' => put_code,
|
46
46
|
:'visibility' => 'public',
|
47
47
|
:'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
48
|
-
:'xsi:schemaLocation' => 'http://www.orcid.org/ns/external-identifier ../person-external-identifier-2.
|
48
|
+
:'xsi:schemaLocation' => 'http://www.orcid.org/ns/external-identifier ../person-external-identifier-2.1.xsd',
|
49
49
|
:'xmlns:common' => 'http://www.orcid.org/ns/common',
|
50
50
|
:'xmlns:external-identifier' => 'http://www.orcid.org/ns/external-identifier' }.compact
|
51
51
|
end
|
@@ -107,7 +107,7 @@ module OrcidClient
|
|
107
107
|
|
108
108
|
def root_attributes
|
109
109
|
{ :'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
110
|
-
:'xsi:schemaLocation' => 'http://www.orcid.org/ns/notification ../notification-permission-2.
|
110
|
+
:'xsi:schemaLocation' => 'http://www.orcid.org/ns/notification ../notification-permission-2.1.xsd',
|
111
111
|
:'xmlns:common' => 'http://www.orcid.org/ns/common',
|
112
112
|
:'xmlns:notification' => 'http://www.orcid.org/ns/notification' }
|
113
113
|
end
|
data/lib/orcid_client/version.rb
CHANGED
data/lib/orcid_client/work.rb
CHANGED
@@ -17,30 +17,31 @@ module OrcidClient
|
|
17
17
|
|
18
18
|
include Bolognese::Utils
|
19
19
|
|
20
|
-
attr_reader :doi, :orcid, :schema, :access_token, :
|
20
|
+
attr_reader :doi, :orcid, :schema, :access_token, :sandbox, :put_code, :validation_errors, :name_detector
|
21
21
|
|
22
22
|
def initialize(doi:, orcid:, access_token:, **options)
|
23
23
|
@doi = doi
|
24
24
|
@orcid = orcid
|
25
25
|
@access_token = access_token
|
26
|
-
@
|
26
|
+
@sandbox = options.fetch(:sandbox, nil) || ENV['SOLR_URL'] == "https://search.test.datacite.org/api"
|
27
27
|
@put_code = options.fetch(:put_code, nil)
|
28
28
|
end
|
29
29
|
|
30
30
|
SCHEMA = File.expand_path("../../../resources/record_#{API_VERSION}/work-#{API_VERSION}.xsd", __FILE__)
|
31
|
+
|
31
32
|
# recognize given name. Can be loaded once as ::NameDetector, e.g. in a Rails initializer
|
32
33
|
def name_detector
|
33
34
|
@name_detector ||= defined?(::NameDetector) ? ::NameDetector : GenderDetector.new
|
34
35
|
end
|
35
36
|
|
36
37
|
def metadata
|
37
|
-
@metadata ||= Bolognese::Metadata.new(input: doi,
|
38
|
+
@metadata ||= Bolognese::Metadata.new(input: doi, sandbox: sandbox)
|
38
39
|
end
|
39
40
|
|
40
41
|
def contributors
|
41
42
|
Array.wrap(metadata.author).map do |contributor|
|
42
43
|
orcid = validate_orcid(contributor.fetch('id', nil))
|
43
|
-
orcid = "
|
44
|
+
orcid = "https://orcid.org/#{orcid}" if orcid.present?
|
44
45
|
|
45
46
|
{ orcid: orcid,
|
46
47
|
credit_name: contributor.fetch('name', nil),
|
@@ -179,7 +180,7 @@ module OrcidClient
|
|
179
180
|
{ :'put-code' => put_code,
|
180
181
|
:'visibility' => 'public',
|
181
182
|
:'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
182
|
-
:'xsi:schemaLocation' => 'http://www.orcid.org/ns/work ../work-2.
|
183
|
+
:'xsi:schemaLocation' => 'http://www.orcid.org/ns/work ../work-2.1.xsd',
|
183
184
|
:'xmlns:common' => 'http://www.orcid.org/ns/common',
|
184
185
|
:'xmlns:work' => 'http://www.orcid.org/ns/work' }.compact
|
185
186
|
end
|
data/orcid_client.gemspec
CHANGED
@@ -19,9 +19,9 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
21
|
# Declary dependencies here, rather than in the Gemfile
|
22
|
-
s.add_dependency 'maremma', '
|
23
|
-
s.add_dependency '
|
24
|
-
s.add_dependency '
|
22
|
+
s.add_dependency 'maremma', '>= 3.5.7', '< 5'
|
23
|
+
s.add_dependency 'nokogiri', '~> 1.8.1'
|
24
|
+
s.add_dependency 'bolognese', '~> 0.9.93'
|
25
25
|
s.add_dependency 'builder', '~> 3.2', '>= 3.2.2'
|
26
26
|
s.add_dependency 'namae', '~> 0.11.3'
|
27
27
|
s.add_dependency 'activesupport', '>= 4.2.5', '< 6'
|
data/resources/README.md
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
## ORCID Message (XSD) Readme
|
2
|
+
|
3
|
+
**Contents**
|
4
|
+
|
5
|
+
* [XSD Information](#orcid-xsd-information)
|
6
|
+
* [Active Versions & Base URLs](#active-xsd-versions-and-base-urls)
|
7
|
+
* [About XSD Updates and Versioning](#about-xsd-updates-and-versioning)
|
8
|
+
* [Staying Informed](#staying-informed)
|
9
|
+
* [Using XSD Versions](#using-xsd-versions)
|
10
|
+
* [ORCID-Message XSD Versions Table](#orcid-message-xsd-versions)
|
11
|
+
* [Getting Help](#getting-help)
|
12
|
+
|
13
|
+
---
|
14
|
+
|
15
|
+
# ORCID XSD information
|
16
|
+
|
17
|
+
##Active XSD versions and base URLs
|
18
|
+
|
19
|
+
#### XSD release version
|
20
|
+
|
21
|
+
* **[ORCID Message 2.0](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0)** - [Documentation](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/record_2.0/README.md), [Change log from 1.2](https://members.orcid.org/api/news/xsd-20-update)
|
22
|
+
* API Base URLs - PRODUCTION
|
23
|
+
* Public API: https://pub.orcid.org/v2.0/
|
24
|
+
* Member API: https://api.orcid.org/v2.0/
|
25
|
+
* API Base URLs - SANDBOX
|
26
|
+
* Public API: https://pub.sandbox.orcid.org/v2.0/
|
27
|
+
* Member API: https://api.sandbox.orcid.org/v2.0/
|
28
|
+
|
29
|
+
#### XSD release candidate(s)
|
30
|
+
|
31
|
+
* **[ORCID Message 2.0_rc4](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0_rc4)** - _Contains: Minor corrections and updates_ <br/>
|
32
|
+
* **[ORCID Message 2.0_rc3](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0_rc3)** - _Contains: bulk works, activities section endpoints_ <br/>
|
33
|
+
* **[ORCID Message 2.0_rc2](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0_rc2)** - _Contains: Person section, migrates all identifiers to external-identifier_ <br/>
|
34
|
+
* **[ORCID Message 2.0_rc1](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0_rc1)** - _Contains: Peer-review, new format XSD for activities_ <br/><br/>
|
35
|
+
* API Base URLs - PRODUCTION (replace 'X' in the URL with the rc version)
|
36
|
+
* Public API: https://pub.orcid.org/v2.0_rcX/
|
37
|
+
* Member API: https://api.orcid.org/v2.0_rcX/
|
38
|
+
* API Base URLs - SANDBOX
|
39
|
+
* Public API: https://pub.sandbox.orcid.org/v2.0_rcX/
|
40
|
+
* Member API: https://api.sandbox.orcid.org/v2.0_rcX/
|
41
|
+
|
42
|
+
#### XSD deprecated versions
|
43
|
+
|
44
|
+
* **[ORCID Message 1.2](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.2.xsd)**
|
45
|
+
* API Base URLs - PRODUCTION
|
46
|
+
* Public API: https://pub.orcid.org/v1.2/
|
47
|
+
* Member API: https://api.orcid.org/v1.2/
|
48
|
+
* API Base URLs - SANDBOX
|
49
|
+
* Public API: https://pub.sandbox.orcid.org/v1.2/
|
50
|
+
* Member API: https://api.sandbox.orcid.org/v1.2/
|
51
|
+
|
52
|
+
|
53
|
+
#### Sunset versions (unavailable, unsupported, should not be used)
|
54
|
+
|
55
|
+
* **Version 1.0.x (includes versions 1.0.1 through 1.0.23)** <br>_Sunset Date: March 1, 2014_
|
56
|
+
* **[ORCID Message 1.1](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.1.xsd)** <br>_Sunset Date: April 1, 2015_
|
57
|
+
|
58
|
+
_NOTE:<br />API calls for member to ORCID iD holder authorization using OAuth are not affected by XSD versions. Regardless of the XSD version used, the OAuth endpoints are:_
|
59
|
+
|
60
|
+
* _[http://orcid.org/oauth/authorize](http://support.orcid.org/knowledgebase/articles/120107)_
|
61
|
+
* _[https://orcid.org/oauth/token](http://support.orcid.org/knowledgebase/articles/119985)_
|
62
|
+
|
63
|
+
|
64
|
+
# About XSD Updates and Versioning
|
65
|
+
|
66
|
+
|
67
|
+
At any one time there may be several available versions of the XSD available for use:
|
68
|
+
|
69
|
+
* _Deprecated Version(s)_ - past version(s) of the XSD. While deprecated versions may still work, developers should be migrating to a current release version. New development should not be done against deprecated versions.
|
70
|
+
* _Release Version(s)_ - the XSD version you should be actively migrating to in order to take advantage of either improvements or new functionality.
|
71
|
+
* _One or more Release Candidates_ - these versions of the XSD contain in-progress improvements and functionality. They are made available to enable API users to take advantage of new functionality faster than waiting for the next Release Version. These versions are subject to change at any time.
|
72
|
+
|
73
|
+
_Which XSD version should I be using?_
|
74
|
+
|
75
|
+
The XSD version you should use depends on what you are trying to do. Most developers will use a current Release Version, or be actively migrating to one. However, if you are developing an integration that takes advantage of new functionality or improvement, you likely will need to use one of the Release Candidates.
|
76
|
+
|
77
|
+
## Staying informed
|
78
|
+
|
79
|
+
You can stay informed of updates to the XSD and API by subscribing to our [API Users Group](https://groups.google.com/forum/?fromgroups#!forum/orcid-api-users) mailing list and forum.
|
80
|
+
|
81
|
+
## Using XSD versions
|
82
|
+
|
83
|
+
### <a name="deprecatedVersion"></a>Deprecated version(s)
|
84
|
+
|
85
|
+
The deprecated version(s) of the XSD are former versions of the XSD. If you are using a deprecated version, you should be planning a migration to move to a release version. Other things of note about deprecated versions:
|
86
|
+
|
87
|
+
* An XSD that has changed to deprecated status will not be removed immediately, though we are actively encouraging all developers to move to the current release version.
|
88
|
+
* Developers on deprecated versions should refer to the migration notes to assist in moving to the latest release version.
|
89
|
+
* Future functionality will not be supported in deprecated versions.
|
90
|
+
* Future versions may not be backward compatible with deprecated versions.
|
91
|
+
* Deprecated versions will have a “sunset date”, after which they will no longer be supported. Developers experiencing problems with deprecated versions will be directed to move to the release version.
|
92
|
+
|
93
|
+
### <a name="releaseVersion"></a>Release version(s)
|
94
|
+
|
95
|
+
Release versions of the XSD are fully documented, tested, supported and encouraged for use. Of note about release versions:
|
96
|
+
|
97
|
+
* Our intent is for release versions of the XSD to have longer lifespans than the very fast pace of ORCID new development.
|
98
|
+
* When feasible, we will provide estimates of when the next release version is likely to be available, and what it is likely to contain.
|
99
|
+
* While more than one release version may be available at any time, we highly recommend that developers update to the latest release version at least once per year to enjoy optimal XSD stability.
|
100
|
+
|
101
|
+
### <a name="releaseCandidate"></a>Release candidate(s)
|
102
|
+
|
103
|
+
Release candidate versions of the XSD contain elements and data structures for future functionality, potential changes and other enhancements. Of note about release candidates:
|
104
|
+
|
105
|
+
* The version number of release candidates will contain ‘rc’ to indicate that they are release candidates (for example, version 1.2_rc1). The first two numbers indicate the target release version for the candidate. For example, the changes and enhancements in version 1.2_rc1 are being considered for inclusion with release version 1.2.
|
106
|
+
* Release candidates are generally unsupported, and have limited documentation.
|
107
|
+
* Elements and data structure within a release candidate XSD could change at any time based on development needs and feedback from early adopters.
|
108
|
+
* We welcome feedback from any developers working with current release candidates.
|
109
|
+
|
110
|
+
|
111
|
+
# ORCID-message XSD versions
|
112
|
+
|
113
|
+
| Version/link | Release Date | Sunset date | Notes | Who should be using this version |
|
114
|
+
| ------------ | ------------ | ----------- | ----- | -------------------------------- |
|
115
|
+
| [ORCID XSD 2.0](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0) | Feb 13, 2017 | | **[Release version](#releaseVersion)**<br><br>CURRENT SUPPORTED VERSION<br/>[Change log from 1.2](https://members.orcid.org/api/news/xsd-20-update) |This is the preferred version. All developers should be using or migrating to this version. [Documentation](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/record_2.0/README.md)|
|
116
|
+
| [ORCID XSD 2.0_rc4](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0_rc4) | Jan 24, 2017 | | **[Release candidate version](#releaseCandidate)**<br><br/>_minor fixes and corrections_ | |
|
117
|
+
| [ORCID XSD 2.0_rc3](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0_rc3) | Nov 18, 2016 | | **[Release candidate version](#releaseCandidate)**<br><br/>_adds bulk works_ | |
|
118
|
+
| [ORCID XSD 2.0_rc2](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0_rc2) | Jul 20, 2016 | | **[Release candidate version](#releaseCandidate)**<br><br/>_adds person section_ | |
|
119
|
+
| [ORCID XSD 2.0_rc1](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources/record_2.0_rc1) | Jul 01, 2015 | | **[Release candidate version](#releaseCandidate)**<br><br/>_adds peer-review section, reformats XSD for activities_ | |
|
120
|
+
| [ORCID XSD 1.2](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.2.xsd) | Jan 12, 2015 | Late 2017 | **[Deprecated version](#deprecatedVersion)**<br/><br/> | All developers on this version should migrate to version 2.0 |
|
121
|
+
| XSD 1.2_rcX | throughout 2014 | Apr 1, 2015 | **[Deprecated versions](#deprecatedVersion)**<br/><br/>[XSD 1.2_rc1](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.2_rc1.xsd): _adds elements for education or employment affiliations_<br/>[XSD 1.2_rc2](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.2_rc2.xsd): _updates the options for the creation-method field, and adds elements needed for funding_<br/>[XSD 1.2_rc3](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.2_rc3.xsd): _restricts the valid language codes to those supported by ORCID, and removes patents as a separate element (included under the works element)_<br/>[XSD 1.2_rc4](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.2_rc4.xsd): _provides more details about existing elements, email verification info, organization details that create an ORCID record, and funding agency details for funding element_<br/>[XSD 1.2_rc5](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.2_rc5.xsd): _clarifies elements for data provenance - the data source, creation date and modification date; work external IDs are required_<br/>[XSD 1.2_rc6](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.2_rc6.xsd): _adds more work types_ | These versions were sunset as of Apr 1, 2015. They are no longer available and should not be used. |
|
122
|
+
| [ORCID XSD 1.1](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/orcid-message-1.1.xsd) | Nov 25, 2013 | Apr 1, 2015 | **[Deprecated version](#deprecatedVersion)**<br><br> | This version was sunset as of Apr 1, 2015. It is no longer available and should not be used. |
|
123
|
+
| [ORCID XSD 1.0.x](https://github.com/ORCID/ORCID-Source/tree/master/orcid-model/src/main/resources) | various | Mar 1, 2014 | **Sunset version** | These versions were sunset as of March 1, 2014. They are no longer available and should not be used. _(Versions 1.0.1 - 1.0.23)_ |
|
124
|
+
|
125
|
+
# Getting help
|
126
|
+
|
127
|
+
Technical documentation is included with the read-me file for each version. [Current release documentation](https://github.com/ORCID/ORCID-Source/blob/master/orcid-model/src/main/resources/record_2.0/README.md)
|
128
|
+
|
129
|
+
The [ORCID Member Support Site](https://members.orcid.org) has additional documentation, tutorials and guides, as well as contact for our support team.
|
130
|
+
|
131
|
+
We also invite you to submit questions to the [API Users Group](https://groups.google.com/forum/?fromgroups#!forum/orcid-api-users) mailing list and forum.
|