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 +4 -4
- data/lib/uc3-dmp-id/finder.rb +0 -9
- data/lib/uc3-dmp-id/updater.rb +2 -2
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d752505298a89f722b0706279af48bd76aed33e86a123f853332d8cda583e84
|
4
|
+
data.tar.gz: 8b7777cf441c79a236ccbf5b7f01ad30509b8b012633e82bc6b46f1e5821a709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81243b26a046da78451dcc5e744f62d51798f49607751c0d0633e92a149ba857bb26b7a50036c1aac2a44ef80be695556cab0f7b76d4f934f77299c9bceddec3
|
7
|
+
data.tar.gz: d8b5539c4c8108ef8f34303676cff0f8cecb7442451e9e2bacbc0b0dcd3ae88590c5221deee4b91cabc5269a473f4e43f5b2967d05888f08fa0f9eff8b1010d8
|
data/lib/uc3-dmp-id/finder.rb
CHANGED
@@ -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
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -254,8 +254,8 @@ module Uc3DmpId
|
|
254
254
|
|
255
255
|
# Set the :modified timestamps
|
256
256
|
now = Time.now.utc
|
257
|
-
|
258
|
-
|
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
|
data/lib/uc3-dmp-id/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2024-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|