uc3-dmp-id 0.1.58 → 0.1.59
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/lib/uc3-dmp-id/finder.rb +10 -10
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 59344bea0d31538592f45cc51bda5971e9834ba66ba6b75b99f25bc188307782
|
|
4
|
+
data.tar.gz: b57a971d2734b20cda13bd67df9f8c1e1f14f3c80d17eb6dc92d0a00ac28e3e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90bee71bd0005f49adb736c0ba5fad0d75e40b12815cb46bc0a73352e841bd7b2372e7038282427d7dbfda05fd7f060e04500c4588ce578424a7632bd19510fd
|
|
7
|
+
data.tar.gz: 958e3d10549189e8e7d47d950cb27dddb84623f1d8b13d23386b555c773cfe3b8ecbef41d4221a225b84dbcd7f5079701f98218947aff58156fd2e8fe5b18946
|
data/lib/uc3-dmp-id/finder.rb
CHANGED
|
@@ -139,10 +139,10 @@ module Uc3DmpId
|
|
|
139
139
|
|
|
140
140
|
if !(owner.to_s.strip =~ orcid_regex).nil?
|
|
141
141
|
args = {
|
|
142
|
-
filter_expression: 'contains(
|
|
142
|
+
filter_expression: 'contains(people_ids, :orcids) AND SK = :sk',
|
|
143
143
|
expression_attribute_values: {
|
|
144
144
|
':sk': 'METADATA',
|
|
145
|
-
':
|
|
145
|
+
':orcids': [
|
|
146
146
|
"http://#{ORCID_DOMAIN}/#{owner}",
|
|
147
147
|
"https://#{ORCID_DOMAIN}/#{owner}"
|
|
148
148
|
]
|
|
@@ -150,8 +150,8 @@ module Uc3DmpId
|
|
|
150
150
|
}
|
|
151
151
|
elsif !email.nil?
|
|
152
152
|
args = {
|
|
153
|
-
filter_expression: 'contains(
|
|
154
|
-
expression_attribute_values: { ':sk': 'METADATA', ':
|
|
153
|
+
filter_expression: 'contains(people, :email) AND SK = :sk',
|
|
154
|
+
expression_attribute_values: { ':sk': 'METADATA', ':email': [email.gsub('%40', '@')] }
|
|
155
155
|
}
|
|
156
156
|
else
|
|
157
157
|
# It wasn't an email or ORCID, so return an empty array
|
|
@@ -168,10 +168,10 @@ module Uc3DmpId
|
|
|
168
168
|
ror = org.strip unless (org.to_s =~ regex).nil?
|
|
169
169
|
|
|
170
170
|
args = {
|
|
171
|
-
filter_expression: 'contains(
|
|
171
|
+
filter_expression: 'contains(affiliation_ids, :rors) AND SK = :sk',
|
|
172
172
|
expression_attribute_values: {
|
|
173
173
|
':sk': 'METADATA',
|
|
174
|
-
':
|
|
174
|
+
':rors': [
|
|
175
175
|
"http://#{ROR_DOMAIN}/#{ror}",
|
|
176
176
|
"https://#{ROR_DOMAIN}/#{ror}"
|
|
177
177
|
]
|
|
@@ -188,10 +188,10 @@ module Uc3DmpId
|
|
|
188
188
|
ror = funder.strip unless (funder.to_s =~ regex).nil?
|
|
189
189
|
|
|
190
190
|
args = {
|
|
191
|
-
filter_expression: 'contains(
|
|
191
|
+
filter_expression: 'contains(funder_ids, :rors) AND SK = :sk',
|
|
192
192
|
expression_attribute_values: {
|
|
193
193
|
':sk': 'METADATA',
|
|
194
|
-
':
|
|
194
|
+
':rors': [
|
|
195
195
|
"http://#{ROR_DOMAIN}/#{ror}",
|
|
196
196
|
"https://#{ROR_DOMAIN}/#{ror}"
|
|
197
197
|
]
|
|
@@ -205,7 +205,7 @@ module Uc3DmpId
|
|
|
205
205
|
# Fetch the DMP IDs that are marked as featured
|
|
206
206
|
def _by_featured(client: nil, logger: nil)
|
|
207
207
|
args = {
|
|
208
|
-
filter_expression: '
|
|
208
|
+
filter_expression: 'featured = :featured AND SK = :sk',
|
|
209
209
|
expression_attribute_values: { ':sk': 'METADATA', ':featured': 1 }
|
|
210
210
|
}
|
|
211
211
|
logger&.debug(message: 'Fetch relevant DMPs _by_featured - scan args', details: args)
|
|
@@ -216,7 +216,7 @@ module Uc3DmpId
|
|
|
216
216
|
# Return all of the publicly visible DMPs
|
|
217
217
|
def _publicly_visible(client: nil, logger: nil)
|
|
218
218
|
args = {
|
|
219
|
-
filter_expression: '
|
|
219
|
+
filter_expression: 'visibility = :visibility AND SK = :sk',
|
|
220
220
|
expression_attribute_values: { ':sk': 'METADATA', ':visibility': 'public' }
|
|
221
221
|
}
|
|
222
222
|
logger&.debug(message: 'Fetch relevant DMPs _publicly_visible - scan args', details: args)
|
data/lib/uc3-dmp-id/version.rb
CHANGED