mais_orcid_client 1.0.0 → 1.0.1
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 +4 -4
- data/Gemfile.lock +21 -19
- data/README.md +1 -1
- data/lib/mais_orcid_client/version.rb +1 -1
- data/lib/mais_orcid_client.rb +1 -6
- 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: 4fd365e002189b3f5865c0f890851f47bdb96252dfec8c76036db3debfb55773
|
4
|
+
data.tar.gz: 2c1da5d83bece19afa22b0030ffe846e09de4b2d7c26ee7b8f380474e7c64d04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92a637eaf9bf68af95c7bb7d8da4de0fc38efd95c5f96c84590b342ff0e68b36da8304e3a6378a740a73c2d4cc26184b96570db340db596aa3d90d45ee3edfc1
|
7
|
+
data.tar.gz: 2c0d11e4a6bde90e0464425a0d36562f0c57f02b84217aedb4266581206a71f4804e4c788a2eee585ad46d8920acaaabbea132ca6786e34c913bee98ace88f01
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mais_orcid_client (1.0.
|
4
|
+
mais_orcid_client (1.0.1)
|
5
5
|
activesupport (>= 4.2)
|
6
6
|
faraday
|
7
7
|
faraday-retry
|
@@ -31,33 +31,33 @@ GEM
|
|
31
31
|
base64 (0.2.0)
|
32
32
|
benchmark (0.4.0)
|
33
33
|
bigdecimal (3.1.9)
|
34
|
-
byebug (
|
34
|
+
byebug (12.0.0)
|
35
35
|
concurrent-ruby (1.3.5)
|
36
|
-
connection_pool (2.5.
|
36
|
+
connection_pool (2.5.2)
|
37
37
|
crack (1.0.0)
|
38
38
|
bigdecimal
|
39
39
|
rexml
|
40
|
-
diff-lcs (1.6.
|
40
|
+
diff-lcs (1.6.1)
|
41
41
|
docile (1.4.1)
|
42
42
|
drb (2.2.1)
|
43
|
-
faraday (2.
|
43
|
+
faraday (2.13.1)
|
44
44
|
faraday-net_http (>= 2.0, < 3.5)
|
45
45
|
json
|
46
46
|
logger
|
47
47
|
faraday-net_http (3.4.0)
|
48
48
|
net-http (>= 0.5.0)
|
49
|
-
faraday-retry (2.
|
49
|
+
faraday-retry (2.3.1)
|
50
50
|
faraday (~> 2.0)
|
51
51
|
hashdiff (1.1.2)
|
52
52
|
hashie (5.0.0)
|
53
53
|
i18n (1.14.7)
|
54
54
|
concurrent-ruby (~> 1.0)
|
55
|
-
json (2.
|
55
|
+
json (2.11.3)
|
56
56
|
jwt (2.10.1)
|
57
57
|
base64
|
58
58
|
language_server-protocol (3.17.0.4)
|
59
59
|
lint_roller (1.1.0)
|
60
|
-
logger (1.
|
60
|
+
logger (1.7.0)
|
61
61
|
minitest (5.25.5)
|
62
62
|
multi_xml (0.7.1)
|
63
63
|
bigdecimal (~> 3.1)
|
@@ -71,13 +71,14 @@ GEM
|
|
71
71
|
snaky_hash (~> 2.0)
|
72
72
|
version_gem (~> 1.1)
|
73
73
|
ostruct (0.6.1)
|
74
|
-
parallel (1.
|
75
|
-
parser (3.3.
|
74
|
+
parallel (1.27.0)
|
75
|
+
parser (3.3.8.0)
|
76
76
|
ast (~> 2.4.1)
|
77
77
|
racc
|
78
|
+
prism (1.4.0)
|
78
79
|
public_suffix (6.0.1)
|
79
80
|
racc (1.8.1)
|
80
|
-
rack (3.1.
|
81
|
+
rack (3.1.13)
|
81
82
|
rainbow (3.1.1)
|
82
83
|
rake (13.2.1)
|
83
84
|
regexp_parser (2.10.0)
|
@@ -95,7 +96,7 @@ GEM
|
|
95
96
|
diff-lcs (>= 1.2.0, < 2.0)
|
96
97
|
rspec-support (~> 3.13.0)
|
97
98
|
rspec-support (3.13.2)
|
98
|
-
rubocop (1.
|
99
|
+
rubocop (1.75.3)
|
99
100
|
json (~> 2.3)
|
100
101
|
language_server-protocol (~> 3.17.0.2)
|
101
102
|
lint_roller (~> 1.1.0)
|
@@ -103,22 +104,23 @@ GEM
|
|
103
104
|
parser (>= 3.3.0.2)
|
104
105
|
rainbow (>= 2.2.2, < 4.0)
|
105
106
|
regexp_parser (>= 2.9.3, < 3.0)
|
106
|
-
rubocop-ast (>= 1.
|
107
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
107
108
|
ruby-progressbar (~> 1.7)
|
108
109
|
unicode-display_width (>= 2.4.0, < 4.0)
|
109
|
-
rubocop-ast (1.
|
110
|
+
rubocop-ast (1.44.1)
|
110
111
|
parser (>= 3.3.7.2)
|
112
|
+
prism (~> 1.4)
|
111
113
|
rubocop-capybara (2.22.1)
|
112
114
|
lint_roller (~> 1.1)
|
113
115
|
rubocop (~> 1.72, >= 1.72.1)
|
114
116
|
rubocop-factory_bot (2.27.1)
|
115
117
|
lint_roller (~> 1.1)
|
116
118
|
rubocop (~> 1.72, >= 1.72.1)
|
117
|
-
rubocop-performance (1.
|
119
|
+
rubocop-performance (1.25.0)
|
118
120
|
lint_roller (~> 1.1)
|
119
|
-
rubocop (>= 1.
|
121
|
+
rubocop (>= 1.75.0, < 2.0)
|
120
122
|
rubocop-ast (>= 1.38.0, < 2.0)
|
121
|
-
rubocop-rspec (3.
|
123
|
+
rubocop-rspec (3.6.0)
|
122
124
|
lint_roller (~> 1.1)
|
123
125
|
rubocop (~> 1.72, >= 1.72.1)
|
124
126
|
rubocop-rspec_rails (2.31.0)
|
@@ -144,7 +146,7 @@ GEM
|
|
144
146
|
uri (1.0.3)
|
145
147
|
vcr (6.3.1)
|
146
148
|
base64
|
147
|
-
version_gem (1.1.
|
149
|
+
version_gem (1.1.7)
|
148
150
|
webmock (3.25.1)
|
149
151
|
addressable (>= 2.8.0)
|
150
152
|
crack (>= 0.3.2)
|
@@ -175,4 +177,4 @@ DEPENDENCIES
|
|
175
177
|
webmock
|
176
178
|
|
177
179
|
BUNDLED WITH
|
178
|
-
2.6.
|
180
|
+
2.6.8
|
data/README.md
CHANGED
@@ -78,7 +78,7 @@ To record new cassettes:
|
|
78
78
|
2. Add your new spec with a new cassette name (or delete a previous cassette to re-create it).
|
79
79
|
3. Run just that new spec (important: else previous specs may use cassettes that have redacted credentials, causing your new spec to fail).
|
80
80
|
4. You should get a new cassette with the name you specified in the spec.
|
81
|
-
5. The cassette should have access tokens and secrets sanitized by the config in `spec_helper.rb`, but you can double check.
|
81
|
+
5. The cassette should have access tokens and secrets sanitized by the config in `spec_helper.rb`, but you can double check. The one exception is the access_token for each ORCID user, these need to be set to "private_access_token" in the cassette manually, as VCR filter_sensitive_data can only replace the first instance.
|
82
82
|
6. Set your configuration at the top of the spec back to the fake client_id and client_secret values.
|
83
83
|
7. The spec that checks for a raised exception when fetching all users may need to be handcrafted in the cassette to look it raised a 500. It's hard to get the actual URL to produce a 500 on this call.
|
84
84
|
7. Re-run all the specs - they should pass now without making real calls.
|
data/lib/mais_orcid_client.rb
CHANGED
@@ -64,9 +64,8 @@ class MaisOrcidClient
|
|
64
64
|
result[:last_updated])
|
65
65
|
return orcid_users if limit && limit == orcid_users.size
|
66
66
|
end
|
67
|
-
# Currently next is always present, even on last page. (This may be changed in future.)
|
68
67
|
next_page = response.dig(:links, :next)
|
69
|
-
return orcid_users if
|
68
|
+
return orcid_users if next_page.nil? || next_page.empty?
|
70
69
|
end
|
71
70
|
end
|
72
71
|
# rubocop:enable Metrics/MethodLength
|
@@ -114,10 +113,6 @@ class MaisOrcidClient
|
|
114
113
|
path
|
115
114
|
end
|
116
115
|
|
117
|
-
def last_page?(links)
|
118
|
-
links[:self] == links[:last]
|
119
|
-
end
|
120
|
-
|
121
116
|
# rubocop:disable Metrics/MethodLength
|
122
117
|
def get_response(path, allow404: false)
|
123
118
|
TokenWrapper.refresh(config) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mais_orcid_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Mangiafico
|
8
8
|
- Justin Littman
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|