uc3-dmp-id 0.1.57 → 0.1.59

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: 141e0ecd0482b349f2b98f2d41029623f42c755324bb6ab0347c1703d224393f
4
- data.tar.gz: 8872a059855cb558f884a2b8542c8dece13aaad36c7b73679d90f7e129e6667b
3
+ metadata.gz: 59344bea0d31538592f45cc51bda5971e9834ba66ba6b75b99f25bc188307782
4
+ data.tar.gz: b57a971d2734b20cda13bd67df9f8c1e1f14f3c80d17eb6dc92d0a00ac28e3e0
5
5
  SHA512:
6
- metadata.gz: 26f0b387fcc3417459c6a0b2363f6a6aa1ab8bade5690679ce60e2ecb8a010ec5e2bcf34d442f4fe93f5e0206cacef679842feea67b76bb9d0cbd54a14a57bf1
7
- data.tar.gz: 143a749ad8e6f425360b5b8f8aa55c58be4a046a1b858360bdb9f6154bf75b891956436a33ecc045324f1a4abd64ac9d450c7e7b1616f9a3dc7f32e314bbddf9
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] }
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.57'
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.57
4
+ version: 0.1.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley