uc3-dmp-id 0.1.52 → 0.1.54

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: a126b7c8bbcf6836334748edef7a8ae44510b1c980c208de7448fffbb50f39df
4
- data.tar.gz: d597f5f334d488e9dd1d1c25d475949daf9eb01b2a44d0166bdb8cb6f106bc4c
3
+ metadata.gz: a25055e5e62c689e02f190fe828bbe553ef380bcf6bcd2b2e2bb6299f80ea439
4
+ data.tar.gz: c51528de686f3786175ef6bfe2dcde9f1c86897d0fc6d5748667167021d55b54
5
5
  SHA512:
6
- metadata.gz: c52f3a5bd533a0b00a6d76ee2f2f94f0cfa3bb581823411dfc2fa54d44e81ad807f54ed965b91ea8ee08c37d2861cd890ed501331804c813bab6b57203ccd0c4
7
- data.tar.gz: c4c9bf7e8ee84bc89f2d41626de0421773377b1564144e35ce02c0d102b60f2be207ec8b04b5187e7c098691c4b20b9bbc2dff19e4180115ddb442e0712ab8ce
6
+ metadata.gz: c3a6afb5c512125d29ff1fc6a2da94de5aa98277f08e9fb46d7e120cd64d24238f8eb915f141a4df115feb89951f7e5753daf7c49358241fc7d718277e4d3aed
7
+ data.tar.gz: 7421c51628509d0e0c904625916fd56b43c6fecca16a131169568371f6b39acc274f730ca7d8942d4634daf30b89a7ddfa9f6acb63b634b3ad3fe2a3b8e1472b
@@ -139,7 +139,7 @@ module Uc3DmpId
139
139
 
140
140
  if email.nil?
141
141
  args = {
142
- filter_expression: 'contains(:people_ids, people)',
142
+ filter_expression: 'contains(:people_ids, people) AND :sk = sk',
143
143
  expression_attribute_values: {
144
144
  ':sk': 'METADATA',
145
145
  ':people_ids': [
@@ -150,12 +150,12 @@ module Uc3DmpId
150
150
  }
151
151
  else
152
152
  args = {
153
- filter_expression: 'contains(:people, people)',
153
+ filter_expression: 'contains(:people, people) AND :sk = sk',
154
154
  expression_attribute_values: { ':sk': 'METADATA', ':people': [email] }
155
155
  }
156
156
  end
157
157
  logger&.debug(message: 'Fetch relevant DMPs _by_owner - scan args', details: args)
158
- resp = client.scan(args)
158
+ resp = client.scan(args:)
159
159
 
160
160
  client = Uc3DmpDynamo::Client.new if client.nil?
161
161
  _process_search_response(response: client.query(args:, logger:))
@@ -167,7 +167,7 @@ module Uc3DmpId
167
167
  ror = org.trim() unless (org.to_s =~ regex).nil?
168
168
 
169
169
  args = {
170
- filter_expression: 'contains(:affiliation_ids, affiliation_ids)',
170
+ filter_expression: 'contains(:affiliation_ids, affiliation_ids) AND :sk = sk',
171
171
  expression_attribute_values: {
172
172
  ':sk': 'METADATA',
173
173
  ':affiliation_ids': [
@@ -177,7 +177,7 @@ module Uc3DmpId
177
177
  }
178
178
  }
179
179
  logger&.debug(message: 'Fetch relevant DMPs _by_org - scan args', details: args)
180
- resp = client.scan(args)
180
+ resp = client.scan(args:)
181
181
 
182
182
  client = Uc3DmpDynamo::Client.new if client.nil?
183
183
  _process_search_response(response: client.query(args:, logger:))
@@ -189,7 +189,7 @@ module Uc3DmpId
189
189
  ror = funder.trim() unless (funder.to_s =~ regex).nil?
190
190
 
191
191
  args = {
192
- filter_expression: 'contains(:funder_ids, funder_ids)',
192
+ filter_expression: 'contains(:funder_ids, funder_ids) AND :sk = sk',
193
193
  expression_attribute_values: {
194
194
  ':sk': 'METADATA',
195
195
  ':funder_ids': [
@@ -199,7 +199,7 @@ module Uc3DmpId
199
199
  }
200
200
  }
201
201
  logger&.debug(message: 'Fetch relevant DMPs _by_funder - scan args', details: args)
202
- resp = client.scan(args)
202
+ resp = client.scan(args:)
203
203
 
204
204
  client = Uc3DmpDynamo::Client.new if client.nil?
205
205
  _process_search_response(response: client.query(args:, logger:))
@@ -208,11 +208,11 @@ module Uc3DmpId
208
208
  # Fetch the DMP IDs that are marked as featured
209
209
  def _by_featured(client: nil, logger: nil)
210
210
  args = {
211
- filter_expression: ':featured = featured',
211
+ filter_expression: ':featured = featured AND :sk = sk',
212
212
  expression_attribute_values: { ':sk': 'METADATA', ':featured': 1 }
213
213
  }
214
214
  logger&.debug(message: 'Fetch relevant DMPs _by_featured - scan args', details: args)
215
- resp = client.scan(args)
215
+ resp = client.scan(args:)
216
216
 
217
217
  client = Uc3DmpDynamo::Client.new if client.nil?
218
218
  _process_search_response(response: client.query(args:, logger:))
@@ -221,11 +221,11 @@ module Uc3DmpId
221
221
  # Return all of the publicly visible DMPs
222
222
  def _publicly_visible(client: nil, logger: nil)
223
223
  args = {
224
- filter_expression: ':visibility = visibility',
224
+ filter_expression: ':visibility = visibility AND :sk = sk',
225
225
  expression_attribute_values: { ':sk': 'METADATA', ':visibility': 'public' }
226
226
  }
227
227
  logger&.debug(message: 'Fetch relevant DMPs _publicly_visible - scan args', details: args)
228
- resp = client.scan(args)
228
+ resp = client.scan(args:)
229
229
 
230
230
  client = Uc3DmpDynamo::Client.new if client.nil?
231
231
  _process_search_response(response: client.query(args:, logger:))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.52'
4
+ VERSION = '0.1.54'
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.52
4
+ version: 0.1.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley