orcid_client 0.9.8 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eccfb43c700f04c633f4d840660fc0d9a6c958ba4d6125c13abd5820613e266a
4
- data.tar.gz: d501455a85b229ab850475f59070c6322ac388bc0ccbb503890e255273dce2b1
3
+ metadata.gz: a90ef8adbe65940e9b8c10d7a8a36bff60809ee9a0931e1c9182a29effd8d002
4
+ data.tar.gz: e24d2d59c385eadc01e3fe077dc03f689117bad5baedeffe516781d469367e67
5
5
  SHA512:
6
- metadata.gz: 4e10154a60947efbef566bca680275c86eaf6b1a773df9e4e94f89b2d5f676dcdade71b33e51f6c9031c93cfd366657410566874294b81fa6e88c8d5ca406d30
7
- data.tar.gz: 995196a4ab03a592fa8afea5a86d914c36a8298caecec9aba7825b01a6b053c696ef3460dd88606507f68209ee8b840b3ee942f4d17730672dda59cdf75a2591
6
+ metadata.gz: 620a7fbb35a2b215a4ae918c075b1c587fa3024da9c8642489922f614037a1ce202a05df8164d68d83cee9d9d63d833e4f564f066ebe0cffff301413db060f02
7
+ data.tar.gz: 5e9b9454b8380742e4e01fdb738ec3b22f237c5705058cd9110ae0b8c933c8b200538d2d106340b811b3b8e29c8f7a970662b45546d26c08cf50c183d03a70e5
@@ -5,30 +5,15 @@ on:
5
5
  branches:
6
6
  - "master"
7
7
  jobs:
8
- build:
8
+ test:
9
+ uses: ./.github/workflows/ci.yml
10
+ secrets: inherit
11
+ notify:
12
+ needs: test
9
13
  runs-on: ubuntu-latest
10
14
  env:
11
15
  SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
12
16
  steps:
13
- - uses: actions/checkout@v2
14
- - name: Set up Ruby 2.6
15
- uses: actions/setup-ruby@v1
16
- with:
17
- ruby-version: 2.6.x
18
-
19
- - name: Build and test
20
- env:
21
- ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
22
- run: |
23
- gem install bundler
24
- bundle install
25
- bundle exec rspec
26
-
27
- # - name: Publish code coverage
28
- # uses: paambaati/codeclimate-action@v2.7.4
29
- # env:
30
- # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
31
-
32
17
  - name: Notify Slack
33
18
  uses: adamkdean/simple-slack-notify@1.0.4
34
19
  with:
@@ -0,0 +1,26 @@
1
+ name: Run Tests
2
+ on:
3
+ workflow_call:
4
+ secrets:
5
+ ORCID_TOKEN:
6
+ required: true
7
+ jobs:
8
+ test:
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby: ["2.6", "2.7", "3.0", "3.1"]
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Set up Ruby ${{matrix.ruby}}
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{matrix.ruby}}
20
+ bundler-cache: true
21
+
22
+ - name: Run tests
23
+ env:
24
+ ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
25
+ run: |
26
+ bundle exec rspec
@@ -0,0 +1,10 @@
1
+ name: Pull Request - Run Tests
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
+ jobs:
8
+ ci:
9
+ uses: ./.github/workflows/ci.yml
10
+ secrets: inherit
@@ -4,29 +4,24 @@ on:
4
4
  release:
5
5
  types: [published]
6
6
  jobs:
7
+ test:
8
+ uses: ./.github/workflows/ci.yml
9
+ secrets: inherit
7
10
  build:
11
+ needs: test
8
12
  runs-on: ubuntu-latest
9
13
  env:
10
14
  SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
11
15
  steps:
12
16
  - uses: actions/checkout@v2
13
17
  - name: Set up Ruby 2.6
14
- uses: actions/setup-ruby@v1
18
+ uses: ruby/setup-ruby@v1
15
19
  with:
16
- ruby-version: 2.6.x
20
+ ruby-version: "2.6"
17
21
 
18
- - name: Build and test
19
- env:
20
- ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
22
+ - name: Build
21
23
  run: |
22
- gem install bundler
23
24
  bundle install
24
- bundle exec rspec spec
25
-
26
- # - name: Publish code coverage
27
- # uses: paambaati/codeclimate-action@v2.7.4
28
- # env:
29
- # CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
30
25
 
31
26
  - name: Publish to RubyGems
32
27
  run: |
@@ -45,4 +40,4 @@ jobs:
45
40
  channel: '#ops'
46
41
  username: 'GitHub Actions'
47
42
  color: 'good'
