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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0987f59845998c2a2e3409986fe93f8b176f0f3ad175f2b25384fd1c558dd943'
4
- data.tar.gz: 7ee6181e791f32a788c96e4f5c4a174cb510f7b89a99d2bd0dc4e575e457efe8
3
+ metadata.gz: 59344bea0d31538592f45cc51bda5971e9834ba66ba6b75b99f25bc188307782
4
+ data.tar.gz: b57a971d2734b20cda13bd67df9f8c1e1f14f3c80d17eb6dc92d0a00ac28e3e0
5
5
  SHA512:
6
- metadata.gz: a66993ced9e0c61fac91fb754f90f637c7eaf630c8751b3dd2ee7b4b396f3741e71ec48fd64e387c508cc68b2bcad4f9cf89dda747a56b2d0eb2fb42720a6c30
7
- data.tar.gz: 42ca4b60f5e094acd492257dd97da3fc1191912c9f1dbad4fbbe614c7ad34ea02db617ea1e9501e02ede5a5a4e4493d5e7041d365bceff6bbc7f6d604cf34ad9
6
+ metadata.gz: 90bee71bd0005f49adb736c0ba5fad0d75e40b12815cb46bc0a73352e841bd7b2372e7038282427d7dbfda05fd7f060e04500c4588ce578424a7632bd19510fd
7
+ data.tar.gz: 958e3d10549189e8e7d47d950cb27dddb84623f1d8b13d23386b555c773cfe3b8ecbef41d4221a225b84dbcd7f5079701f98218947aff58156fd2e8fe5b18946
@@ -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(:people_ids, people) AND :sk = sk',
142
+ filter_expression: 'contains(people_ids, :orcids) AND SK = :sk',
143
143
  expression_attribute_values: {
144
144
  ':sk': 'METADATA',
145
- ':people_ids': [
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(:people, people) AND :sk = sk',
154
- expression_attribute_values: { ':sk': 'METADATA', ':people': [email.gsub('%40', '@')] }
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(:affiliation_ids, affiliation_ids) AND :sk = sk',
171
+ filter_expression: 'contains(affiliation_ids, :rors) AND SK = :sk',
172
172
  expression_attribute_values: {
173
173
  ':sk': 'METADATA',
174
- ':affiliation_ids': [
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(:funder_ids, funder_ids) AND :sk = sk',
191
+ filter_expression: 'contains(funder_ids, :rors) AND SK = :sk',
192
192
  expression_attribute_values: {
193
193
  ':sk': 'METADATA',
194
- ':funder_ids': [
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: ':featured = featured AND :sk = sk',
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: ':visibility = visibility AND :sk = sk',
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.58'
4
+ VERSION = '0.1.59'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.58
4
+ version: 0.1.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley