uc3-dmp-id 0.1.53 → 0.1.55

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: 7ed8f25c716416ba94aa70e864f64a84451346291667acaf491a5efd755e7abd
4
- data.tar.gz: d64e0d33da594f81ac90624740e4d80a5309c112f9d2c8bcbeae5f4b60386edf
3
+ metadata.gz: 303302842851603259f0981187aa9e2df87db1214541f8716686ee0f68c3d565
4
+ data.tar.gz: de9174608180b81de434d1f5d87abfa1f339c14495d49f93f0c7446cdaaea608
5
5
  SHA512:
6
- metadata.gz: 75de41d469fed8bfc95d2b81dc2b784bca641c3ec986f03d772d060e72a99a7a05d8633b19aff24dcf00099ca8ab769218cab3b9036ad4663f7769db7f76c8fc
7
- data.tar.gz: c83a34001e05eaae3dd7aa21e11a8566846524b4e24d9bd499bdbd2ad3db43271304613f56515ae2ed28a04418b57a430af8aed29b552c6d3496d84c3e1c1acb
6
+ metadata.gz: 654b37d44b2b871a385dd72f3104ba857e01b2fff58690708aea9beb3f2e2480eb6550bb18dc3b21cd67ea1362c805dd456bbea4da89598a50493499d934719a
7
+ data.tar.gz: bff8736d8b88b890497c13f4604dd67749bf6409045de1532debd4875f7edb7baedb4ca427d5d9a02c2baea452a603ebcc6c98652e9a33f7a9d8217a8190cb4d
@@ -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,15 +150,13 @@ 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:)
159
-
160
158
  client = Uc3DmpDynamo::Client.new if client.nil?
161
- _process_search_response(response: client.query(args:, logger:))
159
+ _process_search_response(response: client.scan(args:))
162
160
  end
163
161
 
164
162
  # Fetch the DMP IDs for the specified organization/institution
@@ -167,7 +165,7 @@ module Uc3DmpId
167
165
  ror = org.trim() unless (org.to_s =~ regex).nil?
168
166
 
169
167
  args = {
170
- filter_expression: 'contains(:affiliation_ids, affiliation_ids)',
168
+ filter_expression: 'contains(:affiliation_ids, affiliation_ids) AND :sk = sk',
171
169
  expression_attribute_values: {
172
170
  ':sk': 'METADATA',
173
171
  ':affiliation_ids': [
@@ -177,10 +175,8 @@ module Uc3DmpId
177
175
  }
178
176
  }
179
177
  logger&.debug(message: 'Fetch relevant DMPs _by_org - scan args', details: args)
180
- resp = client.scan(args:)
181
-
182
178
  client = Uc3DmpDynamo::Client.new if client.nil?
183
- _process_search_response(response: client.query(args:, logger:))
179
+ _process_search_response(response: client.scan(args:))
184
180
  end
185
181
 
186
182
  # Fetch the DMP IDs for the specified funder
@@ -189,7 +185,7 @@ module Uc3DmpId
189
185
  ror = funder.trim() unless (funder.to_s =~ regex).nil?
190
186
 
191
187
  args = {
192
- filter_expression: 'contains(:funder_ids, funder_ids)',
188
+ filter_expression: 'contains(:funder_ids, funder_ids) AND :sk = sk',
193
189
  expression_attribute_values: {
194
190
  ':sk': 'METADATA',
195
191
  ':funder_ids': [
@@ -199,36 +195,30 @@ module Uc3DmpId
199
195
  }
200
196
  }
201
197
  logger&.debug(message: 'Fetch relevant DMPs _by_funder - scan args', details: args)
202
- resp = client.scan(args:)
203
-
204
198
  client = Uc3DmpDynamo::Client.new if client.nil?
205
- _process_search_response(response: client.query(args:, logger:))
199
+ _process_search_response(response: client.scan(args:))
206
200
  end
207
201
 
208
202
  # Fetch the DMP IDs that are marked as featured
209
203
  def _by_featured(client: nil, logger: nil)
210
204
  args = {
211
- filter_expression: ':featured = featured',
205
+ filter_expression: ':featured = featured AND :sk = sk',
212
206
  expression_attribute_values: { ':sk': 'METADATA', ':featured': 1 }
213
207
  }
214
208
  logger&.debug(message: 'Fetch relevant DMPs _by_featured - scan args', details: args)
215
- resp = client.scan(args:)
216
-
217
209
  client = Uc3DmpDynamo::Client.new if client.nil?
218
- _process_search_response(response: client.query(args:, logger:))
210
+ _process_search_response(response: client.scan(args:))
219
211
  end
220
212
 
221
213
  # Return all of the publicly visible DMPs
222
214
  def _publicly_visible(client: nil, logger: nil)
223
215
  args = {
224
- filter_expression: ':visibility = visibility',
216
+ filter_expression: ':visibility = visibility AND :sk = sk',
225
217
  expression_attribute_values: { ':sk': 'METADATA', ':visibility': 'public' }
226
218
  }
227
219
  logger&.debug(message: 'Fetch relevant DMPs _publicly_visible - scan args', details: args)
228
- resp = client.scan(args:)
229
-
230
220
  client = Uc3DmpDynamo::Client.new if client.nil?
231
- _process_search_response(response: client.query(args:, logger:))
221
+ _process_search_response(response: client.scan(args:))
232
222
  end
233
223
 
234
224
  # Transform the search results so that we do not include any of the DMPHub specific metadata
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.53'
4
+ VERSION = '0.1.55'
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.53
4
+ version: 0.1.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley