mais_orcid_client 1.0.0 → 1.0.2

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
  SHA256:
3
- metadata.gz: 37780670257a67170aacd956c9b28d77462974a7068229a221985c55993435e0
4
- data.tar.gz: bb7b89396a2ac1539d7b39dfe6732e5047312c14ae0a269e8a20b9780e434642
3
+ metadata.gz: 9b60842a9bbe8bc08194b2e6c6b055a9db9a32a9aeb5544231e71ff7ff4598fb
4
+ data.tar.gz: ce2704e0689b83d9c48ef6afd4ff0bc42277369717702055688f5a060d6d8021
5
5
  SHA512:
6
- metadata.gz: f64d3d4daa1150758535609ee01669850b03fa581e0a6089dbb40702373ab41a2189e4ddc0cdc2783ef8f5894e3b59bb8718ab5c6b376fac59bc5089325b729a
7
- data.tar.gz: 525a539b133093d30b7b3099bfadd7d149b7ee53c64b2cee364e4325e73eb7e82876c85d4d768f2b21ea88c94bec1bb2856e84da0d83ceaa3c563197c96f99af
6
+ metadata.gz: b54ad3035ff2e9bfff96b32968ed9ed678b4a8c39dfb29453ba072948d9fe907723e6d17214bae7d8078aa780daa06f716eb2e948d9b3c7bd014a0f72a179f36
7
+ data.tar.gz: bb708b2e78b9296a6911d632439da21444da63a649c1d6b365712ba5aa0f738ec7163159240e5dbc3748b9c950674b481185b2ef281affb3832696c7bc039f56
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mais_orcid_client (1.0.0)
4
+ mais_orcid_client (1.0.2)
5
5
  activesupport (>= 4.2)
6
6
  faraday
7
7
  faraday-retry
@@ -31,35 +31,35 @@ GEM
31
31
  base64 (0.2.0)
32
32
  benchmark (0.4.0)
33
33
  bigdecimal (3.1.9)
34
- byebug (11.1.3)
34
+ byebug (12.0.0)
35
35
  concurrent-ruby (1.3.5)
36
- connection_pool (2.5.0)
36
+ connection_pool (2.5.3)
37
37
  crack (1.0.0)
38
38
  bigdecimal
39
39
  rexml
40
- diff-lcs (1.6.0)
40
+ diff-lcs (1.6.1)
41
41
  docile (1.4.1)
42
42
  drb (2.2.1)
43
- faraday (2.12.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.2.1)
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.10.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.6.6)
60
+ logger (1.7.0)
61
61
  minitest (5.25.5)
62
- multi_xml (0.7.1)
62
+ multi_xml (0.7.2)
63
63
  bigdecimal (~> 3.1)
64
64
  net-http (0.6.0)
65
65
  uri
@@ -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.26.3)
75
- parser (3.3.7.2)
74
+ parallel (1.27.0)
75
+ parser (3.3.8.0)
76
76
  ast (~> 2.4.1)
77
77
  racc
78
- public_suffix (6.0.1)
78
+ prism (1.4.0)
79
+ public_suffix (6.0.2)
79
80
  racc (1.8.1)
80
- rack (3.1.12)
81
+ rack (3.1.13)
81
82
  rainbow (3.1.1)
82
83
  rake (13.2.1)
83
84
  regexp_parser (2.10.0)
@@ -88,14 +89,14 @@ GEM
88
89
  rspec-mocks (~> 3.13.0)
89
90
  rspec-core (3.13.3)
90
91
  rspec-support (~> 3.13.0)
91
- rspec-expectations (3.13.3)
92
+ rspec-expectations (3.13.4)
92
93
  diff-lcs (>= 1.2.0, < 2.0)
93
94
  rspec-support (~> 3.13.0)
94
- rspec-mocks (3.13.2)
95
+ rspec-mocks (3.13.3)
95
96
  diff-lcs (>= 1.2.0, < 2.0)
96
97
  rspec-support (~> 3.13.0)
97
- rspec-support (3.13.2)
98
- rubocop (1.74.0)
98
+ rspec-support (3.13.3)
99
+ rubocop (1.75.5)
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.38.0, < 2.0)
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.41.0)
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.24.0)
119
+ rubocop-performance (1.25.0)
118
120
  lint_roller (~> 1.1)
119
- rubocop (>= 1.72.1, < 2.0)
121
+ rubocop (>= 1.75.0, < 2.0)
120
122
  rubocop-ast (>= 1.38.0, < 2.0)
121
- rubocop-rspec (3.5.0)
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.6)
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.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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class MaisOrcidClient
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.2'
5
5
  end
@@ -37,6 +37,7 @@ class MaisOrcidClient
37
37
  client_id:,
38
38
  client_secret:,
39
39
  base_url:,
40
+ token_url:,
40
41
  user_agent:
41
42
  )
42
43
  # rubocop:enable Style/OpenStructUse
@@ -64,9 +65,8 @@ class MaisOrcidClient
64
65
  result[:last_updated])
65
66
  return orcid_users if limit && limit == orcid_users.size
66
67
  end
67
- # Currently next is always present, even on last page. (This may be changed in future.)
68
68
  next_page = response.dig(:links, :next)
69
- return orcid_users if last_page?(response[:links])
69
+ return orcid_users if next_page.nil? || next_page.empty?
70
70
  end
71
71
  end
72
72
  # rubocop:enable Metrics/MethodLength
@@ -114,10 +114,6 @@ class MaisOrcidClient
114
114
  path
115
115
  end
116
116
 
117
- def last_page?(links)
118
- links[:self] == links[:last]
119
- end
120
-
121
117
  # rubocop:disable Metrics/MethodLength
122
118
  def get_response(path, allow404: false)
123
119
  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.0
4
+ version: 1.0.2
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-03-28 00:00:00.000000000 Z
11
+ date: 2025-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport