uc3-dmp-id 0.1.87 → 0.1.88

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: a5f7760c4099466f5a99377669e189dfc33cfe2e718d1bf0c96b06b251f5ff77
4
- data.tar.gz: dd6b30e66d7848e8810bd4c735ce5d007e7c0dd80c059e2341813db873e74c35
3
+ metadata.gz: 8d752505298a89f722b0706279af48bd76aed33e86a123f853332d8cda583e84
4
+ data.tar.gz: 8b7777cf441c79a236ccbf5b7f01ad30509b8b012633e82bc6b46f1e5821a709
5
5
  SHA512:
6
- metadata.gz: 9b2ebf8b2d1919f15bc9b538373fcafddb077c432754b0ba27c8706de6352db07d0db51ec41e5bb4bdc1469a55d45162d45127fc14e4df0c4699d63ed10963e5
7
- data.tar.gz: 6470cf64e86138c08c343c299dea73a5d5add92755c6716684ad33e25378bfb36f6c3e440a142d5c66f439655d4b3600516c417efd31c9dc7ae4dac0047e416b
6
+ metadata.gz: 81243b26a046da78451dcc5e744f62d51798f49607751c0d0633e92a149ba857bb26b7a50036c1aac2a44ef80be695556cab0f7b76d4f934f77299c9bceddec3
7
+ data.tar.gz: d8b5539c4c8108ef8f34303676cff0f8cecb7442451e9e2bacbc0b0dcd3ae88590c5221deee4b91cabc5269a473f4e43f5b2967d05888f08fa0f9eff8b1010d8
@@ -41,19 +41,12 @@ module Uc3DmpId
41
41
  org_pks = org.nil? ? [] : org.split('|').map { |o| _by_org(org: o, client:, logger:) }
42
42
  org_pks = org_pks.flatten.uniq
43
43
  funder_pks = funder.nil? ? [] : _by_funder(funder: funder, client:, logger:)
44
- # pks = [owner_pks, org_pks, funder_pks].reject(&:empty?)
45
44
  logger&.debug(
46
45
  message: 'PKs found',
47
46
  details: { owner: owner_pks, org: org_pks, funder: funder_pks }
48
47
  )
49
- # return [] if pks.nil? || pks.empty?
50
-
51
- # Only use the DMPs that fit all of the filter criteria
52
- # dmps = pks.reduce(:&).flatten.uniq
53
- # return [] if dmps.nil? || dmps.empty?
54
48
 
55
49
  [owner_pks, org_pks, funder_pks].flatten.uniq
56
-
57
50
  end
58
51
 
59
52
  # Find a DMP based on the contents of the incoming JSON
@@ -227,8 +220,6 @@ module Uc3DmpId
227
220
  next if item.nil?
228
221
 
229
222
  dmp = item['dmp'].nil? ? JSON.parse({ dmp: item }.to_json) : item
230
- # dmp = _remove_narrative_if_private(json: dmp)
231
- # Helper.cleanse_dmp_json(json: dmp)
232
223
  end
233
224
  results.compact.uniq
234
225
  end
@@ -254,8 +254,8 @@ module Uc3DmpId
254
254
 
255
255
  # Set the :modified timestamps
256
256
  now = Time.now.utc
257
- version['modified'] = now.iso8601
258
- version['dmphub_modification_day'] = now.strftime('%Y-%m-%d')
257
+ payload['modified'] = now.iso8601
258
+ payload['dmphub_modification_day'] = now.strftime('%Y-%m-%d')
259
259
 
260
260
  # Retain all the other attributes on the original version unless they are
261
261
  # in the list of exclusions OR the incoming payload already has a value for it
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpId
4
- VERSION = '0.1.87'
4
+ VERSION = '0.1.88'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.87
4
+ version: 0.1.88
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-17 00:00:00.000000000 Z
11
+ date: 2024-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json