uc3-dmp-id 0.0.91 → 0.0.93
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/version.rb +1 -1
- data/lib/uc3-dmp-id/versioner.rb +7 -6
- 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: effd6e9f621b4a0a2ff038e01a9db04f39284eebe520c18df70b6a224984e030
|
4
|
+
data.tar.gz: be8087477ee5ae03e4c82b24cecf4f8b92b5fb4fa090520277738b0538d3324c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31d8ab61ec9adef5daba45bb25d26bfbb5559b5ac468bc3b05231e814e24e0670d84644040006ab723049f7c7b469e13a4ac53a9fd34c88ba8473232b0beb93e
|
7
|
+
data.tar.gz: 1c2b1e95f0f01ca0ef7e641338eac0ab18e59b1137980dd912cb8b7321d7311a0dfa4f7458d796d73040e73ba91768399f19f9320be2a7da4b8941026337783e
|
data/lib/uc3-dmp-id/version.rb
CHANGED
data/lib/uc3-dmp-id/versioner.rb
CHANGED
@@ -32,18 +32,19 @@ module Uc3DmpId
|
|
32
32
|
# - Splicing in the current changes onto the existing `VERSION#latest` item
|
33
33
|
# - Returning the spliced `VERSION#latest` back to this method
|
34
34
|
def new_version(provenance:, p_key:, client: nil, dmp:, latest_version: {}, logger: nil)
|
35
|
+
|
36
|
+
puts "Provenance: #{provenance}, PK: #{p_key}"
|
37
|
+
puts dmp
|
38
|
+
|
35
39
|
return nil unless p_key.is_a?(String) && !p_key.strip.empty? && _versionable?(dmp: dmp)
|
36
40
|
|
37
|
-
client = Uc3DmpDynamo::Client.new
|
41
|
+
client = Uc3DmpDynamo::Client.new if client.nil?
|
38
42
|
latest_version = Finder.by_p_key(client: client, p_key: p_key) unless latest_version.is_a?(Hash) &&
|
39
43
|
!latest_version['PK'].nil?
|
40
44
|
|
41
|
-
|
42
|
-
return nil unless latest['SK'] != Helper::DMP_LATEST_VERSION
|
43
|
-
|
44
|
-
owner = latest['dmphub_provenance_id']
|
45
|
+
owner = latest_version['dmphub_provenance_id']
|
45
46
|
updater = provenance['PK']
|
46
|
-
prior = _generate_version(client: client, latest_version:
|
47
|
+
prior = _generate_version(client: client, latest_version: latest_version, owner: owner, updater: updater)
|
47
48
|
return nil if prior.nil?
|
48
49
|
|
49
50
|
args = { owner: owner, updater: updater, base: prior, mods: dmp, logger: logger }
|