uc3-dmp-id 0.0.45 → 0.0.47
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/creator.rb +1 -1
- data/lib/uc3-dmp-id/finder.rb +3 -5
- data/lib/uc3-dmp-id/updater.rb +1 -1
- data/lib/uc3-dmp-id/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43c55916e9c3c7e5dffebe207a69de110ff182000a72ae3ea915036653199be0
|
4
|
+
data.tar.gz: 7eb32abc118b66d38084716f34dd0994043c62421c7cba00ff85353f9442d3a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f758910ef012627c05710e6dda80e3c72abdf77f0e7cff64ea46cb93a7697bacf8802ed73e3d455cb98dc245640a45d43f2f3b8ed2945d9b3043d31ec83e203
|
7
|
+
data.tar.gz: 45737a59db0d8e2a5e9a59ddadbccb7a36af9513a91ba04ba04f1919bef867060ba6139c8abdb55c4c1bb1452a599a35bce23cad8a59aab1037c522486c72dde
|
data/lib/uc3-dmp-id/creator.rb
CHANGED
@@ -38,7 +38,7 @@ module Uc3DmpId
|
|
38
38
|
raise CreatorError, MSG_UNABLE_TO_MINT if p_key.nil?
|
39
39
|
|
40
40
|
# Add the DMPHub specific attributes and then save
|
41
|
-
annotated = Helper.annotate_dmp_json(provenance: provenance, owner_org: owner_org, p_key: p_key, json: json)
|
41
|
+
annotated = Helper.annotate_dmp_json(provenance: provenance, owner_org: owner_org, p_key: p_key, json: json['dmp'])
|
42
42
|
puts "CREATING DMP ID:" if debug
|
43
43
|
puts annotated if debug
|
44
44
|
|
data/lib/uc3-dmp-id/finder.rb
CHANGED
@@ -64,18 +64,16 @@ module Uc3DmpId
|
|
64
64
|
|
65
65
|
# Fetch just the PK to see if a record exists
|
66
66
|
# -------------------------------------------------------------------------
|
67
|
-
def exists?(
|
67
|
+
def exists?(p_key:, s_key: Helper::DMP_LATEST_VERSION, client: nil)
|
68
68
|
raise FinderError, MSG_MISSING_PK if p_key.nil?
|
69
69
|
|
70
70
|
client = client.nil? ? Uc3DmpDynamo::Client.new(debug: debug) : client
|
71
|
-
|
71
|
+
client.pk_exists?(
|
72
72
|
key: {
|
73
73
|
PK: Helper.append_pk_prefix(p_key: p_key),
|
74
74
|
SK: s_key
|
75
|
-
}
|
76
|
-
projection_expression: 'PK'
|
75
|
+
}
|
77
76
|
)
|
78
|
-
resp.is_a?(Hash)
|
79
77
|
end
|
80
78
|
|
81
79
|
# Attempt to find the DMP item by the provenance system's identifier
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -17,7 +17,7 @@ module Uc3DmpId
|
|
17
17
|
raise DeleterError, errs if errs.is_a?(Array) && errs.any?
|
18
18
|
|
19
19
|
# Add the DMPHub specific attributes
|
20
|
-
annotated = Helper.annotate_dmp(provenance: provenance, json: dmp, p_key: p_key)
|
20
|
+
annotated = Helper.annotate_dmp(provenance: provenance, json: dmp['dmp'], p_key: p_key)
|
21
21
|
|
22
22
|
# fetch the existing latest version of the DMP ID
|
23
23
|
client = Uc3DmpDynamo::Client.new(debug: debug)
|
data/lib/uc3-dmp-id/version.rb
CHANGED