48
- text: 'A new version of the orcid_client gem has been released.'
43
+ text: 'A new version of the orcid_client gem has been released.'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased](https://github.com/datacite/orcid_client/tree/HEAD)
4
+
5
+ [Full Changelog](https://github.com/datacite/orcid_client/compare/0.9.8...HEAD)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Version update [\#27](https://github.com/datacite/orcid_client/pull/27) ([codycooperross](https://github.com/codycooperross))
10
+ - Work type mapping updates [\#26](https://github.com/datacite/orcid_client/pull/26) ([codycooperross](https://github.com/codycooperross))
11
+ - Update Dependencies [\#20](https://github.com/datacite/orcid_client/pull/20) ([jrhoads](https://github.com/jrhoads))
12
+ - Update Github Actions [\#19](https://github.com/datacite/orcid_client/pull/19) ([jrhoads](https://github.com/jrhoads))
13
+
14
+ ## [0.9.8](https://github.com/datacite/orcid_client/tree/0.9.8) (2021-10-08)
15
+
16
+ [Full Changelog](https://github.com/datacite/orcid_client/compare/0.9.7.1...0.9.8)
17
+
3
18
  ## [0.9.7.1](https://github.com/datacite/orcid_client/tree/0.9.7.1) (2021-10-08)
4
19
 
5
20
  [Full Changelog](https://github.com/datacite/orcid_client/compare/0.9.7...0.9.7.1)
data/Gemfile.lock CHANGED
@@ -1,30 +1,30 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- orcid_client (0.9.8)
4
+ orcid_client (0.10.0)
5
5
  activesupport (>= 4.2.5, < 6)
6
6
  bolognese (~> 1.3, >= 1.9.8)
7
7
  builder (~> 3.2, >= 3.2.2)
8
8
  dotenv (~> 2.1, >= 2.1.1)
9
9
  maremma (>= 4.4)
10
10
  namae (~> 1.0.1)
11
- nokogiri (>= 1.10.4, < 1.12.0)
11
+ nokogiri (>= 1.13.9)
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activesupport (5.2.6)
16
+ activesupport (5.2.8.1)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 0.7, < 2)
19
19
  minitest (~> 5.1)
20
20
  tzinfo (~> 1.1)
21
- addressable (2.8.0)
22
- public_suffix (>= 2.0.2, < 5.0)
21
+ addressable (2.8.1)
22
+ public_suffix (>= 2.0.2, < 6.0)
23
23
  amazing_print (1.4.0)
24
24
  benchmark_methods (0.7)
25
25
  bibtex-ruby (6.0.0)
26
26
  latex-decode (~> 0.0)
27
- bolognese (1.9.12)
27
+ bolognese (1.11.0)
28
28
  activesupport (>= 4.2.5)
29
29
  benchmark_methods (~> 0.7)
30
30
  bibtex-ruby (>= 5.1.0)
@@ -34,7 +34,6 @@ GEM
34
34
  concurrent-ruby (~> 1.1, >= 1.1.5)
35
35
  csl-styles (~> 1.0, >= 1.0.1.10)
36
36
  edtf (~> 3.0, >= 3.0.4)
37
- faraday (~> 0.17.3)
38
37
  gender_detector (~> 0.1.2)
39
38
  iso8601 (~> 0.9.1)
40
39
  json-ld-preloaded (~> 3.1, >= 3.1.3)
@@ -42,7 +41,7 @@ GEM
42
41
  loofah (~> 2.0, >= 2.0.3)
43
42
  maremma (>= 4.9.4, < 5)
44
43
  namae (~> 1.0)
45
- nokogiri (~> 1.11.2)
44
+ nokogiri (>= 1.13.2, < 1.14)
46
45
  oj (~> 3.10)
47
46
  oj_mimic_json (~> 1.0, >= 1.0.1)
48
47
  postrank-uri (~> 1.0, >= 1.0.18)
@@ -56,7 +55,7 @@ GEM
56
55
  citeproc (~> 1.0, >= 1.0.9)
57
56
  csl (~> 1.6)
58
57
  colorize (0.8.1)
59
- concurrent-ruby (1.1.9)
58
+ concurrent-ruby (1.1.10)
60
59
  crack (0.4.5)
61
60
  rexml
62
61
  crass (1.0.6)
@@ -65,76 +64,86 @@ GEM
65
64
  rexml
66
65
  csl-styles (1.0.1.11)
67
66
  csl (~> 1.0)
68
- diff-lcs (1.4.4)
67
+ diff-lcs (1.5.0)
69
68
  docile (1.4.0)
70
- dotenv (2.7.6)
71
- ebnf (2.2.1)
72
- amazing_print (~> 1.2)
69
+ dotenv (2.8.1)
70
+ ebnf (2.3.1)
71
+ amazing_print (~> 1.4)
73
72
  htmlentities (~> 4.3)
74
- rdf (~> 3.1)
73
+ rdf (~> 3.2)
75
74
  scanf (~> 1.0)
76
- sxp (~> 1.1)
77
- unicode-types (~> 1.6)
78
- edtf (3.0.6)
79
- activesupport (>= 3.0, < 7.0)
75
+ sxp (~> 1.2)
76
+ unicode-types (~> 1.7)
77
+ edtf (3.1.0)
78
+ activesupport (>= 3.0, < 8.0)
80
79
  excon (0.71.1)
81
- faraday (0.17.4)
82
- multipart-post (>= 1.2, < 3)
80
+ faraday (2.6.0)
81
+ faraday-net_http (>= 2.0, < 3.1)
82
+ ruby2_keywords (>= 0.0.4)
83
83
  faraday-encoding (0.0.5)
84
84
  faraday
85
- faraday_middleware (0.14.0)
86
- faraday (>= 0.7.4, < 1.0)
85
+ faraday-excon (2.1.0)
86
+ excon (>= 0.27.4)
87
+ faraday (~> 2.0)
88
+ faraday-follow_redirects (0.3.0)
89
+ faraday (>= 1, < 3)
90
+ faraday-gzip (0.1.0)
91
+ faraday (>= 1.0)
92
+ zlib (~> 2.1)
93
+ faraday-multipart (1.0.4)
94
+ multipart-post (~> 2)
95
+ faraday-net_http (3.0.1)
87
96
  gender_detector (0.1.2)
88
97
  unicode_utils (>= 1.3.0)
89
98
  haml (5.2.2)
90
99
  temple (>= 0.8.0)
91
100
  tilt
92
- hamster (3.0.0)
93
- concurrent-ruby (~> 1.0)
94
101
  hashdiff (1.0.1)
95
102
  htmlentities (4.3.4)
96
- i18n (1.8.10)
103
+ i18n (1.12.0)
97
104
  concurrent-ruby (~> 1.0)
98
105
  iso8601 (0.9.1)
99
- json-canonicalization (0.2.1)
100
- json-ld (3.1.10)
106
+ json-canonicalization (0.3.0)
107
+ json-ld (3.2.3)
101
108
  htmlentities (~> 4.3)
102
- json-canonicalization (~> 0.2)
109
+ json-canonicalization (~> 0.3)
103
110
  link_header (~> 0.0, >= 0.0.8)
104
- multi_json (~> 1.14)
105
- rack (~> 2.0)
106
- rdf (~> 3.1)
107
- json-ld-preloaded (3.1.6)
108
- json-ld (~> 3.1)
109
- rdf (~> 3.1)
111
+ multi_json (~> 1.15)
112
+ rack (~> 2.2)
113
+ rdf (~> 3.2, >= 3.2.9)
114
+ json-ld-preloaded (3.2.2)
115
+ json-ld (~> 3.2)
116
+ rdf (~> 3.2)
110
117
  jsonlint (0.3.0)
111
118
  oj (~> 3)
112
119
  optimist (~> 3)
113
- latex-decode (0.3.2)
120
+ latex-decode (0.4.0)
114
121
  link_header (0.0.8)
115
- loofah (2.12.0)
122
+ loofah (2.19.0)
116
123
  crass (~> 1.0.2)
117
124
  nokogiri (>= 1.5.9)
118
- maremma (4.9.5)
125
+ maremma (4.9.9)
119
126
  activesupport (>= 4.2.5)
120
127
  addressable (>= 2.3.6)
121
128
  builder (~> 3.2, >= 3.2.2)
122
129
  excon (~> 0.71.0)
123
- faraday (~> 0.17.3)
124
- faraday-encoding (~> 0.0.4)
125
- faraday_middleware (~> 0.14.0)
126
- nokogiri (~> 1.11.2)
130
+ faraday (>= 2.0)
131
+ faraday-encoding (~> 0.0.5)
132
+ faraday-excon (~> 2.1.0)
133
+ faraday-follow_redirects (~> 0.3.0)
134
+ faraday-gzip (~> 0.1.0)
135
+ faraday-multipart (~> 1.0.4)
136
+ nokogiri (>= 1.13.1, < 1.14.0)
127
137
  oj (>= 2.8.3)
128
138
  oj_mimic_json (~> 1.0, >= 1.0.1)
129
- mini_portile2 (2.5.3)
130
- minitest (5.14.4)
139
+ matrix (0.4.2)
140
+ minitest (5.16.3)
131
141
  multi_json (1.15.0)
132
- multipart-post (2.1.1)
142
+ multipart-post (2.2.3)
133
143
  namae (1.0.2)
134
- nokogiri (1.11.7)
135
- mini_portile2 (~> 2.5.0)
144
+ nokogiri (1.13.9-x86_64-linux)
136
145
  racc (~> 1.4)
137
- oj (3.13.9)
146
+ oj (3.13.23)
138
147
  oj_mimic_json (1.0.1)
139
148
  optimist (3.0.1)
140
149
  postrank-uri (1.0.24)
@@ -142,75 +151,77 @@ GEM
142
151
  nokogiri (>= 1.8.0)
143
152
  public_suffix (>= 2.0.0, < 2.1)
144
153
  public_suffix (2.0.5)
145
- racc (1.5.2)
146
- rack (2.2.3)
154
+ racc (1.6.0)
155
+ rack (2.2.4)
147
156
  rack-test (0.8.3)
148
157
  rack (>= 1.0, < 3)
149
- rake (13.0.3)
150
- rdf (3.1.15)
151
- hamster (~> 3.0)
158
+ rake (13.0.6)
159
+ rdf (3.2.9)
152
160
  link_header (~> 0.0, >= 0.0.8)
153
- rdf-aggregate-repo (3.1.0)
154
- rdf (~> 3.1)
155
- rdf-rdfa (3.1.3)
161
+ rdf-aggregate-repo (3.2.1)
162
+ rdf (~> 3.2)
163
+ rdf-rdfa (3.2.0)
156
164
  haml (~> 5.2)
157
165
  htmlentities (~> 4.3)
158
- rdf (~> 3.1, >= 3.1.13)
159
- rdf-aggregate-repo (~> 3.1)
160
- rdf-vocab (~> 3.1, >= 3.1.11)
161
- rdf-xsd (~> 3.1)
162
- rdf-rdfxml (3.1.1)
166
+ rdf (~> 3.2)
167
+ rdf-aggregate-repo (~> 3.2)
168
+ rdf-vocab (~> 3.2)
169
+ rdf-xsd (~> 3.2)
170
+ rdf-rdfxml (3.2.0)
163
171
  htmlentities (~> 4.3)
164
- rdf (~> 3.1)
165
- rdf-rdfa (~> 3.1)
166
- rdf-xsd (~> 3.1)
167
- rdf-turtle (3.1.3)
168
- ebnf (~> 2.1)
169
- rdf (~> 3.1, >= 3.1.8)
170
- rdf-vocab (3.1.14)
171
- rdf (~> 3.1, >= 3.1.12)
172
- rdf-xsd (3.1.1)
173
- rdf (~> 3.1)
172
+ rdf (~> 3.2)
173
+ rdf-rdfa (~> 3.2)
174
+ rdf-xsd (~> 3.2)
175
+ rdf-turtle (3.2.1)
176
+ ebnf (~> 2.3)
177
+ rdf (~> 3.2)
178
+ rdf-vocab (3.2.3)
179
+ rdf (~> 3.2, >= 3.2.4)
180
+ rdf-xsd (3.2.1)
181
+ rdf (~> 3.2)
174
182
  rexml (~> 3.2)
175
183
  rexml (3.2.5)
176
- rspec (3.10.0)
177
- rspec-core (~> 3.10.0)
178
- rspec-expectations (~> 3.10.0)
179
- rspec-mocks (~> 3.10.0)
180
- rspec-core (3.10.1)
181
- rspec-support (~> 3.10.0)
182
- rspec-expectations (3.10.1)
184
+ rspec (3.12.0)
185
+ rspec-core (~> 3.12.0)
186
+ rspec-expectations (~> 3.12.0)
187
+ rspec-mocks (~> 3.12.0)
188
+ rspec-core (3.12.0)
189
+ rspec-support (~> 3.12.0)
190
+ rspec-expectations (3.12.0)
183
191
  diff-lcs (>= 1.2.0, < 2.0)
184
- rspec-support (~> 3.10.0)
185
- rspec-mocks (3.10.2)
192
+ rspec-support (~> 3.12.0)
193
+ rspec-mocks (3.12.0)
186
194
  diff-lcs (>= 1.2.0, < 2.0)
187
- rspec-support (~> 3.10.0)
188
- rspec-support (3.10.2)
195
+ rspec-support (~> 3.12.0)
196
+ rspec-support (3.12.0)
197
+ ruby2_keywords (0.0.5)
189
198
  scanf (1.0.0)
190
199
  simplecov (0.21.2)
191
200
  docile (~> 1.1)
192
201
  simplecov-html (~> 0.11)
193
202
  simplecov_json_formatter (~> 0.1)
194
203
  simplecov-html (0.12.3)
195
- simplecov_json_formatter (0.1.3)
196
- sxp (1.1.0)
197
- rdf (~> 3.1)
198
- temple (0.8.2)
199
- thor (1.1.0)
204
+ simplecov_json_formatter (0.1.4)
205
+ sxp (1.2.3)
206
+ matrix (~> 0.4)
207
+ rdf (~> 3.2)
208
+ temple (0.9.1)
209
+ thor (1.2.1)
200
210
  thread_safe (0.3.6)
201
- tilt (2.0.10)
202
- tzinfo (1.2.9)
211
+ tilt (2.0.11)
212
+ tzinfo (1.2.10)
203
213
  thread_safe (~> 0.1)
204
- unicode-types (1.7.0)
214
+ unicode-types (1.8.0)
205
215
  unicode_utils (1.4.0)
206
- vcr (6.0.0)
207
- webmock (3.13.0)
208
- addressable (>= 2.3.6)
216
+ vcr (6.1.0)
217
+ webmock (3.18.1)
218
+ addressable (>= 2.8.0)
209
219
  crack (>= 0.3.2)
210
220
  hashdiff (>= 0.4.0, < 2.0.0)
221
+ zlib (2.1.1)
211
222
 
212
223
  PLATFORMS
213
- ruby
224
+ x86_64-linux
214
225
 
215
226
  DEPENDENCIES
216
227
  bundler (>= 2.2.10)
@@ -223,4 +234,4 @@ DEPENDENCIES
223
234
  webmock (~> 3.0, >= 3.0.1)
224
235
 
225
236
  BUNDLED WITH
226
- 2.2.28
237
+ 2.4.10
@@ -1,3 +1,3 @@
1
1
  module OrcidClient
2
- VERSION = "0.9.8"
2
+ VERSION = "0.10.0"
3
3
  end
@@ -5,16 +5,28 @@ module OrcidClient
5
5
  TYPE_OF_WORK = {
6
6
 
7
7
  'Audiovisual' => 'other',
8
+ 'Book' => 'book',
9
+ 'BookChapter' => 'book-chapter',
8
10
  'Collection' => 'other',
11
+ 'ComputationalNotebook' => 'software',
12
+ 'ConferencePaper' => 'conference-paper',
9
13
  'Dataset' => 'data-set',
14
+ 'Dissertation' => 'dissertation-thesis',
10
15
  'Event' => 'other',
11
16
  'Image' => 'other',
12
- 'InteractiveResource' => 'online-resource',
17
+ 'InteractiveResource' => 'other',
18
+ 'Journal' => 'other',
19
+ 'JournalArticle' => 'journal-article',
13
20
  'Model' => 'other',
14
- 'PhysicalObject' => 'other',
21
+ 'OutputManagementPlan' => 'data-management-plan',
22
+ 'PeerReview' => 'review',
23
+ 'Preprint' => 'preprint',
24
+ 'PhysicalObject' => 'physical-object',
25
+ 'Report' => 'report',
15
26
  'Service' => 'other',
16
- 'Software' => 'other',
27
+ 'Software' => 'software',
17
28
  'Sound' => 'other',
29
+ 'Standard' => 'standards-and-policy',
18
30
  'Text' => 'other',
19
31
  'Workflow' => 'other',
20
32
  'Other' => 'other',
@@ -33,22 +45,24 @@ module OrcidClient
33
45
  case internal_work_subtype
34
46
  when /^(Article|Articles|Journal Article|JournalArticle)$/i
35
47
  'journal-article'
36
- when /^(Book|ebook|Monografie|Monograph\w*|)$/i
48
+ when /^(Book|ebook|Monografie|Monograph\w*)$/i
37
49
  'book'
38
50
  when /^(chapter|chapters)$/i
39
51
  'book-chapter'
40
52
  when /^(Project report|Report|Research report|Technical Report|TechnicalReport|Text\/Report|XFEL.EU Annual Report|XFEL.EU Technical Report)$/i
41
53
  'report'
42
54
  when /^(Dissertation|thesis|Doctoral thesis|Academic thesis|Master thesis|Masterthesis|Postdoctoral thesis)$/i
43
- 'dissertation'
55
+ 'dissertation-thesis'
44
56
  when /^(Conference Abstract|Conference extended abstract)$/i
45
57
  'conference-abstract'
46
58
  when /^(Conference full text|Conference paper|ConferencePaper)$/i
47
59
  'conference-paper'
48
60
  when /^(poster|Conference poster)$/i
49
61
  'conference-poster'
50
- when /^(working paper|workingpaper|preprint)$/i
62
+ when /^(working paper|workingpaper)$/i
51
63
  'working-paper'
64
+ when /^(preprint)$/i
65
+ 'preprint'
52
66
  when /^(dataset$)/i
53
67
  'data-set'
54
68
  end
@@ -56,7 +70,7 @@ module OrcidClient
56
70
  when 'Collection'
57
71
  case internal_work_subtype
58
72
  when /^(Collection of Datasets|Data Files|Dataset|Supplementary Collection of Datasets)$/i
59
- 'data-set'
73
+ 'other'
60
74
  when 'Report'
61
75
  'report'
62
76
  end
data/orcid_client.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
  s.add_dependency 'dotenv', '~> 2.1', '>= 2.1.1'
26
26
  s.add_dependency 'maremma', '>= 4.4'
27
27
  s.add_dependency 'namae', '~> 1.0.1'
28
- s.add_dependency 'nokogiri', '>= 1.10.4', '< 1.12.0'
28
+ s.add_dependency 'nokogiri', '>= 1.13.9'
29
29
  s.add_development_dependency "bundler", ">= 2.2.10"
30
30
  s.add_development_dependency 'rack-test', '~> 0'
31
31
  s.add_development_dependency 'rake'
@@ -0,0 +1,234 @@
1
+ require "spec_helper"
2
+
3
+ describe OrcidClient::Work, vcr: true do
4
+ let(:doi) { "10.5438/h5xp-x178" }
5
+ let(:orcid) { "0000-0001-6528-2027" }
6
+ let(:orcid_token) { ENV["ORCID_TOKEN"] }
7
+ let(:fixture_path) { "spec/fixtures/" }
8
+ let(:samples_path) { "resources/record_3.0/samples/read_samples/" }
9
+
10
+ subject { OrcidClient::Work.new(doi: doi, orcid: orcid, orcid_token: orcid_token) }
11
+
12
+ describe "work type" do
13
+ it "Text, Article" do
14
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
15
+ subject.metadata.types["resourceType"] = "Article"
16
+ expect(subject.type).to eq("journal-article")
17
+ end
18
+ it "Text, Book" do
19
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
20
+ subject.metadata.types["resourceType"] = "Book"
21
+ expect(subject.type).to eq("book")
22
+ end
23
+ it "Text, chapter" do
24
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
25
+ subject.metadata.types["resourceType"] = "chapter"
26
+ expect(subject.type).to eq("book-chapter")
27
+ end
28
+ it "Text, Project report" do
29
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
30
+ subject.metadata.types["resourceType"] = "Project report"
31
+ expect(subject.type).to eq("report")
32
+ end
33
+ it "Text, Dissertation" do
34
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
35
+ subject.metadata.types["resourceType"] = "Dissertation"
36
+ expect(subject.type).to eq("dissertation-thesis")
37
+ end
38
+ it "Text, Conference Abstract" do
39
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
40
+ subject.metadata.types["resourceType"] = "Conference Abstract"
41
+ expect(subject.type).to eq("conference-abstract")
42
+ end
43
+ it "Text, Conference full text" do
44
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
45
+ subject.metadata.types["resourceType"] = "Conference full text"
46
+ expect(subject.type).to eq("conference-paper")
47
+ end
48
+ it "Text, poster" do
49
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
50
+ subject.metadata.types["resourceType"] = "poster"
51
+ expect(subject.type).to eq("conference-poster")
52
+ end
53
+ it "Text, working paper" do
54
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
55
+ subject.metadata.types["resourceType"] = "working paper"
56
+ expect(subject.type).to eq("working-paper")
57
+ end
58
+ it "Text, preprint" do
59
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
60
+ subject.metadata.types["resourceType"] = "preprint"
61
+ expect(subject.type).to eq("preprint")
62
+ end
63
+ it "Text, dataset" do
64
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
65
+ subject.metadata.types["resourceType"] = "dataset"
66
+ expect(subject.type).to eq("data-set")
67
+ end
68
+ it "Collection, Collection of Datasets" do
69
+ subject.metadata.types["resourceTypeGeneral"] = "Collection"
70
+ subject.metadata.types["resourceType"] = "Collection of Datasets"
71
+ expect(subject.type).to eq("other")
72
+ end
73
+ it "Collection, Report" do
74
+ subject.metadata.types["resourceTypeGeneral"] = "Collection"
75
+ subject.metadata.types["resourceType"] = "Report"
76
+ expect(subject.type).to eq("report")
77
+ end
78
+ it "Audiovisual" do
79
+ subject.metadata.types["resourceTypeGeneral"] = "Audiovisual"
80
+ subject.metadata.types["resourceType"] = nil
81
+ expect(subject.type).to eq("other")
82
+ end
83
+ it "Collection" do
84
+ subject.metadata.types["resourceTypeGeneral"] = "Collection"
85
+ subject.metadata.types["resourceType"] = nil
86
+ expect(subject.type).to eq("other")
87
+ end
88
+ it "Dataset" do
89
+ subject.metadata.types["resourceTypeGeneral"] = "Dataset"
90
+ subject.metadata.types["resourceType"] = nil
91
+ expect(subject.type).to eq("data-set")
92
+ end
93
+ it "Event" do
94
+ subject.metadata.types["resourceTypeGeneral"] = "Event"
95
+ subject.metadata.types["resourceType"] = nil
96
+ expect(subject.type).to eq("other")
97
+ end
98
+ it "Image" do
99
+ subject.metadata.types["resourceTypeGeneral"] = "Image"
100
+ subject.metadata.types["resourceType"] = nil
101
+ expect(subject.type).to eq("other")
102
+ end
103
+ it "InteractiveResource" do
104
+ subject.metadata.types["resourceTypeGeneral"] = "InteractiveResource"
105
+ subject.metadata.types["resourceType"] = nil
106
+ expect(subject.type).to eq("other")
107
+ end
108
+ it "Model" do
109
+ subject.metadata.types["resourceTypeGeneral"] = "Model"
110
+ subject.metadata.types["resourceType"] = nil
111
+ expect(subject.type).to eq("other")
112
+ end
113
+ it "PhysicalObject" do
114
+ subject.metadata.types["resourceTypeGeneral"] = "PhysicalObject"
115
+ subject.metadata.types["resourceType"] = nil
116
+ expect(subject.type).to eq("physical-object")
117
+ end
118
+ it "Service" do
119
+ subject.metadata.types["resourceTypeGeneral"] = "Service"
120
+ subject.metadata.types["resourceType"] = nil
121
+ expect(subject.type).to eq("other")
122
+ end
123
+ it "Software" do
124
+ subject.metadata.types["resourceTypeGeneral"] = "Software"
125
+ subject.metadata.types["resourceType"] = nil
126
+ expect(subject.type).to eq("software")
127
+ end
128
+ it "Sound" do
129
+ subject.metadata.types["resourceTypeGeneral"] = "Sound"
130
+ subject.metadata.types["resourceType"] = nil
131
+ expect(subject.type).to eq("other")
132
+ end
133
+ it "Text" do
134
+ subject.metadata.types["resourceTypeGeneral"] = "Text"
135
+ subject.metadata.types["resourceType"] = nil
136
+ expect(subject.type).to eq("other")
137
+ end
138
+ it "Workflow" do
139
+ subject.metadata.types["resourceTypeGeneral"] = "Workflow"
140
+ subject.metadata.types["resourceType"] = nil
141
+ expect(subject.type).to eq("other")
142
+ end
143
+ it "Other" do
144
+ subject.metadata.types["resourceTypeGeneral"] = "Other"
145
+ subject.metadata.types["resourceType"] = nil
146
+ expect(subject.type).to eq("other")
147
+ end
148
+ it "Film" do
149
+ subject.metadata.types["resourceTypeGeneral"] = "Film"
150
+ subject.metadata.types["resourceType"] = nil
151
+ expect(subject.type).to eq("other")
152
+ end
153
+ it "Book" do
154
+ subject.metadata.types["resourceTypeGeneral"] = "Book"
155
+ subject.metadata.types["resourceType"] = nil
156
+ expect(subject.type).to eq("book")
157
+ end
158
+ it "BookChapter" do
159
+ subject.metadata.types["resourceTypeGeneral"] = "BookChapter"
160
+ subject.metadata.types["resourceType"] = nil
161
+ expect(subject.type).to eq("book-chapter")
162
+ end
163
+ it "ComputationalNotebook" do
164
+ subject.metadata.types["resourceTypeGeneral"] = "ComputationalNotebook"
165
+ subject.metadata.types["resourceType"] = nil
166
+ expect(subject.type).to eq("software")
167
+ end
168
+ it "ConferencePaper" do
169
+ subject.metadata.types["resourceTypeGeneral"] = "ConferencePaper"
170
+ subject.metadata.types["resourceType"] = nil
171
+ expect(subject.type).to eq("conference-paper")
172
+ end
173
+ it "ConferenceProceeding" do
174
+ subject.metadata.types["resourceTypeGeneral"] = "ConferenceProceeding"
175
+ subject.metadata.types["resourceType"] = nil
176
+ expect(subject.type).to eq("other")
177
+ end
178
+ it "DataPaper" do
179
+ subject.metadata.types["resourceTypeGeneral"] = "DataPaper"
180
+ subject.metadata.types["resourceType"] = nil
181
+ expect(subject.type).to eq("other")
182
+ end
183
+ it "Dissertation" do
184
+ subject.metadata.types["resourceTypeGeneral"] = "Dissertation"
185
+ subject.metadata.types["resourceType"] = nil
186
+ expect(subject.type).to eq("dissertation-thesis")
187
+ end
188
+ it "Journal" do
189
+ subject.metadata.types["resourceTypeGeneral"] = "Journal"
190
+ subject.metadata.types["resourceType"] = nil
191
+ expect(subject.type).to eq("other")
192
+ end
193
+ it "JournalArticle" do
194
+ subject.metadata.types["resourceTypeGeneral"] = "JournalArticle"
195
+ subject.metadata.types["resourceType"] = nil
196
+ expect(subject.type).to eq("journal-article")
197
+ end
198
+ it "OutputManagementPlan" do
199
+ subject.metadata.types["resourceTypeGeneral"] = "OutputManagementPlan"
200
+ subject.metadata.types["resourceType"] = nil
201
+ expect(subject.type).to eq("data-management-plan")
202
+ end
203
+ it "PeerReview" do
204
+ subject.metadata.types["resourceTypeGeneral"] = "PeerReview"
205
+ subject.metadata.types["resourceType"] = nil
206
+ expect(subject.type).to eq("review")
207
+ end
208
+ it "Preprint" do
209
+ subject.metadata.types["resourceTypeGeneral"] = "Preprint"
210
+ subject.metadata.types["resourceType"] = nil
211
+ expect(subject.type).to eq("preprint")
212
+ end
213
+ it "Report" do
214
+ subject.metadata.types["resourceTypeGeneral"] = "Report"
215
+ subject.metadata.types["resourceType"] = nil
216
+ expect(subject.type).to eq("report")
217
+ end
218
+ it "Standard" do
219
+ subject.metadata.types["resourceTypeGeneral"] = "Standard"
220
+ subject.metadata.types["resourceType"] = nil
221
+ expect(subject.type).to eq("standards-and-policy")
222
+ end
223
+ it "Instrument " do
224
+ subject.metadata.types["resourceTypeGeneral"] = "Instrument "
225
+ subject.metadata.types["resourceType"] = nil
226
+ expect(subject.type).to eq("other")
227
+ end
228
+ it "StudyRegistration" do
229
+ subject.metadata.types["resourceTypeGeneral"] = "StudyRegistration"
230
+ subject.metadata.types["resourceType"] = nil
231
+ expect(subject.type).to eq("other")
232
+ end
233
+ end
234
+ end
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.8
4
+ version: 0.10.0
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-10-08 00:00:00.000000000 Z
11
+ date: 2024-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -124,20 +124,14 @@ dependencies:
124
124
  requirements:
125
125
  - - ">="
126
126
  - !ruby/object:Gem::Version
127
- version: 1.10.4
128
- - - "<"
129
- - !ruby/object:Gem::Version
130
- version: 1.12.0
127
+ version: 1.13.9
131
128
  type: :runtime
132
129
  prerelease: false
133
130
  version_requirements: !ruby/object:Gem::Requirement
134
131
  requirements:
135
132
  - - ">="
136
133
  - !ruby/object:Gem::Version
137
- version: 1.10.4
138
- - - "<"
139
- - !ruby/object:Gem::Version
140
- version: 1.12.0
134
+ version: 1.13.9
141
135
  - !ruby/object:Gem::Dependency
142
136
  name: bundler
143
137
  requirement: !ruby/object:Gem::Requirement
@@ -252,6 +246,8 @@ files:
252
246
  - ".env.example"
253
247
  - ".github/workflows/build.yml"
254
248
  - ".github/workflows/changelog.yml"
249
+ - ".github/workflows/ci.yml"
250
+ - ".github/workflows/pull-request.yml"
255
251
  - ".github/workflows/release.yml"
256
252
  - ".gitignore"
257
253
  - CHANGELOG.md
@@ -490,6 +486,7 @@ files:
490
486
  - spec/notification_spec.rb
491
487
  - spec/spec_helper.rb
492
488
  - spec/work_spec.rb
489
+ - spec/work_type_spec.rb
493
490
  homepage: https://github.com/datacite/orcid_client
494
491
  licenses:
495
492
  - MIT